Doing coded stuff by attributes..

Long ago I made a small function that selects all nodes with a specified attribute. Untill recently i have refered to explicit nodenames when doing thing with scripts. Now I started to “tag” nodes in my maya scene with diferent attributes. This happens from my character tools menu, so it’s fast and easy.

I used to go:

// Delete unwanted nodes
delete “root_A” “character” “old_lattice” “Guides” etc.

Now I do:

// Delete unwanted nodes

This way I’m not(!) relying on explicit node names, that have to be typed into the scripts.. And you know that you will get it wrong, they will change, have or don’t have namespaces and so on..

Also I now have the same line of code that I re-use when I create a new char or whatever, so I don’t need to change the code or stick to a specific naming scheme.
I use this for heaps of things, not just deleing nodes 🙂


Leave a Reply

Your email address will not be published.