controlrig
CRIR text for Control Rig (RigVM) graphs and rig hierarchy.
What it’s for
This namespace turns a Control Rig Blueprint into readable text and back again. CRIR is the RigVM-graph equivalent of BPIR for Blueprints or MGIR for materials: it captures the executable graph, the per-asset function library, nested subgraphs, and the rig-element hierarchy (bones, nulls, controls, sockets) as a single text document your assistant can read, edit, and recompile.
Use it when you want to author or review a rig as text rather than clicking through the Control Rig editor: adding rig units, rewiring pins, bulk-rebinding a pin across many rigs, diffing a rig change in version control, or dropping a procedurally generated graph into the editor in one call. A decompile round-trips logically, so recompiling decompiled text lands the same nodes at the same coordinates.
Reach for animation.authoring instead when the work is not graph-shaped —
creating a Control Rig asset from scratch, building an IK Rig, or setting up an IK Retargeter live
there. This namespace is for the graph and hierarchy content of a rig that already exists.
TODO markers rather than
round-tripping, so review the reported warnings after a compile or decompile.
Examples
Read a rig graph as text
Decompile the rig so the assistant can see exactly what the graph and hierarchy contain before touching them.
You: Show me what's in the control rig CR_Mannequin.
call("controlrig.decompile_crir", {assetPath:"/Game/Characters/CR_Mannequin"})
→ {assetPath:"/Game/Characters/CR_Mannequin", text:"rig_graph \"RigVMModel\" { ... }", warnings:[]}
Done. Decompiled CR_Mannequin to CRIR, no unsupported elements.
Add nodes to an existing rig
Compile a CRIR fragment into the rig; extend mode appends the new nodes without clearing what is already there.
You: In CR_Mannequin, add a rig unit and auto-place it.
call("controlrig.compile_crir", {context:"/Game/Characters/CR_Mannequin",
text:"rig_graph \"RigVMModel\" { unit GetTransform() }",
mode:"extend", runLayout:true, save:true})
→ {mode:"extend", assetPath:"/Game/Characters/CR_Mannequin", blocksCompiled:1, nodesCreated:1, warnings:[]}
Done. Added and positioned the node, saved the asset.
Replace a rig graph from edited text
Decompile, hand the assistant the edited text, and recompile in replace mode to swap the graph for the new version.
You: Rewire the arm control's input to the shoulder null in CR_Mannequin.
call("controlrig.decompile_crir", {assetPath:"/Game/Characters/CR_Mannequin"})
→ {assetPath:"/Game/Characters/CR_Mannequin", text:"rig_graph \"RigVMModel\" { ... }", warnings:[]}
call("controlrig.compile_crir", {context:"/Game/Characters/CR_Mannequin",
text:"rig_graph \"RigVMModel\" { ... wire_in_Transform=%shoulderNull.Transform }",
mode:"replace", save:true})
→ {mode:"replace", assetPath:"/Game/Characters/CR_Mannequin", blocksCompiled:1, nodesCreated:6, warnings:[]}
Done. Arm control now reads from the shoulder null.