Object Call Camera Fit Coords
Auto-framing a camera around a set of points
- BPY_OBJ
- depsgraph
- coordinates
- BPY_OBJ
Like most of its neighbors, ObjectCall_CameraFitCoords is part of Avatar Graph's (avatechai/avatar-graph-comfyui) auto-generated wrapper layer around Blender's bpy.types.Object API - not part of the documented "turn a photo into a live avatar" workflow the pack is actually known for. It exists because the generator wrapped the whole Object API surface, camera-fitting method included.
How it works
It maps to Object.camera_fit_coords(depsgraph, coordinates), which Blender's docs describe as: "compute the coordinate (and scale for ortho cameras) given object should be to 'see' all given coordinates." In practice, this is Blender's "auto-frame the camera around these points" primitive - feed it a list of 3D coordinates (say, the corners of a mesh's bounding box) and, called on a camera object, it works out where that camera needs to sit and how zoomed it needs to be so everything is in view.
Why you'd reach for it
If you're scripting a step where the camera needs to automatically frame the generated avatar mesh - for example, always centering a preview render on the character regardless of how tall or wide it ends up - this is the underlying primitive for it. It's not something Avatar Graph's own documented node list (Create Mesh Layer, Create Shape Flow, Avatar Main Output, etc.) exposes a friendlier version of, so you'd be writing custom camera logic if you needed this.
Inputs and outputs
- BPY_OBJ (optional) - the camera object.
- depsgraph (optional, default
null) - the evaluated dependency graph the calculation runs against. - coordinates (optional, default
null) - the list of 3D points to fit the camera around. Worth flagging: in this pack's schema the key for this field literally ships with a leading space (" coordinates"), a visible seam from how the node generator scraped Blender's own docstrings. If it shows up blank, unlabeled, or oddly placed in the node's UI, that's why - not something you did wrong.
Output is a single BPY_OBJ, the object passed straight through. As with the rest of the ObjectCall_* family, the computed fit (position/scale) that Blender's real API returns doesn't come out as its own wire here - you can trigger the calculation, but you can't read the result from this node alone.
Installing it
Avatar Graph pulls in Blender's bpy module, which means a real install, not a drop-in. On Windows, grab the author's bundled Python 3.10 environment (linked in their README), unzip it into your ComfyUI folder, run the .bat, then install "Avatar Graph" via ComfyUI Manager. On macOS/Linux, pin your ComfyUI environment to Python 3.10.x exactly - conda is the simplest way (conda create --name comfyui python=3.10). Then cd ComfyUI/custom_nodes, git clone https://github.com/avatechai/avatar-graph-comfyui.git (their README's own manual-install command references a stale org, avatechgg - the repo lives under avatechai). cd avatar-graph-comfyui && python -m pip install -r requirements.txt, then restart with python main.py --enable-cors-header (Mac: also --force-fp16). That flag is what lets the hosted viewer at editor.avatech.ai exchange data with your local ComfyUI; skip it if you're exporting .glb/.gltf from Avatar Main Output instead.
Common issues
Python-version mismatch is the recurring blocker for the whole pack - bpy needs 3.10.x specifically. For this node in particular, watch for the malformed coordinates input key (the leading-space quirk above) - if a value you set there doesn't seem to bind, that's a known rough edge in how this schema was generated, not a sign you're using the node wrong. And since none of this is documented by Avatech - the README's node table stops at the high-level rigging nodes - Blender's own Object.camera_fit_coords() docs are the actual source of truth for exact behavior.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| depsgraphopt | depsgraph | — | |
| coordinatesopt | coordinates | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |