Dave_Hingley
03-27-2006, 12:16 PM
I am using a references to try and get a list of textures used in a material.
on a standard material this is plain sailing. the return array is parsed with exprfromaxobject command to make a reference to the texture in the material.
however the same code falls over big time on a mental ray material. for example if in the unscattered diffuse weight channel i put in 2 mix materials and a bitmap the resulting expression is:
"meditmaterials[2][#diffuse_weight_shader].map2.map2"
however executing the string. tells me that the property map 2 is undefined which is funny because i can change properties in the mix slider ( percentage, enabling colors etc) and the macrorecorder shows exactly the same syntax
does anyone know why exprfromaxobject doesnt work for mental ray materials and if there is a way around this?
cheers
on a standard material this is plain sailing. the return array is parsed with exprfromaxobject command to make a reference to the texture in the material.
however the same code falls over big time on a mental ray material. for example if in the unscattered diffuse weight channel i put in 2 mix materials and a bitmap the resulting expression is:
"meditmaterials[2][#diffuse_weight_shader].map2.map2"
however executing the string. tells me that the property map 2 is undefined which is funny because i can change properties in the mix slider ( percentage, enabling colors etc) and the macrorecorder shows exactly the same syntax
does anyone know why exprfromaxobject doesnt work for mental ray materials and if there is a way around this?
cheers
