blender-physics-simulation

Installation
SKILL.md

Blender Physics Simulation - traps

Traps 1-5 measured headless on Blender 5.1.2 (blender-round3 probes, 2026-11-08); trap 6 is the live-GUI crash from the round-3 ph2 run.

  1. Baking IS scriptable - but set cache_type first. Wrong: assuming bakes are UI-only, or baking a domain left at the default cache_type = 'REPLAY' - bpy.ops.fluid.bake_all() then writes ONE data file (frame 1) while has_cache_baked_data still reads True. Right: domain_settings.cache_type = 'ALL' (or 'MODULAR'), then with bpy.context.temp_override(active_object=domain, object=domain): bpy.ops.fluid.bake_all() (FINISHED, 5 vdb files for 5 frames at 16 divisions, 0.09 s). Rigid / particle / cloth point caches bake with bpy.ops.ptcache.bake_all(bake=True) (FINISHED, point_cache.is_baked True). Bakes block until done - keep scripted ones small. Verify: COUNT the files in [cache_directory]/data, never trust the baked flag.

  2. Rigid bodies only simulate when frames are stepped in order, or after a bake. Wrong: frame_set(1) then frame_set(20) - a falling cube stays at z = 5.0. Right: step 1..20 sequentially (z = 1.9425 at 20, 0.4983 at 40) or bake first. Verify: read obj.matrix_world.translation after the stepped frame_set.

Installs
11
GitHub Stars
18
First Seen
Aug 23, 2026