- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have created a simple python command and registered it as a hotkey.
The commands are as follows
- ResetTransform (Alt+w)
import maya.cmds as cmds
cmds.move(0, 0, 0)
- ResetRotate (Alt+e)
import maya.cmds as cmds
cmds.rotate(0, 0, 0)
- ResetScale (Alt+r)
import maya.cmds as cmds
cmds.scale(1, 1, 1)
This command is usually useful, but there is a problem. For example, if you want to reset the controller of your character's rig, you can use The selected controller's Transform, Rotate and Scale move to the origin.
I want to reset the values in the Channel Box/Layer Editor to 0, 0, 0.
I'll use Animation Mentor's Stewart to explain this. (Data>AnimationMentor_Stewart)
arm Rotate is not zero, so run this. its working.
import maya.cmds as cmds
cmds.rotate(0, 0, 0)
But if you move your head and
import maya.cmds as cmds
cmds.move(0, 0, 0)
you'll notice that Channel Box / Layer Editor is not going to zero and is moving in a weird place.
It's happening in the rig I have, so I'm sure it's happening in all rigs as well.
What part of this command should I rewrite?
Solved! Go to Solution.