Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
Share Thread:
Reddit Facebook Twitter
How to check the text assigned to a Variable
02-11-2013, 08:00 AM
Post: #6
RE: How to check the text assigned to a Variable
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

Quote:%% Start Identify Modulator # (w_default_Bronze_1 or w_default_Bronze_2)
Split=re:split(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... Smile Sad
Reply


Messages In This Thread
RE: How to check the text assigned to a Variable - oort - 02-11-2013 08:00 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)