To export in background mode you need to put something like the
following in a .bat file:
@echo off
set chicken_sel=Object1,Object2
set chicken_anims=anim1,30,1,85;anim2,40,1,90
"c:\Program Files\Blender Foundation\Blender\blender.exe" -b
myblendfile.blend -P "c:\Program Files\Blender
Foundation\Blender\.blender\scripts\chicken_export1.0.py"
pause
This can be easilly addapted to Linux by using 'export' instead of 'set'.
Currently the most practical way to pass parameters to a Blender script running in background mode is through environment variables. Considered environment variables include (Though arn't limited to):
- chicken_sel: This defines your selection as a list of object names separated by commas. If this variable is not specified, the objects which were saved as selected will be used as the selection.
- chicken_anims: This defines the animations you want to export as a list of four values (name, fps, start_frame, end_frame) separated by commas. Multiple animations can be specified by separating them with semicolons.
- chicken_mextract: True or False - to enable/disable motion extraction.
- chicken_animonly: True or False - to enable/disable outputting animations only - makes sense only if in multiple file mode, i.e. chicken_singlefile=False.
- chicken_singlefile: True or False - to enable/disable single file output.
- chicken_dotangents: True or False - to enable/disable generating tangents/binormals in blender rather than using the egg tools.
- chicken_octree: True or False - to enable/disable running the octree tool.
- chicken_octreecollision: True or False - False to tune octree constructions for graphical presentation, True to build the octree in a way suitable for collision detection.
- chicken_forceRelTex: True or False - to enable/disable automatic conversion of texture paths to relative file names.
- chicken_pview: True or False - to run pview or not - exposed for completness, your not actually meant to set it to True.
- chicken_bam: True or False - toggles conversion of egg file to bam.
- chicken_optchar: True or False - toggles the character optimisation tool.
- chicken_optparms: Parameters for if optchar is true.