PDA

View Full Version : Check 32 or 64bit



nickdigital
07-13-2012, 05:49 PM
Is there a way in lscript to see if someone is using the 32 or 64 bit version of the program?

nickdigital
07-13-2012, 06:29 PM
Is it platform()?

If I run
generic
{
test = platform();
info (test);
}

on 32bit Layout I get a "1". If I do it on 64bit Layout I get a "10".

nickdigital
07-13-2012, 06:49 PM
Yep, it looks like platform() is the trick.

http://forums.newtek.com/showthread.php?t=115794&highlight=platform

K-Dawg
07-14-2012, 06:06 AM
Cool thing to know. But one question. Why would someone want to know the architecture in LScript? Don't LScripts run no matter what architecture LW is?

Greetz

nickdigital
07-14-2012, 09:57 AM
I have both flavors of LW available to my animators in case they need a 32 bit plugin. I have a script that submits the scene to the render farm so I need to know which one they're using. Previously I had a toggle button for them to choose 32 or 64bit. But now that I can have lscript detect which version, that's one less thing the animator has to think about.

papou
07-15-2012, 05:57 AM
i have done the same thing.
And one day an animator ask me how to send a send to lw64 from lw32?
so i let the switch but it is checked by platform() detection.

K-Dawg
07-15-2012, 06:00 AM
Ok Thats over my head, I don't do render farming, but it is interesting to know what the usage of that could be used for.

Did you see how to do it with the x64?

if (platform() == Win64) {
//do code
}

I think you did, just posted in case you missed it.

Greetz

papou
07-17-2012, 02:21 PM
Ok Thats over my head, I don't do render farming, but it is interesting to know what the usage of that could be used for.

Did you see how to do it with the x64?

if (platform() == Win64) {
//do code
}

I think you did, just posted in case you missed it.

Greetz

if (platform() == WIN64) {
//do code
}