Use blender pyb module standalone

Good morning :slight_smile:

Mathieu from E_Cycles suggested to ask here my not so usual case (o;

Can the blender pyb API be used standalone from a Python script?

I have a special case where I want to generate loads of different objects belonging to a certain class like cup/mugs/glasses and apply programmatically different shapes, materials, background and camera position and later on batch render them.

Finally those images would be used for Tensorflow CNN training for object detection…

Or maybe it is possible to trigger such a script from inside blender and let it do all the work?

thanks in advance

It can certainly be triggered from inside Blender using the bpy API. I am not sure that you could generate a blend file from outside Blender, I have never tired that, I am not sure I would want to do that either as it would be far easier to debug and examine the output from within Blender.

Oh yes - Welcome to DevTalk!

What platform?

I have the experimental python module installable from pip for Windows 10 x86 & x64 Python 3.6.x

Love your idea!

Funny, just the other day I was just thinking about using Blender to generate training examples for an NN.

You can run python scripts or Blender text blocks from the command line without needing to build bpy as an external python module.
blender --help is your friend.