Pages

Tuesday, February 21, 2012

Maya selecting the Shape node instead of the transform node

Sometimes, I wonder what's going on in the head of the people at Autodesk, because for some reason, Maya or 3dsMax behave in a very weird, non intuitive way.

I came across a problem the other day with Maya, when I was trying to select my controls to animate a rig, but every time I click on the control in the viewport I would select the Shape node instead of the transform node. The curve ball here is that I could still select the control through the outliner or the rig's selection tool (those small windows were you have all the controls for the rig).

After 10 minutes digging into Maya's settings and preferences, I decided to call for help, and I did what every animator should do in case of emergency: Ask Google.

I find this little thread in an Autodesk forum. Basically, it says that whenever you want to select an object that is locked through a layer, you will select the shape instead of the transform. Go figure!

The thing is most splines used as controls in a rig are basically made of two objects (or nodes): the shape and the transform. If you don't believe me, check your outliner, right-click on it and select "Show Shapes" (if it's not already active) and you'll see that every control is made of a transform node (top node) and the shape (child). So generally, by clicking on the object itself on the viewport, we're selecting the transform node, which is the one we animate. Since the transform nodes are the ones that go into the layers, whenever that layer is locked, Maya selects the shape instead, which IMO is useless.

Anyhow, it wasn't Maya's fault, it was my fault for inadvertly locking the control layer of the rig. My bad.

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!).


Some (very!) useful hotkeys for Maya

I was wondering today what hotkeys might be useful in Maya that I'm not aware of... After all, as you become more proficient with any given tool, you will be able to deliver faster results. And Maya is a tool for animators.

So, a Google search got me to this amazing hotkeys that are not common knowledge (at least not to the animators that I know). Here are some really good ones:

Note: Since Maya is case sensitive, I'm adding the hotkeys in lowercase. If there is a hotkey that is uppercase, then I'll add SHIFT to the command.

Playback
  • Alt + v : Start/Stop playback 
  • Hold k + left-click drag : scrub time slider (also works within the graph editor)
  • Hold k + middle-click drag : move frame counter without updating position of objects (this has the same effect as if middle-clicking on the time slider to copy the translations of one object in the scene to a different frame)
  • Hold k + left-click in graph editor : change the position of the slider to where you clicked
  • Alt + Shift + v: Go to the first frame

Keys
  • Shift + w : set key for translate attributes only 
  • Shift + e: set key for rotate attributes only 

UI/Viewport
  • Ctrl + Space : show/hide all GUI elements (equivalent to the Expert Mode in 3ds Max) 
  • Alt + b : toggle background (gray, dark gray, gradient or black) 
  • [ : Undo view change
  • ] : Redo view change

Tools
  • Hold w + Left-click : open Move Tool Hotbox (allows to switch between local, world and other translate options)
  • Hold e + Left-click : open Rotate Tool Hotbox (allows to switch between local and other rotate options)
  • Hold r + Left-click : open Scale Tool Hotbox (allows to switch between local and other scale options)
There is a nice pdf file with a lot more hotkeys. Click here to have a look at it.


Thursday, February 9, 2012

Wiki for animators!

I've found this great wiki from animator Dan Harris. A lot of stuff, from animation, to rigging, to modeling...
Good stuff!
Check also his demo reel, some crazy birds animations...