Object Transform Apply
Baking transforms before the hard part
- BPY_OBJ
- BPY_OBJ
Every Blender user knows the reflex: you rotate and scale a mesh, then hit Ctrl+A → Apply so the object's transform gets baked into its actual geometry and the transform fields go back to identity. Object Transform Apply is that same operator (bpy.ops.object.transform_apply()) exposed as an Avatar Graph node, and in a rigging pipeline it's the quiet cleanup step that prevents a world of pain later.
Why it matters here specifically: this pack builds a character mesh, then deforms it with shape keys and drives it through the shape-flow runtime. Shape keys and deformers assume a predictable object transform. If your mesh is sitting at a weird rotation or scale, deformations get compounded in confusing ways and the exported avatar misbehaves. Baking the transform makes the mesh's local space sane before the "hard part" - and every node in this pack is a thin wrapper around a real Blender 3.6 operator running in the embedded headless Blender, so this behaves exactly like the Blender button.
The four boolean inputs mirror the operator's checkboxes, all defaulting to true: location, rotation, and scale are the transforms to bake, and properties bakes the object's custom properties along with them. In practice you leave all four on for a full clean-up. isolate_users (default false) is the subtle one - when true, it makes the object a single user of its data before applying, so if other objects share the same mesh, your bake doesn't silently rewrite their data too. Worth flipping on if you've duplicated anything.
Input is your BPY_OBJ; output is the same object, baked and ready to keep flowing down the graph.
Install is pack-wide: ComfyUI Manager → "Avatar Graph", or git clone https://github.com/avatechai/avatar-graph-comfyui into ComfyUI/custom_nodes and pip install -r requirements.txt. You need Python 3.10 (bpy==3.6.0), and the first launch pulls the ~2.4 GB SAM model plus mediapipe landmarkers.
Where people get burned: applying rotation on an object that's going to be animated (like an armature child) bakes the orientation in and can fight with later rigging - so apply early, at build time, not after you've started animating. And there's a sibling trap: Object Unlink Data exists separately because this node's isolate_users only isolates when you ask it to; if you skip it on a shared mesh, the bake ripples through every object using that data. The fix is in the flag, not the graph. Like everything here, the scene rebuilds each run - so the bake is per-run, which is fine, because the whole pipeline is per-run.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| locationopt | BOOLEAN | true | — |
| rotationopt | BOOLEAN | true | — |
| scaleopt | BOOLEAN | true | — |
| propertiesopt | BOOLEAN | true | — |
| isolate_usersopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |