If you want to dive into the api you can check out the MSceneMessage
class. With that class you can also abort the operation, i.e. abort
the save operation because some condition isn't met or something.
-svenni
On 17.9.2010, at 21:36, Alan Fregtman wrote:
Perfect! :)
Thank you, Justin.
-- Alan
On Fri, Sep 17, 2010 at 5:34 PM, Justin Rosen
<[email protected]> wrote:
check out scriptJob, here's an example using pymel
import pymel.core as pm
def newSceneOpenedScriptJob():
pass
def sceneOpenedScriptJob():
pass
# When a new scene is created (untitled)
pm.scriptJob(event=["NewSceneOpened", newSceneOpenedScriptJob])
# When an existing scene is opened
pm.scriptJob(event=["SceneOpened", sceneOpenedScriptJob])
On Fri, Sep 17, 2010 at 2:27 PM, Alan Fregtman
<[email protected]>
wrote:
Hey guys,
In Soft I can declare all kinds of event callbacks like OnSceneOpen,
OnSceneClose, OnSceneSave, OnExit, etc. You define a function to run
when said event triggers.
Does Maya have something around those lines? I'd like to do a
reference rig update notifier, but I'd like an OnSceneOpen event to
trigger the notifier check. (I don't want to bundle scripts
inside the
scene, either.)
Any help appreciated.
Cheers,
-- Alan
--
http://groups.google.com/group/python_inside_maya
--
http://groups.google.com/group/python_inside_maya
--
http://groups.google.com/group/python_inside_maya
--
http://groups.google.com/group/python_inside_maya