Siobhan Maracle
  • About Me
  • Work
    • Rigging
    • Animation
  • Projects
  • Blog

Unlocking every node in a hierarchy

19/6/2019

 
For reasons, I had to recently delete a hierarchy where all 1726 nodes in the hierarchy were locked ha. So a quick google popped up Tyler Hurd's blog post. Really super useful so I thought I'd post it here too, so I can find it easily if I need it.
Side note....I need to figure out how to get code to format properly on Weebly haha.
import pymel.core as pm
for obj in pm.selected() :
     if pm.lockNode(obj,q=1,l=1)[0] :
          pm.lockNode(obj,l=0)
          print '%s unlocked.'%obj
     else :
​          print '%s not locked.'%obj

    What Is This?

    So this is a collection of things I've learned as I progress in rigging and animation. I just like to keep a note of things here so I can find things easily later.

    Does this all belong to you?

    Some things are things that I've figured out, but there's a great deal of tutorials and knowledge that I've found from perusing the internet. I've tried to give credit where it's due.

    Archives

    June 2019
    May 2019
    August 2018
    April 2018

    Categories

    All

    RSS Feed

Picture
siobhan.maracle@gmail.com