using "" in output files - how?

Hi there
First entry here, so please do not laugh to much of my question.
I´m quite new to maxscripting has gone head first into a quite large script - lerning by doing style and maybe because of my approach now im a bit stuck now:

I have a automatic system for producing a lot of similar single object renders of my scene containing 200+ objects. Now i want the output filename to be the same af the objectname in max and therefore I have programmed maxscript to create a batch file that rename all of the renders... but one little thing is missing. The syntax in good old dos for renaming files dosn't allow any spaces except for the one seperating the two filenames and all my object are called: 'something - like - 5555.555' so that is no good. But when include one " at each end of the statement the rename completes flawless.
is there any way that you can add " in maxscript? If do this: outputstring= """+name+" - "+number+""" if of cource fails. Is there a solution?

If not is it posible to trim all spaces in my outputstring?

Thanks

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nielzen's picture

Hi Ofer Yes that is simalar

Hi Ofer
Yes that is simalar what i have done with the batch render, but i cannot render on my own pc it has to go to the farm. In your example it would submit the whole scene each time - and is gonna take very long because the filesize of the scene is 70mb+. That´s why I would prefer to submit as a sequence.

Ofer Zelichover's picture

Are you rendering it as a

Are you rendering it as a frame sequence, where in each frame only one object is visible, or are you doing something else render all objects?

How long does it take to render each object?

I you don't mind rendering on you local machine, you can do something like:

objects.isHidden = true
local dir = "c:\\some\\folder\\"
for o in object do (
   o.isHidden = false
   local filename = dir + o.name + ".jpg"
   render outputFile:filename outputSize:[100,100]
   o.isHidden = true
)

This is only the basic structure and should be enhanced further, of course.

You might want to take a look at http://www.oferz.com/maxscripts.php#contactSheet

Cheers,

o

nielzen's picture

Hi Ofer. Thanks that did the

Hi Ofer.
Thanks that did the trick. Regarding your remark about the filenames - Yes i would prefer that, and well i tried to use batchrender for this and it worked fine, but then i have to submit my scene 150 times rather than just one - or do you have something else in mind?

Ofer Zelichover's picture

Hi, What you need to do is

Hi,

What you need to do is escape the " charachter like so: "\""

However, you can get max to render your image with the filename you wish to use, insead of renaming it afterwards. Just look up the render command in the maxscript help.

hOpe this helps,

o

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.