02-11-2013, 08:00 AM
Micheus,
Thanks... I ended up having to use Split instead of Tokens. I was getting my "1" and "2" but it was not recognized as an integer so "UpperLayer" was not being defined. It took me a while to figure it out but it is working now. Since Blend modes can only have two textures in YafaRay I can probably use the simpler version of your code for now. Unless further testing proves that it is needed...
Thanks again!
oort
ggaliens,
No idea what a real xml parser does but I am sure it would require skills I do not yet have...
Thanks... I ended up having to use Split instead of Tokens. I was getting my "1" and "2" but it was not recognized as an integer so "UpperLayer" was not being defined. It took me a while to figure it out but it is working now. Since Blend modes can only have two textures in YafaRay I can probably use the simpler version of your code for now. Unless further testing proves that it is needed...
Thanks again!
oort
Quote:%% Start Identify Modulator # (w_default_Bronze_1 or w_default_Bronze_2)
Split=replit(Texname,"_",[{return, list}]),
Num=lists:last(Split),
UpperLayer =
case Num of
"1" -> "<upper_layer sval=\""++UpperLayerName++"\"/>";
_ -> ""
end,
%% End Identify Modulator #
ggaliens,
No idea what a real xml parser does but I am sure it would require skills I do not yet have...