PDA

View Full Version : Render: Help with batch script


Rudity
01-14-2003, 02:07 AM
Hi.

Im posting this here in the maya forum because I dont know where else too post for a question like this.
But its more of a programming question.
Im having a problem with batch rendering my scene. Sometimes when Im rendering on multiple machines they pic up the same frame and after one finishes they both stop. This sucks because I want to go home and sleep. :)
So I had some help and got to what you see below.
I have this:

:start
C:\AW\Maya4.0\bin\Render -verbose 1 -rep -proj D:\rudyDemo -rd H:\intro2 -s 1 -e 230 -b 1 D:\rudyDemo\scenes\scene4render.mb
goto start
end

The problem with this is it keeps going and going..

So I was wondering if someone could help me to write an if statement to tell it to stop once its gotten to frame 230. Or to stop when its finished the last frame of the file its rendering.

I hope someone can help.

Thanks in advance.
Rudity

stunndman
01-14-2003, 02:37 AM
an if condition could look like that

IF EXIST C:\yourfile GOTO start
or
IF NOT EXIST C:\yourfile GOTO start

what is the loop for?

stunndman
01-14-2003, 02:44 AM
here are some more if conditions that could be useful

IF ERRORLEVEL 1 goto ...
IF ERRORLEVEL 0 goto ...

will evaluate the return code of the executed command (like render) - error level 0 indicates a successful execution - everything else should mean failure

Rudity
01-14-2003, 03:02 AM
Cool this worked good.


:start
C:\AW\Maya4.0\bin\Render -verbose 1 -rep -proj D:\rudyDemo -rd H:\intro2 -s 1 -e 230 -b 1 D:\rudyDemo\scenes\scenerender.mb
if errorlevel 1 goto start
if errorlevel 0 goto end
:end


Thanks stunndman!!

CGTalk Moderation
01-14-2006, 04:02 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.