PDA

View Full Version : undo problem


Sammy1
12-17-2009, 01:34 PM
Hi, I'm modifying the AEphongTemplate.mel script by adding a new panel called "Zebra". I think my code is a little hackish but it gets the job mostly done. My problem is that once I create a phong with the attribute editor and the Zebra panel open then I can't undo the creation of the phong node. Instead I get:
Undo: phongZebraChanged( "phong2.reflectionRotateAnimation" );
over and over again. Is there a way I can get around this?
Attached is my code. If you are willing to look at my code and want to test it yourself, then Please put this in your MAYA_SCRIPT_PATH folder so that while you are testing my script you don't change, modify, or break your original AEphongTemplate.mel script. Also, you have to restart maya every time you make a change in the script for changes to take effect.
Thank You,
Nathan

Sammy1
12-17-2009, 03:44 PM
ok, I fixed my problem with, "undoInfo -stateWithoutFlush on/off" combinations around the relevant parts of code. Sorry to bother everyone, but I realized I was using the stateWithoutFlush flag incorrectly. At first I was doing,
"undoInfo -state off -stateWithoutFlush on" and "undoInfo -state on -stateWithoutFlush on", which was flushing the undo queue.

Thank you for reading this thread,
Nathan

CGTalk Moderation
12-17-2009, 03:44 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.