View Full Version : Extra Attributes

03 March 2006, 10:52 PM
I have a bunch of materials with User defines Extra Attributes assigned to them...
Each material has up to 50 attributes of different types (bool, string, int etc....)

Whats the fastest way to delete ALL of the extra attributes assigned to a material??


03 March 2006, 04:39 AM
Hey, you could maybe do something like this:

string $selectedAll[] = `ls -sl`; //query all selected objects

for ($eachSelected in $selectedAll)
string $objAttrs[] = `listAttr -ud $eachSelected`; //query all user-defined attributes

for ($eachAttr in $objAttrs)
deleteAttr -at $eachAttr; //delete current attribute

Hope it helps :)

CGTalk Moderation
03 March 2006, 04:39 AM
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.