Object Set Use Simulation Cache
Making repeated avatar simulation runs fast
- BPY_OBJ
- BPY_OBJ
Object Set Use Simulation Cache is one of the Avatar Graph switches that looks like it does nothing and quietly saves you a bunch of recompute time. Avatech's pack rigs 2D character images into animatable avatars through an embedded Blender, and its ObjectSet_ family sets one property per node on the object arriving at BPY_OBJ. This one flips use_simulation_cache, which controls whether Blender caches an object's simulation to disk. Default here is true, and unlike a lot of flags in this pack, that default is the good one.
What it actually does
Blender simulations - particles, cloth, fluid, and in newer versions the simulation zones inside geometry nodes - have to be evaluated frame by frame. That's expensive, and it's pure waste when the inputs haven't changed and you just need to look at the result again. The use_simulation_cache flag tells Blender to write the simulation's computed state to a cache so it can be replayed instantly instead of recomputed. Flip it off and Blender recomputes the simulation from scratch every time it has to show you a frame.
For avatar work the relevance is indirect but real. If your character rig includes anything simulated - a cloth accessory, particle effects, hair - caching is what makes iterating on the rest of the graph tolerable, because the expensive part only computes once. It's the kind of thing you'd usually leave on and only turn off when a cached result is stale and won't refresh: the classic "why won't my sim update?" moment is usually this flag being on while the inputs changed. When that happens, toggling it off forces a fresh solve.
The inputs and outputs that matter
BPY_OBJ- the object whose simulation caching you're setting.value- boolean, defaulttrue.falsedisables caching (and forces recompute).
Output is the same BPY_OBJ, passed on to the next node.
How to install it
Part of the Avatar Graph pack - ComfyUI Manager, search "Avatar Graph", or:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
pip install -r requirements.txt
restart ComfyUI. Pack-wide snag: bpy==3.6.0 only has wheels for Python 3.10.x, so the pip install fails on newer Python. python=3.10 conda env on Linux/macOS, Avatech's prebuilt Python-3.10 ComfyUI zip on Windows.
Gotchas
The realistic failure mode is staleness, not speed: leave caching on, change the geometry the simulation depends on, and the cached result keeps showing up instead of the new one. If a sim looks frozen or wrong after you've edited the rig, check this flag before you suspect the math - forcing it off for one run usually clears the cache and recomputes. For avatars with no simulation at all, the node is inert, which is why it's easy to assume it never mattered.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| valueopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |