02-08-2013, 08:22 PM
How do I check the text assigned to a Variable? This is probably simple but I can't find any info that will help me.
I decided to go ahead and add Blend modes (add,multiply,subtract,etc.) to the YafaRay plug-in before taking on the task of cleaning up my code. I made the mistake of thinking it would be simple...
Texname is the variable that gets assigned a name (w_default_Bronze_1 or w_default_Bronze_2). I need to check to see if I am working with w_default_Bronze_1 or if I am working with w_default_Bronze_2. I need to know this because they have to be handled differently when exporting them for YafaRay.
I have tried lots of stuff but the above was my last try. When I export the .xml file from Wings3D I get the following...
The blank line above <type sval="layer"/> is where I need to add code. I am using "taco" and "bell" for testing purposes.... If the function was working I would get either "taco" or "bell" but I get neither.
Thanks,
oort
I decided to go ahead and add Blend modes (add,multiply,subtract,etc.) to the YafaRay plug-in before taking on the task of cleaning up my code. I made the mistake of thinking it would be simple...
Texname is the variable that gets assigned a name (w_default_Bronze_1 or w_default_Bronze_2). I need to check to see if I am working with w_default_Bronze_1 or if I am working with w_default_Bronze_2. I need to know this because they have to be handled differently when exporting them for YafaRay.
Quote: UpperLayer =
case string:chr(format(Texname), $2) of
false -> "taco";
true -> "bell";
_ -> ""
end,
I have tried lots of stuff but the above was my last try. When I export the .xml file from Wings3D I get the following...
Quote:<diffuse_shader sval="w_default_Bronze_1"/>
<list_element>
<element sval="shader_node"/>
<name sval="w_default_Bronze_1"/>
<input sval="w_default_Bronze_1_mod"/>
<type sval="layer"/>
<mode ival="0"/>
</list_element>
<list_element>
<element sval="shader_node"/>
<name sval="w_default_Bronze_1_mod"/>
<texco sval="uv"/>
<mapping sval="plain"/>
<texture sval="w_default_Bronze_1"/>
<type sval="texture_mapper"/>
<bump_strength fval="0.000"/>
</list_element>
The blank line above <type sval="layer"/> is where I need to add code. I am using "taco" and "bell" for testing purposes.... If the function was working I would get either "taco" or "bell" but I get neither.
Thanks,
oort