Home Website Youtube GitHub

Offset pivot for controls

Is offsetting the pivot for the controls dangerous? I realize it helps me get a nice variety of rotation when I can offset the pivot to somewhere else. I’m wondering if this is a safe practice or is there some side effect? Also would there be an easy way to reset the pivot back to it’s original place?

i would also like to know…

dangerous

Well… If it does what you want it to do, then it is not dangerous.

If you want a clearer answer, you need to describe what you mean by “offsetting the pivot”. Are you talking about the .rotateAxis? The jointOrient? The Rotate Pivot?

If you did mean the Rotate Pivot, then no it isn’t dangerous. It’s an attribute on the nodes. Attributes are for editing.

As for setting it back to default, for .rotatePivot or .rotatePivotTranslate, I think it usually should be 0,0,0 by default, no? If you want to store a non-zero default and set it back to that, you could make a new vector attribute and store your values there, just for reference. I don’t think you can change the default values of attributes like that.

(Moved this thread to “Rigging General”)

1 Like

Hello guys

@chrislesage and I already gave some quick examples/explaination in here

The wetransfer link was down so here is another one
https://we.tl/t-tfEv3QmjWe

You need of course to handle this with customs steps in shifter if you want to.

1 Like

By the way @Ross_Daniel and @davids

To give a more straight answer to your post it is indeed safe to handle movable pivots but not in a Maya pivot type of way. You can’t and shouldn’t allow animators to go into pivot move mode and let them do whatever. In some rigs you actually have this fully locked down to avoid bad surprises later on. If you want to have this feature it needs to be done on the behavior of a control rig like on the scenes on the we transfer (there are other ways as well but those are the simplest imo)

For resetting the pivot to the correct (default) place there is a simple way. You need to make sure that you have default values on your attribute and then you just create this type of script/tool.

For custom attributes


for attr in cmds.listAttr(ctrl, keyable=True, userDefined=True):
    default_value = cmds.addAttr("{}.{}".format(ctrl, attr), query=True, defaultValue=True)
    if default_value:
        cmds.setAttr("{}.{}".format(ctrl, attr), default_value)

And your your basic translate, rotate, scale and visibility either you reset them back to zero and one for those or either you create a custom attribute which will be not exposed to users but only to you which stores the default value for those channels that you can read while resetting the attributes.

Hope this helps.

1 Like

Good point! I didn’t even imagine that when reading the original post. That could indeed be dangerous. One reason being that exporting animation wouldn’t see those changed pivots. And undo on pivot changes like that, often doesn’t work.

But making a controller, and connecting animatable attributes to the .rotatePivotTranslate attributes would be fine in that sense. And those could be set to default, if you made a custom attribute.