Skip to main content

Module ops

Module ops 

Source
Expand description

High-level operations on a Project. This is the single API surface shared by CLI, MCP server and GUI.

Structs§

Pose
Per-joint local-transform overrides produced by animating a skeleton.

Constants§

MAX_PAINT_CELLS
Upper bound for one paint operation (fill_rect, paint_line): keeps a bogus coordinate range from an agent or file from allocating without bound. Generous for real tilemaps (1000×1000 cells).

Functions§

add_humanoid
add_joint
add_keyframe_joint
add_keyframe_node
add_node
add_primitive
add_primitive_with_material
Like add_primitive, but immediately assigns a material to the instance.
add_skeleton_instance
add_tile_mesh
Register an existing mesh asset as a tile. Returns the tile index.
add_tile_primitive
Generate a primitive mesh and register it as a tile. Returns the tile index.
auto_bind
Bind a mesh instance to a skeleton instance with automatic weights: each vertex is influenced by its two nearest joints with distance falloff.
create_animation
Create an empty reusable animation asset.
create_tilemap
Create a tilemap asset and an instance node for it.
create_tileset
Create an empty tileset with the given cell size (X width, Z depth).
get_transform
joint_global
Global joint transform under a pose (skeleton space).
joint_local
Effective local transform of a joint given a pose (falls back to bind pose).
joint_world_position
World-space bind-pose position of a joint of a skeleton instance node.
sample_pose
Sample anim at time t and resolve joint-name targets against the skeleton instance skel_node (retargeting). Unknown joint names are skipped.
set_node_material
Attach a material to an existing mesh instance node.
set_tile_motion
Give one tile a procedural motion (all of its cells animate alike, phase-staggered per cell in the viewer).
set_transform
skeleton_of
Skeleton asset referenced by a skeleton-instance node.
skinned_positions
CPU linear blend skinning: returns deformed positions in the mesh node’s local space (apply the mesh node’s world transform on top for world space). Used by the viewer; exporters keep the skin data instead.
skinning_matrices
World-space skinning matrices (global joint transform, relative to mesh node) for a mesh bound to skel_node, under pose.
tilemap_clear
Remove all cells. Returns the count.
tilemap_erase
Remove one cell; returns whether anything was there.
tilemap_fill_rect
Paint an inclusive rectangle of cells. Returns how many cells were written. Capped at MAX_PAINT_CELLS so a bogus range from an agent or file cannot allocate without bound.
tilemap_set_cell
Paint one cell.
world_transform