View Full Version : exprformaxobject question.

03 March 2006, 01: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:
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?

03 March 2006, 01:21 PM
ok i think the expression has to be parsed again

meditmaterials[2].'diffuse_weight.shader'.map2.map2 returns the correct value so now i got to find a way to edit/reformat the expression to match. and then try it out


yeah i have found that filtering the resultant string and re building it stores the material :(
its a little more work but at least the code sort of works now :)

btw way if anyone else has a different way of storing the maps then i would be interested to hear how you do it

again, cheers

CGTalk Moderation
03 March 2006, 01:21 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.