Custom plugin failed
Quote from Percebillo on 17. November 2020, 19:47Hi!,After the last prism update I have done, one of my custom plugins has stopped working. I have looked at the code change in EmptyPlugin and the onSave event that I use for my tool has disappeared. My plugin generates a File Name Prefix in Maya based on the file path.How can I fix this now? Maya version = 2020.3 Prism Version = 1.3.0.48 Cheers Fernando
How can I fix this now?
Maya version = 2020.3
Prism Version = 1.3.0.48
Cheers
Fernando
Quote from RichardF on 18. November 2020, 2:22Hey Fernando,
the "onSave" callback was renamed to be more consistent with other function names.
There is now a "preSaveScene" and "postSaveScene" callback. The previous "onSave" callback is now the "postSaveScene" callback.
Both callbacks take these arguments:
filepath (str), versionUp (bool), comment (str), publish (bool), details (dict)
Cheers
Hey Fernando,
the "onSave" callback was renamed to be more consistent with other function names.
There is now a "preSaveScene" and "postSaveScene" callback. The previous "onSave" callback is now the "postSaveScene" callback.
Both callbacks take these arguments:
filepath (str), versionUp (bool), comment (str), publish (bool), details (dict)
Cheers
Quote from Percebillo on 19. November 2020, 11:01Hey Richard,
Thank you very much for answering.
I've checked your answer and looked in Prism_PluginEmpty_Functions.py for the "postSaveScene" callback and it's not available. Maybe I have to create it myself?
As for the detail argument, does it contain the information of the type of plugin that was executed (Maya, Blender, etc ...)? I used origin to differentiate who makes the call.
I attach the file.
Thanks a lot.
Fernando
Hey Richard,
Thank you very much for answering.
I've checked your answer and looked in Prism_PluginEmpty_Functions.py for the "postSaveScene" callback and it's not available. Maybe I have to create it myself?
As for the detail argument, does it contain the information of the type of plugin that was executed (Maya, Blender, etc ...)? I used origin to differentiate who makes the call.
I attach the file.
Thanks a lot.
Fernando
Uploaded files:- You need to login to have access to uploads.
Quote from RichardF on 20. November 2020, 2:30Yes the postSaveScene callback doesn't exist in that file. You have to create it yourself.
The detail argument contains details like the description, which is specific to this save action. You can print it to see it's content.
To check in which DCC the callback is executed you can use:
kwargs["core"].appPlugin.pluginName == "Maya"
Cheers
Yes the postSaveScene callback doesn't exist in that file. You have to create it yourself.
The detail argument contains details like the description, which is specific to this save action. You can print it to see it's content.
To check in which DCC the callback is executed you can use:
kwargs["core"].appPlugin.pluginName == "Maya"
Cheers