-P examples?

HI all,

I’m interested in playing with the new -P batch mode option.
I haven’t used python in blender for so long that, at this point,
I would learn better by example than I would by reading the API
spec. I was wondering if there were any good example scripts
for running in batch mode that do things like: start blender, add
an object, add a camera, render a frame, save rendered image,
and quit.


P.S. My apologies for cross-posting this on w.b.o.

Hos?!?!? Posting a question?!?!?

actually, on elysiun I haven’t heard anyone mention the new -P option

I had noticed it when looking for a way to export a file from the commandline without user intervention. I think my method is a bit kludgy using -P and an option for command line rendering so the blender UI doesn’t start [I merely ramble about how to get a script to run, I assume a text file in blender specifies info about what to export and such]


Hi z3ro d,

Thanks for the link. I find it really odd that there is so
little information about the -P flag… maybe it is something
that somebody started coding, then lost interest?

Anyways, I’ve been playing around a bit and it seems that
-P is really buggy and unusable anyways. For example, if
I try to get it to render using the python api:

import Blender
from Blender import *
from Blender.Scene import Render
scn = Scene.GetCurrent()
context = scn.getRenderingContext()

When that is executed from the commandline in batch mode it
fails because there is no render window open (I think).

Oh well, maybe it will eventually be developed into something
usable …