jdj
12-09-2003, 08:16 PM
Hi there
I want to write a MEL script that automates the task of changing the shading group of objects in a few secene files of mine to faclilitate rendering passes for compositions.
So I sat down and figured out how to switch shading group via MEL - a done deal I thought.... but no. It got snagged on what I believe are instanced objects. I did a for loop like this:
for ($i = 0; $i < size($nodes) ;$i++)
{ sets -edit -forceElement $shadingGroup $nodes[$i]; }
...but this only seems to work for non-instanced geometry :( I have a hall with pillars that are instanced, and for all of them (but the original) the change does not seem to "stick" - they stay with the original shading group.
I am a bit tired right now so I wondered if any of you had any ideas that could save me some headaches ?
Cheers!
/ Daniel
:beer:
I want to write a MEL script that automates the task of changing the shading group of objects in a few secene files of mine to faclilitate rendering passes for compositions.
So I sat down and figured out how to switch shading group via MEL - a done deal I thought.... but no. It got snagged on what I believe are instanced objects. I did a for loop like this:
for ($i = 0; $i < size($nodes) ;$i++)
{ sets -edit -forceElement $shadingGroup $nodes[$i]; }
...but this only seems to work for non-instanced geometry :( I have a hall with pillars that are instanced, and for all of them (but the original) the change does not seem to "stick" - they stay with the original shading group.
I am a bit tired right now so I wondered if any of you had any ideas that could save me some headaches ?
Cheers!
/ Daniel
:beer:
