Has anyone tried using undoInfo -openChunk and undoInfo -closeChunk to
work around this?


On Fri, Feb 5, 2010 at 4:44 AM, Ofer Koren <[email protected]> wrote:
> I'm not sure if it's still the case, but one version used to pipe the
> function call through mel, something like this (only a lot more OOP and with
> better error handling etc...):
>
> callbackData = None
> def _doRunCallback():
>     global callbackData
>     someFunc, args, kwargs  = callbackData
>     callbackData = someFunc(*args, **kwargs)
> def runCallback(someFunc, args, kwargs):
>     global callbackData
>     callbackData = someFunc, args, kwargs
>     pm.mel.eval('python("sys.modules['%s']._doRunCallback()")' % __name__)
>     return callbackData
>
> - Ofer
> www.mrbroken.com
>
>
> On Thu, Feb 4, 2010 at 11:22 PM, ryant <[email protected]> wrote:
>>
>> I saw this post:
>>
>>
>> http://groups.google.com/group/python_inside_maya/browse_thread/thread/4d6f6b8ed7b10dbc/02914aaabb25a9b6?lnk=gst&q=undo#02914aaabb25a9b6
>>
>> And I am curious as to how pymel implements the pm.Callback() function
>> to get around the undo bug with calling functions inside of UIs. What
>> exactly are you doing to make it work?
>>
>> Ryan
>>
>> --
>> http://groups.google.com/group/python_inside_maya
>
> --
> http://groups.google.com/group/python_inside_maya

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to