Add Modifier
tb.ops.modifier.add(
*,
type: str,
node: ObjectRef = ...,
name: str = ...,
settings: Any = ...,
index: int = ...,
) -> Result
Add a modifier to the object's stack: it goes above pinned modifiers (a curve generator goes below the mesh modifiers it feeds), gets a unique name and becomes the active modifier. One undo step.
Apply Modifier
tb.ops.modifier.apply(
*,
modifier: str,
node: ObjectRef = ...,
keep: bool = False,
render: bool = False,
) -> Result
Make a modifier's result the object's mesh and remove the modifier: only that modifier is evaluated, on the original mesh. On a curve object the first (curve-to-mesh) modifier converts the object to a mesh object; the curves are removed when no other object uses them. Refused for meshes shared by several objects and, for topology-changing modifiers, meshes with morph targets. One undo step.
Apply as Blendshape Target
tb.ops.modifier.apply_as_blendshape_target(
*,
modifier: str,
node: ObjectRef = ...,
keep: bool = False,
) -> Result
Store a deform modifier's result as a new blendshape target on the mesh and remove the modifier (keep: Save as Blendshape Target keeps it). Only modifiers that keep the topology. One undo step.
Bake Modifiers
tb.ops.modifier.bake(*, nodes: Any) -> Result
Bake all Model modifiers on the exact requested mesh objects in one transaction, retaining Control Rig entries, morph data and material bindings.
Bind Modifier
tb.ops.modifier.bind(
*,
modifier: str,
node: ObjectRef = ...,
unbind: bool = False,
) -> Result
Capture a binding modifier's data from its current input: Vertex Snap's welded target points, Volumetric Wrap's cage weights. The input is the stack evaluated up to the modifier. unbind clears the binding. One undo step.
Copy to Selected
tb.ops.modifier.copy_to_selected(*, modifier: str, node: ObjectRef = ...) -> Result
Copy a modifier from the active object to the other selected mesh objects. One undo step.
Duplicate Modifier
tb.ops.modifier.duplicate(*, modifier: str, node: ObjectRef = ...) -> Result
Copy a modifier with its settings right below itself. One undo step.
Flood Modifier Weights
tb.ops.modifier.flood_weights(
*,
modifier: str,
node: ObjectRef = ...,
operation: Literal["replace", "add", "subtract", "scale", "smooth"] = "replace",
value: float = 1.0,
strength: float = 1.0,
min: float = 0.0,
max: float = 1.0,
iterations: int = 1,
) -> Result
Apply a paint operation to a modifier's whole weight map: Replace moves every weight toward value by strength, Add / Subtract by value·strength, Scale erases by strength, Smooth blends each vertex toward its neighbours (iterations passes). Results are clamped to min..max. One undo step.
Modifier Stack
tb.ops.modifier.list(*, node: ObjectRef = ..., evaluate: bool = False) -> Result
The object's modifier stack, top to bottom, with each modifier's mode toggles and settings; with evaluate, also each modifier's last result (ran, off, error and why) and the evaluated vertex and face counts.
Load Modifier Stack
tb.ops.modifier.load_stack(
*,
text: str,
targets: Sequence[ObjectRef] = ...,
node: ObjectRef = ...,
mode: Literal["append", "replace"] = "append",
match: Literal["auto", "index", "position", "uv"] = "auto",
modifier: str = ...,
settings: bool = False,
) -> Result
Add the modifiers of a .tbmodifier document to the selected objects: 'append' adds them below the existing ones, 'replace' swaps the stack. Per-vertex weights follow 'match' (auto: by index when the vertex counts agree, else by nearest position; or index, position, uv). Objects the modifiers refer to are found by name. With 'modifier', only the file's weights go onto that existing modifier ('settings' also takes the settings both modifiers have). One undo step.
Move Modifier
tb.ops.modifier.move(
*,
modifier: str,
node: ObjectRef = ...,
direction: Literal["up", "down", "first", "last"] = ...,
index: int = ...,
) -> Result
Move a modifier up, down, to the top, bottom or a position in the stack (pinned modifiers stay last). One undo step.
Remove Modifier
tb.ops.modifier.remove(*, modifier: str, node: ObjectRef = ...) -> Result
Remove a modifier from the stack; the one above it becomes active. One undo step.
Save Modifier Stack
tb.ops.modifier.save_stack(
*,
node: ObjectRef = ...,
modifiers: Any = ...,
name: str = ...,
) -> Result
Write the object's modifiers (or the listed ones) as a .tbmodifier document: settings, mode toggles, per-vertex weights and bindings, with object references by name. Returns the document text and a file name; nothing in the scene changes.
Modifier Settings
tb.ops.modifier.set(
*,
modifier: str,
node: ObjectRef = ...,
settings: Any = ...,
controls: Any = ...,
name: str = ...,
envelope: float = ...,
pin_last: bool = ...,
expanded: bool = ...,
drag: int = ...,
) -> Result
Change a modifier's settings (merged over the current ones), name, envelope, pin or panel state. Each call is one undo step unless an explicit drag id joins one gesture. Slider previews accept as one undo step.
Set Active Modifier
tb.ops.modifier.set_active(*, modifier: str, node: ObjectRef = ...) -> Result
Make a modifier the active one (its panel is highlighted; Apply and keyboard actions use it).
Modifier Display
tb.ops.modifier.set_mode(
*,
modifier: str,
node: ObjectRef = ...,
flag: Literal["realtime", "render", "editMode", "onCage"],
value: bool = ...,
) -> Result
Turn a modifier's mode toggles on or off: Viewport (realtime), Render (export and bakes), Edit Mode, On Cage. Without value the toggle flips. One undo step.
Set Modifier Weights
tb.ops.modifier.set_weights(
*,
modifier: str,
node: ObjectRef = ...,
weights: Any = ...,
indices: Sequence[int] = ...,
values: Any = ...,
clear: bool = ...,
drag: int = ...,
) -> Result
Set a deform modifier's weight map: weights (every vertex), indices with values (just those vertices; the brush's stroke frames) or clear (unpainted: the full effect everywhere). Values are clamped to 0..1. One undo step; calls with the same drag id join one gesture.
Transfer Modifier Weights
tb.ops.modifier.transfer_weights(
*,
node: ObjectRef = ...,
modifier: str,
source_node: ObjectRef = ...,
source_modifier: str,
match: Literal["auto", "index", "position", "uv"] = "auto",
) -> Result
Copy another deform modifier's weight map without changing settings or geometry. Auto matches by vertex index when counts agree, otherwise nearest object-space position; UV uses each vertex's first corner. Unpainted maps remain full effect, and zero weights remain zero. One undo step.
Modifier Types
tb.ops.modifier.types() -> Result
Every modifier type: id, name, kind (deform, constructive…), which editor adds it (rigPointModifier: the Control Rig editor adds it as a point modifier on top of the skinning), default settings and the settings the panel shows.
Modifier Weight Maps
tb.ops.modifier.weight_maps(*, node: ObjectRef = ..., values: bool = False) -> Result
The paintable weight maps of the object's modifiers (<name>.weights: the per-vertex amount of each deform modifier), with whether each is painted and why one cannot be; values adds every map's weight per vertex (1 where unpainted).