- [Instructor] To prevent an object from transforming
in undesired ways,
we can lock specific transform axes
and prevent the object from moving rotating
or scaling in particular directions.
For example, on the mannequin model here,
the only part of it that I would ever want
to position is the pelvis.
I may want to move the pelvis
and therefore move the entire hierarchy,
but I would not want to move any part of the model
that would break the character.
Okay. I'll undo that.
I can lock the position and the scale for all of the objects
in this hierarchy, except for the pelvis.
I'll select the entire hierarchy.
There's an easy way to do that.
Simply double click on the root.
If I double click on the pelvis,
I'll select the whole hierarchy.
When you double click, you select the object
and all of its children.
Now I don't want to lock the position of the pelvis,
so I'll unselect the pelvis only using the alt key.
Alt click on an object to subtract it
from the current selection.
Now everything else is selected
and to lock the transforms I'll go over
to the hierarchy panel.
Within there, click the button labeled 'link info' to go
to that sub-panel and we see the locks rollout.
All we need to do is enable a checkbox for any access
that we wish to lock.
For all those objects, I'll lock all
of their move axes, X, Y, and Z
and all of their scale axes, X, Y, and Z,
and test this out.
I'll deselect everything, select the pelvis.
And I can still move that, undo that.
Select something like the head, try to move it.
And I can't. I can't move it in any direction.
Now I'm currently in the view coordinate system.
If we switch over to the local coordinate system and select,
for example, the head, we don't see a transform gizmo
and actually we don't even see any access tripod at all.
And this is a visual indicator
that even though we have the move tool selected,
this object cannot be moved.
In local coordinate system, any locked transforms are hidden
and we can verify that by selecting,
for example, this shoulder.
I'll unlock one of its move transform axes such as Z.
Now we see an arrow indicating the Z axis
and we can actually transform in the local Z axis.
Okay. I'll undo that.
That is one advantage of the local coordinate system.
Okay, I'll turn that lock back on again.
For some objects, we want to constrain their rotations
so that they're only able to rotate in certain axes.
For example, an elbow has only one degree of freedom.
It can only rotate in one axis.
Grab the rotate tool and once again,
in local coordinate mode, we can investigate this
and try to determine which axes we should lock.
And it looks like we would only want
to rotate around the x-axis here.
I'll undo that and then in the locks panel,
we'll lock the rotations for Y and Z.
And now we only see the gizmo for the x-axis
when we're in local mode.
And that is helpful
because we get clear visual feedback about
which axes are enabled.
I can see very clearly I'm only able to rotate
in that one axis.
If we go over to gimbal coordinates
then we will still see all three of the axes on the gizmo.
But we can only rotate around X still.
So if I click on the y-axis and drag, kind of unexpectedly.
I'm actually rotating around X. I'll undo that.
In this case it would be perfectly fine
for us to be in local coordinate space
because we've locked the other two axes
and we won't need to be in gimbal coordinate space
to avoid any issues.
Remember what we saw previously,
where an object can rotate in two
or three axes when we are only clicking
and dragging on one axis of the gizmo.
Well for an object that can only rotate in one axis,
it's perfectly safe to use local coordinates.
There's no possibility of the object rotating
in two or more axes relative to its parent
because those axes are locked,
but for an object that needs to rotate
in two or more axes, such as the head, we really should be
in gimbal coordinate space when animating rotations.
That's how to lock transforms and prevent objects
from moving, rotating, or scaling in particular axes.