Quote from imoh3n on 31. December 2018, 5:18Hi there.
Is there any way to run a python command before opening or saveing a Maya scene file?
I want to do some publishing on my scene
Thanks
Hi there.
Is there any way to run a python command before opening or saveing a Maya scene file?
I want to do some publishing on my scene
Thanks
Quote from RichardF on 7. January 2019, 22:02Usually you would do that with a custom Prism plugin in this directory: C:\Prism\Plugins\Custom
There is a readme in this directory which briefly explains how to create a new plugin. In your plugin you can put your python command in the "onSaveFile" or in the "onPublish" function. Unfortunately there is no function in the plugin which gets called when you open a scene, but I will add that as soon as possible and let you know. I also plan to simplify the plugin creation in the next update.
Usually you would do that with a custom Prism plugin in this directory: C:\Prism\Plugins\Custom
There is a readme in this directory which briefly explains how to create a new plugin. In your plugin you can put your python command in the "onSaveFile" or in the "onPublish" function. Unfortunately there is no function in the plugin which gets called when you open a scene, but I will add that as soon as possible and let you know. I also plan to simplify the plugin creation in the next update.
Quote from RichardF on 23. February 2019, 18:02In the new v1.2.0 version of Prism it should be a lot easier to do what you need:
- Open the Prism Settings dialog and in the new "Plugins" tab you can create a new plugin of type "custom".
- That will open the directory where the scripts from the new plugin are located
- There you will see a file "Prism_<PLUGINNAME>_Functions.py"
- Open that file in a text editor
- Use the "onSaveFile" and "onSceneOpen" functions to add your custom commands
- Save the script
- In the Prism Settings click on "Reload all plugins"
In the new v1.2.0 version of Prism it should be a lot easier to do what you need: