The forum is active for archival purposes only.

Join our discord community for new topics.

论坛导航
您需要登录才能建立帖子与主题。

Custom plugin failed

Hi!,
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

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

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

已上传的文件:
  • 您必须登录才有权限上传。

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