Running a cell fracture script from command line and exporting a fractured object

Hi Blender Artists!

I’m developing a game and want to automatically generate fractured meshes for a given model. I’m new to Blender scripting so correct me if I’m wrong! I figured it should be done using a Blender batch script.

Here’s my idea of what a batch script should do:
1)Opens a .blend file
2)Selects an object (let’s assume there’s only one object on the scene)
3)Runs a Cell Fracture AddOn script
4)Saves a new .blend file with “_fractured” suffix.

Currently I’m running a batch script and using bpy.context.scene I access the object on a scene.
1)How do I run a Cell Fracture AddOn script on this object?
2)How do I export?

I’m not even sure if it’s possible using Blender Batch scripting - maybe I misunderstood the premise. Can you actually use any Blender function in batch script or does it only has access to limited functionality? Please, point me to some examples or tutorials (uncle Google failed me here!).

What would be the best is a direct debug view of all python functions executed during normal Blender interactions - automation in this way would be just copying the function calls from this debug window. Is there anything like that?

:slight_smile:

Hi, were you able to do the cell fracture automatic by any chance? :slight_smile:
I need to automate cell fracture and can’t find the proper documentation to activate and define function features in python script.