PDA

View Full Version : SaveRGBPrefix - with folder directory



AbstractTech3D
11-01-2012, 10:24 PM
Hello

I have a render folder directory user input in my script, along with an image file name input, the two of which I'm trying to correctly assign to my saveRGBPrefix command. Sure enough I can get the image file name easily assigned, but have not yet got it setting the render folder correctly.

I assume that somehow it should look somethink like this:

mycommand=("SaveRGBPrefix "+RenderFolder+ImageFileName);

Perhaps there should be a +'\' _ in there… though that's not working.

Would appreciate any advice - thanks!


Edit: After examining a scene file in a text editor, I think I'm actually asking how to include "\" in the line of script correctly?

nickdigital
11-01-2012, 11:38 PM
You need to use double slashes ("\\"). A single slash is used to escape special characters. My guess is you want:

mycommand=("SaveRGBPrefix " + RenderFolder + "\\" + ImageFileName);

The extra spaces around "+" do nothing, it just makes it easier to read IMHO. Once you finish this script it'll be a favorite of yours. It's definitely one of my favorites at work. 8)

AbstractTech3D
11-01-2012, 11:44 PM
Thanks for that Nick!

ncr100
11-04-2012, 03:18 PM
OT: Is the Windows '\' vs Mac '/' abstracted in the SDK via some PLATFORM_PATH_SEPARATOR global?

Or does the SDK magically transform this to work cross platform?

xchrisx
11-06-2012, 09:31 AM
ncr100 - This was lifted straight from Mike Green's docs:

getsep
A getsep() function has been added that will return the platform-specific path separator character.

...
info(getsep()); // displays "\", "/" or ":" depending on the operating system