PDA

View Full Version : Mental Ray Rendering Flags


braam
04-08-2003, 04: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
then?

Please! Your help will be appreciated!

Cheers
Braam

plotz
04-08-2003, 11: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.

braam
04-09-2003, 08: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

Cheers
Braam:)

Atwooki
04-09-2003, 01:45 PM
Try this, Braam:

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

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

Cheers

Atwooki
www.custom3d.co.uk
custom3d@btopenworld.com

braam
04-09-2003, 02:02 PM
Thanks master Atwooki, I will look into it. :)

braam
04-11-2003, 02: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?

Cheers
Braam

CGTalk Moderation
01-14-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.