ComfyUI Node
CV Parse Object Transform
Reads an 'object_transform' JSON string back into the graph as a 4x4 - the return leg of 'CV 3D Object Transform'. The viewer's move/rotate/scale GIZMO writes that widget as you drag, so this is how a placement found BY HAND becomes data: wire (or paste) the string here and the mesh, the annotation anchors and the silhouette all follow the model you parked. Never raises - an unreadable string reports valid=false and returns identity, so a half-typed widget cannot halt a run. What comes back is the whole placement as one rotation: a string written by 'CV 3D Object Transform' with 'model_up' set parses to the COMBINED turn, not to that dropdown plus the rotate_* values separately.
CV Parse Object Transform
- matrix
- position
- quaternion
- scale
- valid
◄object_transform►
◄spaceOpenCV (Y down, Z into the scene)►
Categoryimage/CV/low-level
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| object_transform | STRING | The JSON from the viewer's object_transform widget: position, quaternion [x, y, z, w] and scale, in Three.js world space. Scale may be a single number and missing keys default to identity, exactly as the renderer reads it. Empty is identity and counts as VALID - that is what an untouched widget holds. | |
| space | COMBO | OpenCV (Y down, Z into the scene) | Coordinate system for ALL the outputs. Match it to 'CV Mesh From 3D Model'.axis_convention so the matrix applies to that mesh directly; the input string itself is always Three.js. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| matrix | NPARRAY | 4x4 float64 model matrix in the selected space, ready for 'CV Transform Points 3D'. |
| position | NPARRAY | 1-D [x, y, z] translation, in the selected space. |
| quaternion | NPARRAY | 1-D unit quaternion [x, y, z, w] of the rotation, in the selected space (conjugated by the axis flip when that is OpenCV, so it recomposes 'matrix' together with 'position' and 'scale'). |
| scale | NPARRAY | 1-D per-axis [x, y, z] scale. The gizmo can scale non-uniformly, so this is a vector even though 'CV 3D Object Transform' only emits uniform ones. |
| valid | BOOLEAN | False when the string could not be read as an object_transform - the other outputs are then identity. Wire it to an 'If/Else Switch' to fall back to a preset placement instead of rendering the model at the origin. |