Conversation
…file extension from the workfile extensions list.
|
Please read #90 (comment) and #90 (comment) |
…workfile_extension
iLLiCiTiT
left a comment
There was a problem hiding this comment.
Code looks ok. @LiborBatek could you test?
There was a problem hiding this comment.
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) ...
Does it work if you make the template file itself |
|
@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) |
No. You should not change the extension.
How did you trigger that? |
|
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. |
|
@LiborBatek can you try again with ynput/ayon-core#1889 |
…e-default-file-extension
LiborBatek
left a comment
There was a problem hiding this comment.
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)


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:
ayon+settings://photoshop/default_workfile_extensionworkfile.psb