PDA

View Full Version : Wildcard Attribute Lists


Daemonecles
06-14-2012, 08:32 PM
So I have a bit of a situation...not sure if I'm just attacking it from the wrong direction or what, but here's it is:

Let's say I have an object "pSphere1" and it has attributes
"pSphere1.ass0_john"
"pSphere1.ass1_liza"
"pSphere1.ass2_sally"

And I want to iterate through those attributes with a function, but I can't hardcode the names. Is there any way of searching for attributes and returning them? Like using a wildcard?

e.g. pSphere.ass*

(Other solutions I've tried is making compound attributes and querying the children but godamn are those attribute types broken as hell in the UI...)

ShawnFrueh
06-14-2012, 09:30 PM
This should help you out. (http://download.autodesk.com/global/docs/maya2012/en_us/Commands/listAttr.html)

Daemonecles
06-14-2012, 09:32 PM
Forehead slap moment. I even read this doc page but didn't get to the 3rd example. Thanks for being nice and not flaming my ignorance!

CGTalk Moderation
06-14-2012, 09:32 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.