There are some locked nodes on our rigs (which is good usually, to stop accidental alterations especially within a team)… but occasionally I have to unlock them temporarily to futz with them.
I’ve finally made a simple shelf button to use the lockNode command with a selected object. Posting here in case anyone finds it useful too:
//to lock a node
lockNode -lock(on) `ls -sl`;
// to unlock a node
lockNode -lock(off) `ls -sl`;
The ` is actually NOT a single quotation; it’s the little diddy thing next to your ‘1’ key on the keyboard. `ls -sl` is a typical way to refer to ‘all selected objects’.
You can do handy things like ‘apply this line of code to all selected objects’, and if you need to step through the objects one at a time you do this:
string $items[] = `ls -sl`;
for ($x in $items)
{
lockNode -lock(off) $x;
}
Note that the above isn't necessary for the lock command (as the one liners earlier work too), just an example :)
-
nellthenarcoleptic posted this
Nell the Narcoleptic 2