Saturday, February 18, 2012

Stop Undo-ing the scrub time slider in Maya

In one of those discussions about which animation tool is better (Maya or 3ds Max), a fellow animator commented on something I never thought about. He said that he hated the way Maya added the time slider scrubbing to the undo queue. In other words, every time you change a frame in Maya, whether by stepping to the next frame or key, an Undo action is registered. This issue was very annoying to my friend, since whenever he changed a pose, he scrubbed the time slider (several times) to see if the change worked. If i didn't worked, he had to undo all the scrubbing before undoing the actual change in the pose.

For some reason, I got use to it. That's why I never complained about it. But, this subject made me realize that it is actually an issue. Less undos means faster animation. So, I decided to ask Google what it thinks about this subject...

He pointed me to this link. It describes a way to change your hotkeys in a way that you disable the undo queue for that specific command.

The thing is, Maya is a software made up from scripts. Everything is a script. From hotkeys to tools. So, the Next/Previous hotkeys to scrub the timeline are no exception. There is a command that runs whenever you press the , or the . key. So, in changing that command, you can get rid of the undo queue-ing.

Basically, these are the commands you have to change:

Next Frame (Alt + .)
undoInfo -stateWithoutFlush off;
currentTime ( `currentTime -q` + 1 );
undoInfo -stateWithoutFlush on;

Previous frame (Alt + ,)
undoInfo -stateWithoutFlush off;
currentTime ( `currentTime -q` - 1 );
undoInfo -stateWithoutFlush on;

Next Key (.)
undoInfo -stateWithoutFlush off;
currentTime -edit `findKeyframe -timeSlider -which next`;
undoInfo -stateWithoutFlush on;

Previous Key (,)
undoInfo -stateWithoutFlush off;
currentTime -edit `findKeyframe -timeSlider  -which previous`;
undoInfo -stateWithoutFlush on;

Basically, what these commands do, is disable the undo queue before jumping to another frame/key and then enables it back. If you look closely, the middle command (starting with 'currentTime') is the same as the existing commands. The only thing we're adding is the 'undoInfo' lines at the beginning and end.

Note: You will not be able to edit the existing commands. Instead, create new ones.

So, go to your Hotkey Editor (Window\Settings/Preferences\HotKey Editor), select the "Playback Controls" category and create the new commands. Then just reassign the hotkeysto the new commands and done!

I created a little window to explain the steps.

I honestly think Autodesk should implement an option in the Undo settings to implement something like this. It would safe people some time (and lots of keystrokes!).


t said...

awesome! this is very helpful, nice blog you got here

Ricardo Ayasta said...

Thanks Kyle!

Jais Bredsted said...

thanks a lot. Very useful

Ricardo Ayasta said...

Thanks Jais!

Kiko Buyo said...

Wohoo, this is totally a WIN

Unknown said...

This is amazing! Super helpful. Thank you!

Unknown said...

Its funny to look for the solution to a problem, and see that one of the most awesome work colleagues has the answer, in the other end of the world.

Gracias querido!!


Ricardo Ayasta said...

Che! Para la proxima, antes de preguntarle a Google, me preguntas a mi ;)

Anonymous said...


this is perfect, thank you very much! Do you have the same solution for Alt+v (playback)? For some reason, it's doing it in my scene?!?


Ricardo Ayasta said...

Hello David,

Not sure why it's doing that. The playback shouldn't be undoable. If the problem persists, you can try the same thing with the Playback hotkey: Just add both "undoInfo" lines to the play command and it should be fine.


eman gamal said...

شركات نقل عفش فى خميس مشيط
شركة تسليك مجارى بخميس مشيط
شركة تنظيف بابها و بخميس مشيط
شركة تنظيف بالخميس
شركة تنظيف بخميس
شركة كشف تسريبات المياة وارتفاع فاتورة المياه
شركة تنظيف المنازل والفلل

eman gamal said...

افضل شركة تنظيف منازل بخميس مشيط
شركة نقل اثاث بخميس مشيط
افضل شركة نقل عفش بخميس مشيط
شركة مكافحة النمل الابيض بجازان
تنظيف منازل بخميس مشيط
شركة نظافة بخميس مشيط

eman shaaban said...

شركة تنظيف منازل بابها
شركة تنظيف بابها
شركة تنظيف منازل بأحد رفيدة
شركة تنظيف بوادي بن هشبل
شركة تنظيف منازل بوادي بن هشبل
شركة تنظيف منازل ببيشة

rhv said...

شركة نقل الاثاث والعفش وخدمات التسليك تحت اشراف عمالة فنية مدربة بابها وخميس مشيط
شركة نقل اثاث بابها
شركة نقل اثاث بخميس مشيط
شركة كشف تسربات المياه بابها
شركة كشف تسربات المياه بخميس مشيط
شركة تسليك مجاري بابها
شركة تسليك مجاري بخميس مشيط

karamela said...

شركة تنظيف بخميس مشيط
شركة تنظيف خزانات بخميس مشيط
شركة تنظيف خزانات بمحايل عسير
شركة تنظيف خزانات ببيشة
شركة تنظيف خزانات بوادي بن هشبل
شركة تسليك مجاري بأحد رفيدة