Command line options


(S68) #1

Hi…

trying to render PART of an animation from command line…

tried:

blender -b flyby.blend -a -s 201 -e 300

and various variation in the order of the switches, but it invariably starts from frame 1. Wat’s wrong?

(OS=Linux)

Thanx in advance

Stefano


(ilac) #2

If I recall correctly the command -b tells blender to use the render settings from the blender file. So open up your file and set your start and end frames at 201 and 300 respectively.

then you just need

blender -b flyby.blend -a

in the command line.

There is a way to specify the start and end frame from the command line but I cannot recall what it is at the moment! Sorry :-?

Regards
Fabrizio


(theeth) #3

if you take off the -b switch, maybe it will work.

Martin


(Koryo) #4

Hello S68,

Some of the command line options listed with blender -h are order
specific. I.e. it lists -s <frame> and -e <frame> before -a. So, when
entering the command use blender -b flyby.blend -s 201 -e 300 -a instead.

Though this may seem unusual or inconvient, it’s actually a feature. I
think that the documentation for this should actually be something like:


blender [ &lt;render options&gt; | &lt;playback options&gt; | &lt;filename&gt; ]

Render options: -b &lt;file&gt; [ -S &lt;name&gt; ] { -f &lt;frame&gt; | [-s &lt;frame&gt;] [-e &lt;frame&gt;] -a } [ ... ]
  -b &lt;file&gt;     Render &lt;file&gt; in the background
    -S &lt;name&gt;   Set scene &lt;name&gt; (overrides current scene)
    -f &lt;frame&gt;  Render frame &lt;frame&gt; and save it
    -s &lt;frame&gt;  Set start to frame &lt;frame&gt;
    -e &lt;frame&gt;  Set end to frame &lt;frame&gt;
    -a          Render animation with previous options

  ...           You can add as many more render options as you like here.
                If you want to change the file or scene, -b and -S must be
                included respectively, otherwise Blender will assume you
                want to use the same file or scene as last time.

                  .
                  .
                  .

You can actually chain together multiple render options. I.e.


[email protected]:~/$ blender -b animtest.blend -S "Scene 1" -s 100 -e 110 -a -s 150 -e 175 -a \
                     -S "Scene 2" -a \
                     -b animtest2.blend -S "Scene 1" -s 1 -e 20 -a

The above command will open animtest.blend and render frames 100-110
and 150-175 of Scene 1, then all of Scene 2, and finally, it will open animtest2.blend
and render frames 1-20 of Scene 1. Note that the slashes (’’) are
not part of the command; they just tell bash the command continues on
the next line.

In case you can’t tell I suck at writing documentation, but I hope this helps,


(S68) #5

IT WORKS

Great, Koryo, thanks…

Stefano