Notifications
Clear all

[Closed] Set property via "execute"

I’m mapping some existing materials to a VrayMultiTex, where it has “.id_1”, “.texmap_1”, etc. So i’m trying to do (execute (“mat.id_” + i as string)), but this can only grab the property value. How can I set it?

4 Replies

Oh wait, I just included the set value in the string to execute – that works.

 lo1

consider using getProperty and setProperty instead.

what lo said or alternatively you can use the get/setSubTexMap function.
eg.

i = 1 -- to get map id 1
tex = getSubTexMap multiTex (i+1) -- get id 1 map
  -- the +1 is because the default color map is the first sub texture map
setSubTexMap multiTex (i+1) (Noise()) -- set id 1 to a noise map

Thanks for the tips. I didn’t know about get/set property!