View Full Version : help needed please .... script non functional during mental ray render

02 February 2005, 08:42 PM
hi all .... i've got a small problem .... all suggestions welcome .....

Suppose I have a thousand objects in my scene, and all of them have a meshsmooth modifier in a disabled state.
Initially all the objects are static, and then they start moving. I need the meshsmooth of each object to be turned on only when it crosses a particular position in y, say $.pos.y > 100.
I need this happening during render time (with mental ray)....

I dont wish to go into each of the 1000 objects and add a script in there ....

This is what I tried till now :

I added a new object, a simple box into the scene, changed the rotation controller to a rotation script controller and type in the following :
x = $sphere* as array --- suppose my objects are sphere01, sphere02 ... etc
for i in x do
if (i.pos.y > 100) then (i.modifiers[#Meshsmooth].enabled = true)
else (i.modifiers[#Meshsmooth].enabled = false)


quat 0 0 0 1

now, this works fine in the viewports, as well as if i use the default scanline renderer, but if i shift to mental ray, the script doesn't seem to work ....... please help.

thanks in advance

02 February 2005, 12:10 PM
sos..... Bobo ..... please help me with the above problem ...... where am i going wrong?


CGTalk Moderation
02 February 2006, 01: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.