How about making your own save, load, undo/redo methods, add your own
callbacks and such and finally replace those normally found in menus or via
hotkeys.

A disadvantage may be that your tool would only work in an environment that
allows for this. But if you are, the advantages lies in the separation of
your pipeline and the inner workings of Maya, which may come in use when
tools misbehave or when an increased control over when and where signals
fire is required.


On 6 February 2014 09:08, Mark Jackson <[email protected]> wrote:

> Yeah we do exactly this to intercept the file open and fire some health
> checks after the scene has loaded:
>
> import maya.OpenMaya as api
> api.MSceneMessage.addCallback(api.MSceneMessage.kAfterOpen, funct_to_call)
>
>
>
> On 6 February 2014 03:57, Donal McMullan <[email protected]> wrote:
>
>> Hey Michael -
>>
>> You may want to capture some of the events detailed on this page:
>> http://download.autodesk.com/us/maya/2011help/API/class_m_
>> scene_message.html
>>
>> Using OpenMaya.MSceneMessage.addCallback
>>
>> Cheers
>>
>> D
>>
>>
>>
>> On 06/02/14 16:40, Michael Boon wrote:
>>
>>> I'm making a Qt GUI, and I need to update it when certain things in the
>>> Maya scene change.
>>>
>>> What's the best way to get a callback, Qt signal or some other
>>> notification when
>>> - the Maya file is saved under a new name
>>> - a new Maya scene is opened
>>> - undo or redo are executed
>>> ?
>>>
>>> I'm not very experienced with Maya programming. I've heard of ScriptJobs
>>> but haven't looked into them. Is that where I should be looking?
>>>
>>> Thanks,
>>>
>>> Boon
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/python_inside_maya/d6ee0082-8dd7-404a-9df2-
>>> 4cf6538eb37e%40googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>> --
>>
>> Donal McMullan
>> Production Engineer
>>  Desk: x6411
>>  Direct: +64 4909 6651
>>  Mobile: +64 2166 1254
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>>  To view this discussion on the web visit https://groups.google.com/d/
>> msgid/python_inside_maya/52F30813.7050005%40wetafx.co.nz.
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> -------------------------------------
> Mark Jackson
> Technical Animation Director
> http://markj3d.blogspot.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAGQH2FFnKLCS_nu3w8eoGWAJo73KBj3UNEp4TS7drfYedEY6-A%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
*Marcus Ottosson*
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBDsLqhEJuAQMx1Qh8ErWrVM%2BKVj-rsnHxm-aE%3DgZxjig%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to