PDA

View Full Version : Detecting 11.x version



xchrisx
07-17-2012, 03:27 PM
we currently have 11, 11.01, and 11.02 here at work and we submit scenes to our farm using different configs for each. I am looking for a way to detect the .0 .01 .02 etc so that I can submit the scene using the right configs automatically. Is there a way to detect what "sub version" is running? Ive tried hostBuild, and hostVersion but nothing seems to yield anything other than the "11" for the version.


thanks
chris

nickdigital
07-17-2012, 04:21 PM
Build = hostBuild();

LightWaveVersionVar = buildFunc(Build);

// Build function
buildFunc:Build{
if (Build <= 1540){
LightWaveVersionVar = "9.6";
}
else if (Build <= 1553){
LightWaveVersionVar = "9.6.1";
}
else if (Build <= 2067){
LightWaveVersionVar = "10";
}
else if (Build <= 2161){
LightWaveVersionVar = "10.1";
}
else if (Build <= 2238){
LightWaveVersionVar = "11";
}
else if (Build <= 2253){
LightWaveVersionVar = "11.0.1";
}
else if (Build <= 2260){
LightWaveVersionVar = "11.0.2";
}
return (LightWaveVersionVar);
}

xchrisx
07-17-2012, 04:28 PM
awesome! thanks nickdigital, very useful info.

Sensei
07-17-2012, 06:11 PM
You can also do it in TrueArt's Node Library using Product Info node..
And make different node tree branches depending on Build, Version or Revision.
There is a lot of outputs. See node.

xchrisx
07-17-2012, 06:12 PM
Thanks Sensei but I was particularly interesting in a Lscript solution. Good to know its accessible through nodes though :)