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

Reply via email to