Notifications
Clear all

[Closed] saving renders without frame numbers

Hello,
I wrote a script thats sends a bunch of still renders to backburner, witch works fine, but my problem is that the frame name always have this frame number after the name i’m giving it, like “character_X001”.
Any way of scripting the frame number out? I’m dealing with a mass of frames that i realy won’t like to go and rename each one of them…

thanks.

4 Replies
1 Reply
(@panayot)
Joined: 1 year ago

Posts: 0

Here is quick script…

 -- rename files (remove trailing numbers)
files = getFiles "c:\	emp\\*.png"
for f in files do
(
fname = trimRight (getFilenameFile f) "1234567890"
fname = getFilenamePath f + fname + ".png"
renameFile f fname
)
/*
Note: if for eg you have files with equal prefixes like - 
"file0000.png" and "file0001.png", then only the 1st will be cleaned.
So its safety ;)
*/

Submit the jobs using 3dsmaxcmd.exe -sf. This parameter from the 3dsmaxcmd causes it to render as single frames. This can’t be scripted, AFAIK, using the netrender interface. Here is a sample of what I use:

--Create a name for the file
theName = getFileNameFile maxfilename
--Create a temporary file for the scene if doing multiple submissions from one file
thefile = ((GetDir #temp) + "\\"+theName+".max")
--Save the file
saveMaxFile theFile useNewFile:false
--The camera to render
rendCam = "Camera001"
--Set the output size
sSize = " -w:640 -h:480"
--Build output string
sOutput = "C:\\"+theName+".png"
--Manager name or IP as string
theMngr = "1.1.1.1"
--Build command to pass to hiddenDosCommand
sParam = "-submit:"+theMngr+" \""+thefile+"\" -camera:\""+rendCam+"\""+" -o:\""+sOutput+"\""+sSize+" -sf -jobName:\""+theName+"\""
--Run the HiddenDosCommand
HiddenDosCommand ("3dsmaxcmd.exe "+sParam) startpath:(getDir #maxroot)
--Delete the temporary file after submission
deleteFile thefile

-Eric

Thanks for your help guys
PiXeL_MoNKeY, i’ll try it later, i was’nt familiar with sending jobs like that, i’ll see how it goes with my script.