View Full Version : Mental Ray Rendering Flags

04 April 2003, 03:37 PM
I have more than 300 objects in my scene and it is really tedious to select each object's transform node to disable "Derive from maya" checkbox to set "Trace" to "No" ("Trace" and some other attributes are dim unless you disable "Derive from Maya" checkbox)

My Question:
What must I type in Command Line to disable the all object's "Derive from Maya" checkbox and set "Trace" to "No"?

Select -all

Please! Your help will be appreciated!


04 April 2003, 10:09 PM
Don't know if you can type something in the command line or not, but the attribute spreadsheet should allow you to toggle values on and off for all your objects at once.

04 April 2003, 07:43 AM
Thanks plotz,

The problem is that you must uncheck "Derive from maya" then you can edit the "undimmed" (affected by unchecking "Derive from maya checkbox) attributes in the Attribute SpreadSheet.

I finally got a script that it will uncheck each objects' "Derive from maya checkbox. THen I can go to Attribute Spreadsheet to edit the "undimmed" attributes.

int $i;
string $selectedGroup[] = `ls -sl`;

for ($i = 0; $i < (size($selectedGroup));$i++)
setAttr ($selectedGroup[$i]+".miDeriveFromMaya") 0;

But I want to set directly, which mean I don't want to go into Attribute Spreadsheet and set attributes. I want to set these (undimmed) attributes directly by MEL.

The following commands are not working.
SetAttr($selectedGroup[$si]+".miVisible" 1;
SetAttr($selectedGroup[$si]+".miCaustic" 1;

Any help will be appreciated


04 April 2003, 12:45 PM
Try this, Braam:

string $sel[]=`ls -sl -fl`;

for($node in $sel){
select $node;
setUITemplate -pst attributeEditorTemplate;
catch(`setAttr ($node+".miDeriveFromMaya") 0`);
commitAENotes($gAECurrentTab);window -e -vis 0 AEWindow;
} ;



04 April 2003, 01:02 PM
Thanks master Atwooki, I will look into it. :)

04 April 2003, 01:24 PM
Thanks Atwooki, I improvised by example of your script.

As far as I can do is:

Open Attribute Editor, but the attributes for ShapeNode of Object is displaying, but I want to display TransformNode of selected object. (not the Shape Node).

Do any of you know how to write MEL to display it?


CGTalk Moderation
01 January 2006, 09:00 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.