PDA

View Full Version : Setting multiple attributes for multiple objects


2scale
04-02-2006, 05:47 AM
Unfortunatly, I'm not a guru when it comes to mel or any programing for that matter. What I would like to do is select multiple objects and change there display attributes specifically the drawing overides subsection. I have been searching through the command reference but cant seem to find specifics relating to changing these attributes. If anyone has some recommendations or point me in the right direction it would be great.

Thanks

A_New_Hope
04-02-2006, 09:28 AM
this will make all selected object into bounding box mod

string $shape[];
// list all selected objects
string $SelectedObjects[] = `ls -sl`;

// loop through all selected objects
for ( $obj in $SelectedObjects )
{
// get the shape node
$shape = `listRelatives -s $obj`;
// enable the override
setAttr ($shape[0]+".overrideEnabled") 1;
// set the level of detail to bounding box mode
setAttr ($shape[0]+".overrideLevelOfDetail") 1;
}


use the script editor too see the name off the attribute that you want to change, the name will be printed when you click in the attribute editor.

Robert Bateman
04-02-2006, 09:28 AM
setAttr to set the value on a node's attribute. Check the node & DG reference for details on the attribute names you want...

2scale
04-02-2006, 03:32 PM
Thanks all that replied I'll take those recommendations and give them a shot.

Mikademius
04-03-2006, 09:58 AM
I've created a script that deals with all the renderStats and I'm also writing a tutorial about it. This will probably be useful to you. Check the maya forums occationally, should be out this week/weekend.

CGTalk Moderation
04-03-2006, 09:58 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.