26 Jan 2021 mamik77777 Open Simulation mamik77777 Lauloque zhixson.xbdi Simulation Published 26 Jan 2021 Bake physics from command line Could be useful to bake physics from the command line. Thanks 100% Development Status: Open Upvote 3 Downvote 0 m mamik77777 26 Jan 2021 4 Comments P PTCreative 27 Jan 2021 Hi, pretty much anything can be done form command line. In this case you'll want use a python expression. In your teminal/command prompt try ; "your path to blender.exe" -b "path to your .blend file" --python-expr-- "import bpy; bpy.ops.ptcache.bake_all()" This example is for particles and cloth, you'l also need to enable disk cache beforehand so you can load the cache files having not saved them internally. docs.blender.org/manual/en/latest/advanced/command_line/render.html L Lauloque 28 Jan 2021 * @PTCreative * I've never seen the --python-expr-- argument in use, and I wish I had sooner! Where is this in the manual? Anyways, I think things as baking deserve their own dedicated command lines as much as rendering, so I upvote this right away. P PTCreative 1 Feb 2021 * @-L0Lock- * Here's the full list docs.blender.org/manual/en/latest/advanced/command_line/arguments.html L Lauloque 1 Feb 2021 * @PTCreative * i know that page, the issue is it just shows the command, not how to write the python lines nor the limitations
4 Comments
Hi, pretty much anything can be done form command line. In this case you'll want use a python expression. In your teminal/command prompt try ;
"your path to blender.exe" -b "path to your .blend file" --python-expr-- "import bpy; bpy.ops.ptcache.bake_all()"
This example is for particles and cloth, you'l also need to enable disk cache beforehand so you can load the cache files having not saved them internally. docs.blender.org/manual/en/latest/advanced/command_line/render.html
* @PTCreative * I've never seen the --python-expr-- argument in use, and I wish I had sooner! Where is this in the manual?
Anyways, I think things as baking deserve their own dedicated command lines as much as rendering, so I upvote this right away.
* @-L0Lock- * Here's the full list docs.blender.org/manual/en/latest/advanced/command_line/arguments.html
* @PTCreative * i know that page, the issue is it just shows the command, not how to write the python lines nor the limitations