Nodes/Avatar Graph/Object Call Update From Editmode
ComfyUI Node

Object Call Update From Editmode

Object Call Update From Editmode — ComfyUI Node from Avatar Graph

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Call Update From Editmode
  • BPY_OBJ
  • BPY_OBJ

Avatar Graph is Avatech AI's pack for turning a single character portrait into a real-time interactive 2D avatar - automatic eye blinks, lip sync - running on Blender's Python engine (bpy) with the pack's own "Shape Flow" runtime driving shape keys at playback time. Object Call Update From Editmode is part of the large ObjectCall_* family that exposes Blender's bpy.types.Object API roughly one method per node, none of it called out individually in the README's own node table - and this one wraps a genuinely fiddly corner of Blender's data model that's worth understanding correctly rather than guessing at.

Blender keeps two representations of a mesh's data in sync only at specific moments: the "clean" object-mode mesh data, and a separate bmesh representation used while you're actually in Edit Mode. Changes made through edit-mode tooling (or, in a scripted context, through bmesh operations) don't automatically propagate back to the object's real mesh data - they live in that edit-mode working copy until something flushes them. object.update_from_editmode() is that flush: it pushes whatever's currently in the object's edit-mode data back into its actual mesh, so that subsequent bpy calls operating outside of edit mode (shape key operations, to_mesh(), export) see the up-to-date result rather than stale data.

In practice, this matters specifically to scripted pipelines that manipulate mesh data via bmesh while nominally in edit mode - if a workflow does that kind of low-level mesh editing anywhere in its custom logic, this node is the step that makes those edits visible to everything downstream. If your Avatar Graph workflow sticks to the pack's own high-level nodes (Create Mesh Layer, Mesh Modify Shape Key, and the like) without any custom bmesh scripting, you're unlikely to ever need it.

Schema is minimal: just BPY_OBJ in (optional per the schema, but there's nothing to flush without an object wired in from upstream) and BPY_OBJ out, same handle passed through, now synced. No configurable fields, matching Blender's own no-argument call.

Installing it means installing the whole Avatar Graph pack. Via ComfyUI Manager: search "Avatar Graph" and install. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/avatechai/avatar-graph-comfyui, then cd avatar-graph-comfyui && pip install -r requirements.txt, restart. bpy needs Python 3.10.x exactly, so the README's push toward a dedicated conda create --name comfyui python=3.10 environment instead of reusing an existing Flux/SDXL setup is worth heeding. Restart with --enable-cors-header (--force-fp16 too on macOS) for the live avatar preview.

Troubleshooting: bpy failing to import at startup because ComfyUI's Python isn't exactly 3.10.x is the wall you're most likely to actually hit - a common, recurring problem across Blender-Python-based ComfyUI nodes generally, not specific to this one. The node-specific symptom to watch for is the opposite of a crash: if downstream shape-key or mesh-export steps seem to be working off stale geometry after some kind of edit-mode manipulation earlier in the graph, a missing Update From Editmode call is exactly the kind of silent desync that would cause it. --enable-cors-header only affects the live preview panel, not this node's behavior.

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ