[Bf-committers] remote controll blender renderer renderfarm / queue

Campbell Barton ideasman42 at gmail.com
Wed Mar 18 12:59:14 CET 2015


On Wed, Mar 18, 2015 at 9:08 PM, Robert Grah <smilingmolecule at web.de> wrote:
> I did it like you suggested. Started everything from the Python script. I also use the argument passing to Python.What format do you pass the arguments. Since they come in as a list I decided to bundle them with equal sign. "framestart=1"

For numbers this is fine, but argparse can do --some_arg=1 too,
validating the arg values, as well as --some_arg="Some String", if you
want to do more advanced arg parsing its worth looking into.

> and split them in Python.
> The last thing I am not sure about is if it is a good idea to call the blender command for each single frame or pack jobs into severall frames.
> Since the background option seems to start blender really fast it might give more flexibility to restart blender every frame.

This is really up to you, the time it takes to start Blender normally
isnt so much of a concern compared to loading blend files, libraries,
textures - etc (YMMV depending on scene size).

> Thanks for the example!
>
>
>
>
>
>
>
>
> ---- Ein Fr, 13 Mrz 2015 12:49:08 +0100 Campbell Barton &lt;ideasman42 at gmail.com&gt; hat geschrieben ----
>
> On Fri, Mar 13, 2015 at 9:19 AM, Robert Grah &lt;smilingmolecule at web.de&gt; wrote:
> &gt; Hey Campbell,
> &gt;
> &gt; thanks for your answer.
> &gt; It worked out quite well so far. Only two things are strange.
> &gt; The Python script gets started after the rendering and my commandline render result path gets ignored.
> &gt; Any ideas how i can change this?
> &gt;
> &gt;
> &gt; Seems that I maybee should start Blender in the background and let the python script do the other actions.
>
> Arguments are executed in the order given, so you could do,
>
> blender --background my.blend --python my.py --render-anim -- custom args
>
> But typically you wont want to render if the Python script has some
> exception mid-way,
> so you can call the render operator from the script:
>
>  bpy.ops.render.render(animation=True)
>
> Heres an example rendering from a script &amp; command line (uses blender
> as a batch image processor):
> https://gitlab.com/ideasman42/batch-compo/tree/master
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
>
>
>
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers



-- 
- Campbell


More information about the Bf-committers mailing list