Nodes/Avatar Graph/Object Call Animation Data Create
ComfyUI Node

Object Call Animation Data Create

Giving an object somewhere to hang keyframes

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Call Animation Data Create
  • BPY_OBJ
  • BPY_OBJ

Another entry from the deep end of Avatar Graph (avatechai/avatar-graph-comfyui) - the pack better known for turning a single character portrait into a live, blinking, lip-syncing avatar. ObjectCall_AnimationDataCreate isn't part of that headline workflow; it's one of a large batch of nodes generated by wrapping Blender's bpy.types.Object API directly, method by method, into ComfyUI nodes. This one initializes the structure an object needs before it can be animated at all.

How it works

It maps to Blender's Object.animation_data_create(), an ID-level method: "create animation data to this ID, note that not all ID types support this." Every animatable object in Blender needs an animation_data block - the container that holds its active Action, NLA tracks, and drivers - and not every object has one by default. This call ensures it exists. It's idempotent: if the object already has animation data, calling it again just hands back the existing one instead of creating a duplicate.

Why you'd reach for it

It's the natural pair to ObjectCall_AnimationDataClear - clear first for a clean slate, then create to make sure the container exists before something else (a Shape Flow keyframe write, a driver assignment) tries to use it. On its own it doesn't make anything move; it just makes sure the plumbing an animation needs is present. If you're scripting a custom rig-init step that runs before Avatar Graph's Shape Flow system takes over, this is the kind of setup call you'd string in before it.

Inputs and outputs

One optional BPY_OBJ in, one BPY_OBJ out - the object passed straight through, unchanged in type. Like the rest of this node family, the underlying Blender call's return value (the AnimData struct itself) isn't exposed as a separate output wire; you get the object back, not a handle to the animation data block it just created.

Installing it

Avatar Graph depends on Blender's bpy package, which is strict about Python version - this isn't a drop-in-and-go pack. On Windows, the smoothest route is the author's bundled Python 3.10 environment (linked in their README), unzipped into your ComfyUI directory, run via the included .bat, then install "Avatar Graph" from ComfyUI Manager. On macOS/Linux, your ComfyUI environment needs to be Python 3.10.x exactly - conda makes pinning that easy (conda create --name comfyui python=3.10). From there: cd ComfyUI/custom_nodes, git clone https://github.com/avatechai/avatar-graph-comfyui.git - note their own README's manual-install instructions reference a different, stale org (avatechgg); the actual repo lives under avatechai. Then cd avatar-graph-comfyui && python -m pip install -r requirements.txt, and restart with python main.py --enable-cors-header (add --force-fp16 on Mac). The CORS flag lets Avatech's hosted viewer at editor.avatech.ai talk to your local ComfyUI instance; you don't need it if you're exporting .glb/.gltf files from Avatar Main Output instead of using the live browser preview.

Common issues

Same root cause as everywhere else in this pack: a Python version other than 3.10.x means bpy won't install or import, full stop - check that before anything else. Specific to this node, it's easy to misread success here as "it's animated now" - having animation_data doesn't mean the object plays anything; you still need to assign an Action, add keyframes, or attach drivers afterward for it to actually move. And as with the rest of this batch, there's no author documentation for this node at all - the README's own node table only covers the high-level rigging nodes (Create Mesh Layer, Create Shape Flow, Avatar Main Output, and similar), so this description comes from Blender's own API docs, not from Avatech.

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ