Skip to content

Add settings for default workfile extensions - #94

Merged
moonyuet merged 9 commits into
developfrom
enhancement/90-YN-0798--Photoshop--set-the-default-file-extension
Jun 17, 2026
Merged

moonyuet merged 9 commits into
developfrom
enhancement/90-YN-0798--Photoshop--set-the-default-file-extension

Conversation

@moonyuet

Copy link
Copy Markdown
Member

Changelog Description

This PR is to add setting for default workfile extensions in ayon servers. User can choose and prioritize which extension they would like to save with workfile tool.

Additional review information

Resolve #90
Marked it as draft due to the ongoing discussion on the issue.

Testing notes:

  1. Choose your preferred setting in ayon+settings://photoshop/default_workfile_extension
  2. Launch PS
  3. Click workfile
  4. Save as -> the workfile extension should be .psb

@moonyuet moonyuet self-assigned this Jun 10, 2026
@moonyuet moonyuet added type: enhancement Improvement of existing functionality or minor addition sponsored This is directly sponsored by a client or community member labels Jun 10, 2026
@iLLiCiTiT

Copy link
Copy Markdown
Member

Please read #90 (comment) and #90 (comment)

Comment thread client/ayon_photoshop/api/pipeline.py Outdated
Comment thread client/ayon_photoshop/api/pipeline.py Outdated
Comment thread client/ayon_photoshop/api/pipeline.py Outdated
Comment thread client/ayon_photoshop/api/pipeline.py Outdated
Comment thread client/ayon_photoshop/api/pipeline.py Outdated
Comment thread client/ayon_photoshop/api/pipeline.py Outdated
Comment thread client/ayon_photoshop/api/pipeline.py Outdated
Comment thread client/ayon_photoshop/api/pipeline.py Outdated
@iLLiCiTiT
iLLiCiTiT marked this pull request as ready for review June 10, 2026 09:23

@iLLiCiTiT iLLiCiTiT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks ok. @LiborBatek could you test?

@LiborBatek LiborBatek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In essence it works for saving Workfile and psb...

There is a one caveat tho..when using Create First Workfile as it uses the preconfig template file and its extension (e.g. psd instead)...Im not saying its a bug, but it would be nice to also use psb file format when set as default file extension instead... not sure if we are just picking up the template file and its extension or calling separate save function for creating the very first workfile (which would be best approach, so it might conform to the extension config) ...

Image Image

@BigRoy

BigRoy commented Jun 10, 2026

Copy link
Copy Markdown
Member

There is a one caveat tho..when using Create First Workfile as it uses the preconfig template file and its extension (e.g. psd instead)...Im not saying its a bug, but it would be nice to also use psb file format when set as default file extension instead... not sure if we are just picking up the template file and its extension or calling separate save function for creating the very first workfile (which would be best approach, so it might conform to the extension config) ...

Does it work if you make the template file itself .psb - if so, I think it's fine as is. If not, we may want to think about how to solve that then.

@LiborBatek

Copy link
Copy Markdown
Member

Unfortunatelly it does not respect the template file so when using Psb extension for template file its re-saved to psd...seems like hardcoded saving call...

So we def. need to resolve it atm...
Screenshot 2026-06-10 142756

and when used to build first workfile:

Screenshot 2026-06-10 142735

@moonyuet

moonyuet commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

@BigRoy @iLLiCiTiT not sure if it is safe to use the code below for workfile

    def save_workfile(self, filepath=None):
        filename, ext = os.path.splitext(filepath)
        if ext != self.workfile_extensions[0]:
            ext = self.workfile_extensions[0]
            filepath = f'{filename}{ext}'
        lib.stub().saveAs(filepath, ext.lstrip("."), False)

@iLLiCiTiT

Copy link
Copy Markdown
Member

not sure if it is safe to use the code below for workfile

No. You should not change the extension.

and when used to build first workfile:

How did you trigger that?

@iLLiCiTiT

Copy link
Copy Markdown
Member

Ok, the issue is related to templates hook in ayon-core fixed with this. It might be tricky to make this work without the change in ayon-core.

@BigRoy

BigRoy commented Jun 10, 2026

Copy link
Copy Markdown
Member

@LiborBatek can you try again with ynput/ayon-core#1889

@LiborBatek
LiborBatek self-requested a review June 17, 2026 09:38

@LiborBatek LiborBatek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested it with the ayon-core 1.9.7 and it works. It basically keeps the template file extension as is (whether its PSD or PSB) and once having some preference for saving workfiles in the settings it uses such extension...for following workfiles (e.g. very first from template as PSB while the newer workfiles then using settings prefs e.g. PSD)

LGTM

Note: I guess it might be to complicated to change the template extension to that preffered one (using the settings definition for file format instead - as now it simply keeps the original file extension which is okeyish imho)

@moonyuet
moonyuet merged commit 92b23f6 into develop Jun 17, 2026
1 check passed
@moonyuet
moonyuet deleted the enhancement/90-YN-0798--Photoshop--set-the-default-file-extension branch June 17, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sponsored This is directly sponsored by a client or community member type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YN-0798: Photoshop: set the default file extension

5 participants