Skip to content
AlphaToolBox3D is in early alpha: features are incomplete and things can break. Use it at your own risk and keep copies of your files. Report a problem
ToolBox3D

Docs · Python API

tb.ops.sculpt

55 operations. Without targets=, an operation works on the current selection, like its button in the editor.

Sculpt Blendshape Target

tb.ops.sculpt.blendshape.set_target(*, target: str = "") -> Result

Sculpt a blendshape target (shown at full strength, the other targets off) or the Base: strokes then move only that target, the Base and the other targets stay. Dynamic topology must be off (a target is indexed by the mesh's vertices). Changing what is sculpted is undoable.

  • Operation sculpt.blendshape.set_target
  • In Model
ArgumentTypeDefaultDescription
targetstr""Blendshape target name, id or index; empty for the Base.

Get Sculpt Brush

tb.ops.sculpt.brush.get(*, brush: str = ...) -> Result

A brush's full settings ({stroke, sculpt}).

  • Operation sculpt.brush.get
  • In Model
ArgumentTypeDefaultDescription
brushstr—Built-in brush id (sculpt.brush), kind (brush, clay, move) or name; named personal presets use presets.apply.

Sculpt Brushes

tb.ops.sculpt.brush.list() -> Result

Built-in working brushes with their kind and category; named personal presets use presets.list.

  • Operation sculpt.brush.list
  • In Model

Reset Sculpt Brush

tb.ops.sculpt.brush.reset(*, brush: str = ...) -> Result

Restore a built-in brush's default settings.

  • Operation sculpt.brush.reset
  • In Model
ArgumentTypeDefaultDescription
brushstr—Built-in brush id (sculpt.brush), kind (brush, clay, move) or name; named personal presets use presets.apply.

Select Sculpt Brush

tb.ops.sculpt.brush.select(*, brush: str) -> Result

Make a brush the active one.

  • Operation sculpt.brush.select
  • In Model
ArgumentTypeDefaultDescription
brushstrrequiredBuilt-in brush id (sculpt.brush), kind (brush, clay, move) or name; named personal presets use presets.apply.

Set Sculpt Brush

tb.ops.sculpt.brush.set(*, brush: str = ..., settings: Any) -> Result

Change a brush's settings with a patch {stroke: {size, opacity, hardness, spacing, falloff, strokeMethod, dynamics, stabilizer, …}, sculpt: {autoSmooth, normalRadius, planeOffset, layerHeight, automask: {…}, …}}.

  • Operation sculpt.brush.set
  • In Model
ArgumentTypeDefaultDescription
brushstr—Built-in brush id (sculpt.brush), kind (brush, clay, move) or name; named personal presets use presets.apply.
settingsAnyrequiredSettings patch.

Cloth Filter

tb.ops.sculpt.cloth.filter(
    *,
    filter: Literal["gravity", "inflate", "expand", "pinch", "scale"] = "gravity",
    strength: float = 0.5,
    steps: int = 20,
    damping: float = 0.05,
    collisions: bool = False,
    persistent: bool = False,
) -> Result

Simulate the whole mesh as cloth for a number of steps: gravity drapes it over the masked (pinned) parts, inflate / expand / pinch push it, scale grows or shrinks it while edges keep their length. One undo step.

  • Operation sculpt.cloth.filter
  • In Model
ArgumentTypeDefaultDescription
filterLiteral["gravity", "inflate", "expand", "pinch", "scale"]"gravity"Filter (gravity / inflate / expand / pinch / scale).
strengthfloat0.5Force, −1..1. (-1…1).
stepsint20Simulation steps. (1…500).
dampingfloat0.05Velocity lost per step. (0…1).
collisionsboolFalseCollide with the other visible objects.
persistentboolFalseRelax towards the persistent base (sculpt.cloth.persistent_base) instead of the current shape.

Set Persistent Base

tb.ops.sculpt.cloth.persistent_base(*, clear: bool = False) -> Result

Store the current shape as the cloth's persistent base: Cloth strokes and the cloth filter with Persistent on measure lengths and Pin from it, so stroke after stroke relaxes towards it. Kept until cleared or the topology changes.

  • Operation sculpt.cloth.persistent_base
  • In Model
ArgumentTypeDefaultDescription
clearboolFalseForget the stored base.

Color Filter

tb.ops.sculpt.color.filter(
    *,
    filter: Literal["fill", "hue", "saturation", "value", "brightness", "contrast", "smooth", "red", "green", "blue"] = "fill",
    strength: float = 1.0,
    color: Any = ...,
) -> Result

Change the painted vertex colors of every visible, unmasked vertex: fill with a color, shift hue / saturation / value, brightness / contrast, smooth (negative: sharpen) or raise one channel. Creates the color attribute when the mesh has none.

  • Operation sculpt.color.filter
  • In Model
ArgumentTypeDefaultDescription
filterLiteral["fill", "hue", "saturation", "value", "brightness", "contrast", "smooth", "red", "green", "blue"]"fill"Filter (fill / hue / saturation / value / brightness / contrast / smooth / red / green / blue).
strengthfloat1.0−1..1 (fill uses 0..1 as the blend towards the color). (-1…1).
colorAny—Fill color, sRGB [r, g, b] 0–1 or "#rrggbb" (default white).

Sample Color

tb.ops.sculpt.color.sample(
    *,
    point: Any = ...,
    view: Any = ...,
    x: float = ...,
    y: float = ...,
    apply: bool = True,
) -> Result

The painted color on the surface at a point (or under a screen position); apply (default) makes it the Paint brush color.

  • Operation sculpt.color.sample
  • In Model
ArgumentTypeDefaultDescription
pointAny—Mesh-space [x, y, z] on (or near) the surface.
viewAny—Camera for screen coordinates: {viewProj: [16 numbers, column-major, mesh space → clip], size: [w, h] px, eye: [x, y, z, w] (w = 1 perspective position, 0 orthographic direction towards the camera), unitsPerWorld?: number}.
xfloat—Screen x (px) with view.
yfloat—Screen y (px, +y down) with view.
applyboolTrueSet the Paint brush color.

Sculpt

tb.ops.sculpt.commit(*, staged: int) -> Result

Writes a staged sculpt session result into the document (one undo step). Sculpt mode calls it when it applies; the staged token works once.

  • Operation sculpt.commit
  • In Model
ArgumentTypeDefaultDescription
stagedintrequiredStaged (1…9007199254740991).

Sculpt Display

tb.ops.sculpt.display.set(
    *,
    color: bool = ...,
    mask: bool = ...,
    mask_opacity: float = ...,
    face_sets: bool = ...,
    face_set_opacity: float = ...,
) -> Result

Painted colors, mask and face-set overlay visibility and opacity.

  • Operation sculpt.display.set
  • In Model
ArgumentTypeDefaultDescription
colorbool—Show painted vertex colors.
maskbool—Mask.
mask_opacityfloat—Mask Opacity (0…1).
face_setsbool—Face Sets.
face_set_opacityfloat—Face Set Opacity (0…1).

Dynamic Topology

tb.ops.sculpt.dyntopo.set(
    *,
    enabled: bool = ...,
    mode: Literal["relative", "constant", "brush"] = ...,
    detail_px: float = ...,
    detail_size: float = ...,
    brush_percent: float = ...,
    refine: Literal["subdivide-collapse", "subdivide", "collapse"] = ...,
) -> Result

Dynamic topology: brushes add and remove triangles to keep edges near the detail size. Turning it on triangulates the mesh.

  • Operation sculpt.dyntopo.set
  • In Model
ArgumentTypeDefaultDescription
enabledbool—Enabled.
modeLiteral["relative", "constant", "brush"]—Mode (relative / constant / brush).
detail_pxfloat—Detail Px (0.5…100).
detail_sizefloat—Detail Size (0.000001…1000000).
brush_percentfloat—Brush Percent (1…100).
refineLiteral["subdivide-collapse", "subdivide", "collapse"]—Refine (subdivide-collapse / subdivide / collapse).

Sculpt Mode

tb.ops.sculpt.enter(
    *,
    node: ObjectRef = ...,
    mesh_id: MeshRef = ...,
    brush_type: Literal["clay", "brush", "move", "drag", "smooth", "layer", "inflate", "nudge", "stamp", "del-layer", "displacement-erase", "displacement-smear", "flatten", "planar", "crease", "pinch", "mask", "facegroup", "paint", "smudge", "pose", "boundary", "cloth"] = ...,
    radius: float = ...,
    strength: float = ...,
) -> Result

Start sculpting the selected mesh object. The mesh is copied once into a sculpt session; strokes and sculpt edits stay in it (with their own undo steps) until you leave sculpt mode, which writes them back as one undo step.

  • Operation sculpt.enter
  • In Model
ArgumentTypeDefaultDescription
nodeObjectRef—The mesh object to sculpt (default: the selected one).
mesh_idMeshRef—The mesh to sculpt; uses an object placing that mesh.
brush_typeLiteral["clay", "brush", "move", "drag", "smooth", "layer", "inflate", "nudge", "stamp", "del-layer", "displacement-erase", "displacement-smear", "flatten", "planar", "crease", "pinch", "mask", "facegroup", "paint", "smudge", "pose", "boundary", "cloth"]—Brush kind to start with.
radiusfloat—Brush radius in mesh units (switches the brush to world size). (0.000001…1000000).
strengthfloat—Brush strength 0–1. (0…1).

Leave Sculpt Mode

tb.ops.sculpt.exit(*, apply: bool = True) -> Result

Leave sculpt mode. apply (default) writes the session back as one undo step; apply: false discards every change made in this session.

  • Operation sculpt.exit
  • In Model
ArgumentTypeDefaultDescription
applyboolTrueKeep the sculpting (true) or discard it (false).

Create Face Sets

tb.ops.sculpt.face_sets.create(
    *,
    source: Literal["masked", "visible", "loose-parts", "normals", "materials", "all"],
    angle: float = 30.0,
) -> Result

Group faces into new face sets.

  • Operation sculpt.face_sets.create
  • In Model
ArgumentTypeDefaultDescription
sourceLiteral["masked", "visible", "loose-parts", "normals", "materials", "all"]requiredSource (masked / visible / loose-parts / normals / materials / all).
anglefloat30.0By Normals: the largest angle between neighbouring faces of one set (degrees). (0…180).

Face Set from Selection

tb.ops.sculpt.face_sets.from_selection() -> Result

The selected faces (component selection) become a new face set.

  • Operation sculpt.face_sets.from_selection
  • In Model

Grow Face Set

tb.ops.sculpt.face_sets.grow(*, face_set: int) -> Result

Grow a face set by one ring of faces.

  • Operation sculpt.face_sets.grow
  • In Model
ArgumentTypeDefaultDescription
face_setintrequiredFace Set.

Randomise Face Set Colors

tb.ops.sculpt.face_sets.randomize() -> Result

Pick new display colors for every face set.

  • Operation sculpt.face_sets.randomize
  • In Model

Shrink Face Set

tb.ops.sculpt.face_sets.shrink(*, face_set: int) -> Result

Shrink a face set by one ring of faces.

  • Operation sculpt.face_sets.shrink
  • In Model
ArgumentTypeDefaultDescription
face_setintrequiredFace Set.

Mesh Filter

tb.ops.sculpt.filter(
    *,
    filter: Literal["inflate", "smooth", "scale", "sphere", "random", "relax", "sharpen"],
    strength: float = 0.5,
    seed: int = 0,
) -> Result

Apply a filter to every unmasked vertex: inflate, smooth, scale, sphere, random, relax or sharpen.

  • Operation sculpt.filter
  • In Model
ArgumentTypeDefaultDescription
filterLiteral["inflate", "smooth", "scale", "sphere", "random", "relax", "sharpen"]requiredFilter (inflate / smooth / scale / sphere / random / relax / sharpen).
strengthfloat0.5Strength (-1…1).
seedint0Seed (0…4294967295).

Apply Sculpting

tb.ops.sculpt.flush() -> Result

Write the session's changes to the document now (one undo step) and keep sculpting.

  • Operation sculpt.flush
  • In Model

Hide Face Set

tb.ops.sculpt.hide.face_set(*, face_set: int, isolate: bool = False) -> Result

Hide a face set, or isolate it (hide everything else).

  • Operation sculpt.hide.face_set
  • In Model
ArgumentTypeDefaultDescription
face_setintrequiredFace Set.
isolateboolFalseIsolate.

Box / Lasso Hide

tb.ops.sculpt.hide.gesture(*, polygon: Any, view: Any, show: bool = False) -> Result

Hide (or show) faces inside a screen polygon.

  • Operation sculpt.hide.gesture
  • In Model
ArgumentTypeDefaultDescription
polygonAnyrequiredClosed screen polygon [[x, y], …] in px (+y down); a box is its 4 corners.
viewAnyrequiredCamera for screen coordinates: {viewProj: [16 numbers, column-major, mesh space → clip], size: [w, h] px, eye: [x, y, z, w] (w = 1 perspective position, 0 orthographic direction towards the camera), unitsPerWorld?: number}.
showboolFalseShow.

Invert Visibility

tb.ops.sculpt.hide.invert() -> Result

Hide what is visible and show what is hidden.

  • Operation sculpt.hide.invert
  • In Model

Hide Masked

tb.ops.sculpt.hide.masked(*, masked: bool = True) -> Result

Hide the masked faces (or the unmasked ones).

  • Operation sculpt.hide.masked
  • In Model
ArgumentTypeDefaultDescription
maskedboolTrueMasked.

Show All

tb.ops.sculpt.hide.show_all() -> Result

Reveal every hidden face.

  • Operation sculpt.hide.show_all
  • In Model

Sculpt on Layer

tb.ops.sculpt.layer.activate(*, layer: int) -> Result

Choose where strokes go: a sculpt layer, or the base mesh (layer 0). Changing targets is undoable.

  • Operation sculpt.layer.activate
  • In Model
ArgumentTypeDefaultDescription
layerintrequiredLayer id, 0 for the base mesh. (0…4294967295).

Add Sculpt Layer

tb.ops.sculpt.layer.add(*, name: str = "Layer") -> Result

Add an empty sculpt layer on top and sculpt on it: strokes are recorded in the layer, whose strength and visibility can change later (Nomad layers).

  • Operation sculpt.layer.add
  • In Model
ArgumentTypeDefaultDescription
namestr"Layer"Layer name (made unique).

Apply All Sculpt Layers

tb.ops.sculpt.layer.apply_all(*, mesh: MeshRef = ...) -> Result

Merge every sculpt layer into the base mesh; the surface does not change.

  • Operation sculpt.layer.apply_all
  • In Model
ArgumentTypeDefaultDescription
meshMeshRef—Mesh whose layers to edit (default: the selected mesh object).

Sculpt Layers

tb.ops.sculpt.layer.list(*, mesh: MeshRef = ...) -> Result

List the mesh's sculpt layers (bottom first) with their strength, visibility and the color attributes each holds paint for.

  • Operation sculpt.layer.list
  • In Model
ArgumentTypeDefaultDescription
meshMeshRef—Mesh whose layers to edit (default: the selected mesh object).

Merge Sculpt Layer Down

tb.ops.sculpt.layer.merge_down(*, mesh: MeshRef = ..., layer: int) -> Result

Merge a sculpt layer into the layer below it (the bottom layer merges into the base mesh); the surface does not change.

  • Operation sculpt.layer.merge_down
  • In Model
ArgumentTypeDefaultDescription
meshMeshRef—Mesh whose layers to edit (default: the selected mesh object).
layerintrequiredLayer id (from sculpt.layer.list). (1…4294967295).

Move Sculpt Layer

tb.ops.sculpt.layer.move(
    *,
    mesh: MeshRef = ...,
    layer: int,
    direction: Literal["up", "down"],
) -> Result

Move a sculpt layer up or down the list.

  • Operation sculpt.layer.move
  • In Model
ArgumentTypeDefaultDescription
meshMeshRef—Mesh whose layers to edit (default: the selected mesh object).
layerintrequiredLayer id (from sculpt.layer.list). (1…4294967295).
directionLiteral["up", "down"]requiredDirection (up / down).

Delete Sculpt Layer

tb.ops.sculpt.layer.remove(*, mesh: MeshRef = ..., layer: int) -> Result

Delete a sculpt layer and the sculpting and paint on it.

  • Operation sculpt.layer.remove
  • In Model
ArgumentTypeDefaultDescription
meshMeshRef—Mesh whose layers to edit (default: the selected mesh object).
layerintrequiredLayer id (from sculpt.layer.list). (1…4294967295).

Set Sculpt Layer

tb.ops.sculpt.layer.set(
    *,
    mesh: MeshRef = ...,
    layer: int,
    name: str = ...,
    strength: float = ...,
    visible: bool = ...,
) -> Result

Rename a sculpt layer, change its strength (the layer's displacement is multiplied by it) or show / hide it; the surface follows.

  • Operation sculpt.layer.set
  • In Model
ArgumentTypeDefaultDescription
meshMeshRef—Mesh whose layers to edit (default: the selected mesh object).
layerintrequiredLayer id (from sculpt.layer.list). (1…4294967295).
namestr—New name (made unique).
strengthfloat—Strength (1 = as sculpted; 0 switches the layer off, negative inverts it). (-10…10).
visiblebool—Show or hide the layer.

Line Project

tb.ops.sculpt.line_project(
    *,
    from_: Any,
    to: Any,
    view: Any,
    flip: bool = False,
) -> Result

Flatten everything on one side of a screen line onto the line's plane through the view; masked vertices move less. One session undo step.

  • Operation sculpt.line_project
  • In Model
ArgumentTypeDefaultDescription
from_AnyrequiredLine start [x, y] in px.
toAnyrequiredLine end [x, y] in px; the side to the right of from → to (+y down) is flattened.
viewAnyrequiredCamera for screen coordinates: {viewProj: [16 numbers, column-major, mesh space → clip], size: [w, h] px, eye: [x, y, z, w] (w = 1 perspective position, 0 orthographic direction towards the camera), unitsPerWorld?: number}.
flipboolFalseFlatten the other side.

Mask by Color

tb.ops.sculpt.mask.by_color(
    *,
    point: Any = ...,
    view: Any = ...,
    x: float = ...,
    y: float = ...,
    color: Any = ...,
    threshold: float = 0.35,
    contiguous: bool = False,
    invert: bool = False,
    preserve: bool = False,
) -> Result

Mask the vertices whose painted color is close to a color (given, or sampled at a point / screen position): within threshold fully, fading over the next 10 %.

  • Operation sculpt.mask.by_color
  • In Model
ArgumentTypeDefaultDescription
pointAny—Mesh-space [x, y, z] on (or near) the surface.
viewAny—Camera for screen coordinates: {viewProj: [16 numbers, column-major, mesh space → clip], size: [w, h] px, eye: [x, y, z, w] (w = 1 perspective position, 0 orthographic direction towards the camera), unitsPerWorld?: number}.
xfloat—Screen x (px) with view.
yfloat—Screen y (px, +y down) with view.
colorAny—Color to match, sRGB [r, g, b] 0–1 or "#rrggbb" (default: sampled at the point).
thresholdfloat0.35Color distance (0 identical, 1 black to white) that still masks fully. (0…1).
contiguousboolFalseOnly the area connected to the point through matching colors.
invertboolFalseMask the other colors.
preserveboolFalseKeep the existing mask (the stronger value wins).

Clear Mask

tb.ops.sculpt.mask.clear() -> Result

Unmask everything.

  • Operation sculpt.mask.clear
  • In Model

Expand Mask

tb.ops.sculpt.mask.expand(
    *,
    point: Any = ...,
    vertex: int = ...,
    falloff: Literal["geodesic", "topology", "normals", "sphere"] = "geodesic",
    amount: float = ...,
    distance: float = ...,
    target: Literal["mask", "face-set"] = "mask",
    invert: bool = False,
    gradient: bool = False,
    preserve: bool = False,
) -> Result

Grow a mask (or a new face set) across the surface from a point, by geodesic distance, edge steps, normal angle or straight distance, up to a threshold; one undo step.

  • Operation sculpt.mask.expand
  • In Model
ArgumentTypeDefaultDescription
pointAny—Mesh-space [x, y, z] the region grows from (the nearest visible vertex).
vertexint—Vertex index to grow from (instead of point). (0…4294967295).
falloffLiteral["geodesic", "topology", "normals", "sphere"]"geodesic"Falloff (geodesic / topology / normals / sphere).
amountfloat—Threshold as a fraction of the field's largest value (default 0.25). (0…1).
distancefloat—Threshold in field units (mesh units for geodesic / sphere, edges for topology, 0–1 for normals); overrides amount. (0…1000000000).
targetLiteral["mask", "face-set"]"mask"Target (mask / face-set).
invertboolFalseMask everything outside the region.
gradientboolFalseFade from the origin to the edge instead of a hard edge.
preserveboolFalseKeep the existing mask (the region adds to it).

Mask Extract

tb.ops.sculpt.mask.extract(
    *,
    meshes: Sequence[MeshRef] = ...,
    threshold: float = 0.5,
    thickness: float = ...,
    offset: float = ...,
    smooth: int = 4,
) -> Result

Make a new object from the masked part of the surface: moved out along its normals and given a thickness (a closed shell), with every attribute carried over. The source mesh is unchanged. One undo step.

  • Operation sculpt.mask.extract
  • In Model
ArgumentTypeDefaultDescription
meshesSequence[MeshRef]—The mesh (default: the selected object's).
thresholdfloat0.5Faces whose average mask reaches this are taken. (0…1).
thicknessfloat—Shell thickness in mesh units (default 2 % of the mesh size; 0: an open surface). (0…1000000).
offsetfloat—How far the part moves out along its normals (default 0.5 % of the mesh size). (-1000000…1000000).
smoothint4Smoothing passes over the part (its border stays). (0…50).

Fill Mask

tb.ops.sculpt.mask.fill(*, value: float = 1.0) -> Result

Mask every visible vertex with a value.

  • Operation sculpt.mask.fill
  • In Model
ArgumentTypeDefaultDescription
valuefloat1.0Value (0…1).

Mask Filter

tb.ops.sculpt.mask.filter(
    *,
    filter: Literal["smooth", "sharpen", "grow", "shrink", "contrast-increase", "contrast-decrease"],
    iterations: int = 1,
) -> Result

Smooth, sharpen, grow, shrink or change the contrast of the mask.

  • Operation sculpt.mask.filter
  • In Model
ArgumentTypeDefaultDescription
filterLiteral["smooth", "sharpen", "grow", "shrink", "contrast-increase", "contrast-decrease"]requiredFilter (smooth / sharpen / grow / shrink / contrast-increase / contrast-decrease).
iterationsint1Iterations (1…100).

Mask from Layer

tb.ops.sculpt.mask.from_layer(
    *,
    layer: int,
    channel: Literal["sculpt", "paint"] = "sculpt",
    invert: bool = False,
    preserve: bool = False,
) -> Result

Mask where a sculpt layer changed the surface: by its sculpting (displacement length) or its paint (color change), the strongest vertex fully, fading with the amount.

  • Operation sculpt.mask.from_layer
  • In Model
ArgumentTypeDefaultDescription
layerintrequiredLayer id (from sculpt.layer.list). (1…4294967295).
channelLiteral["sculpt", "paint"]"sculpt"What of the layer to mask by. (sculpt / paint).
invertboolFalseMask what the layer left unchanged.
preserveboolFalseKeep the existing mask (the stronger value wins).

Box / Lasso Mask

tb.ops.sculpt.mask.gesture(
    *,
    polygon: Any,
    view: Any,
    mode: Literal["set", "add", "subtract"] = "set",
    value: float = 1.0,
    front_faces_only: bool = False,
) -> Result

Mask (or unmask) the vertices inside a screen polygon.

  • Operation sculpt.mask.gesture
  • In Model
ArgumentTypeDefaultDescription
polygonAnyrequiredClosed screen polygon [[x, y], …] in px (+y down); a box is its 4 corners.
viewAnyrequiredCamera for screen coordinates: {viewProj: [16 numbers, column-major, mesh space → clip], size: [w, h] px, eye: [x, y, z, w] (w = 1 perspective position, 0 orthographic direction towards the camera), unitsPerWorld?: number}.
modeLiteral["set", "add", "subtract"]"set"Mode (set / add / subtract).
valuefloat1.0Value (0…1).
front_faces_onlyboolFalseFront Faces Only.

Get Mask

tb.ops.sculpt.mask.get() -> Result

The mask per vertex.

  • Operation sculpt.mask.get
  • In Model

Invert Mask

tb.ops.sculpt.mask.invert() -> Result

Masked becomes unmasked and the other way round.

  • Operation sculpt.mask.invert
  • In Model

Set Mask

tb.ops.sculpt.mask.set(*, values: Any) -> Result

Replace the mask (one value 0–1 per vertex).

  • Operation sculpt.mask.set
  • In Model
ArgumentTypeDefaultDescription
valuesAnyrequiredValues.

Mask Slice

tb.ops.sculpt.mask.slice(
    *,
    meshes: Sequence[MeshRef] = ...,
    threshold: float = 0.5,
    fill: bool = True,
    keep: bool = False,
) -> Result

Remove the masked part of the surface: fill closes the holes; keep makes the removed part a new object. One undo step.

  • Operation sculpt.mask.slice
  • In Model
ArgumentTypeDefaultDescription
meshesSequence[MeshRef]—The mesh (default: the selected object's).
thresholdfloat0.5Threshold (0…1).
fillboolTrueClose the holes left by the cut.
keepboolFalseMake the removed part a new object.

Redo Sculpt Step

tb.ops.sculpt.redo() -> Result

Redo the next stroke or sculpt edit of the session.

  • Operation sculpt.redo
  • In Model

Sculpt Status

tb.ops.sculpt.status() -> Result

Whether sculpt mode is on, the mesh, its size, the session undo steps and the last stroke's counters.

  • Operation sculpt.status
  • In Model

Sculpt Stroke

tb.ops.sculpt.stroke(
    *,
    brush: str = ...,
    samples: Any = ...,
    view: Any = ...,
    points: Any = ...,
    radius: float = ...,
    view_direction: Vec3Like = ...,
    sub: bool = False,
    smooth: bool = False,
    seed: int = ...,
) -> Result

Replay a stroke through the shared brush engine. Either screen samples plus a view, or mesh-space points (the stroke is seen along viewDirection, default against the surface normal under the first point).

  • Operation sculpt.stroke
  • In Model
ArgumentTypeDefaultDescription
brushstr—Built-in brush id (sculpt.brush), kind (brush, clay, move) or name; named personal presets use presets.apply.
samplesAny—[[x, y], [x, y, pressure], …] screen px (+y down), with 'view'.
viewAny—Camera for screen coordinates: {viewProj: [16 numbers, column-major, mesh space → clip], size: [w, h] px, eye: [x, y, z, w] (w = 1 perspective position, 0 orthographic direction towards the camera), unitsPerWorld?: number}.
pointsAny—[[x, y, z], …] mesh-space points along the stroke.
radiusfloat—Points mode: brush radius in mesh units (default 5 % of the mesh size). (0.000001…1000000).
view_directionVec3Like—Points mode: direction the stroke is seen along.
subboolFalseCtrl: flips the brush's Sub for this stroke (its inverse).
smoothboolFalseShift: smooth instead.
seedint—Jitter seed (replays are deterministic). (0…4294967295).

Symmetrize

tb.ops.sculpt.symmetrize(
    *,
    direction: Literal["+x", "-x", "+y", "-y", "+z", "-z"] = "+x",
) -> Result

Copy one side of the mesh onto the other (matching mirrored vertices).

  • Operation sculpt.symmetrize
  • In Model
ArgumentTypeDefaultDescription
directionLiteral["+x", "-x", "+y", "-y", "+z", "-z"]"+x"Direction (+x / -x / +y / -y / +z / -z).

Sculpt Symmetry

tb.ops.sculpt.symmetry.set(
    *,
    x: bool = ...,
    y: bool = ...,
    z: bool = ...,
    world: bool = ...,
    radial_x: int = ...,
    radial_y: int = ...,
    radial_z: int = ...,
) -> Result

Mirror axes (object space unless world) and radial copies per axis.

  • Operation sculpt.symmetry.set
  • In Model
ArgumentTypeDefaultDescription
xbool—X.
ybool—Y.
zbool—Z.
worldbool—Mirror across world planes instead of the object's.
radial_xint—Radial X (1…64).
radial_yint—Radial Y (1…64).
radial_zint—Radial Z (1…64).

Trim

tb.ops.sculpt.trim(
    *,
    meshes: Sequence[MeshRef] = ...,
    polygon: Any,
    view: Any,
    mode: Literal["difference", "union", "join"] = "difference",
    split: bool = False,
    label: str = "Trim",
) -> Result

Cut away everything a screen box, lasso or polyline covers, straight through the model along the view, and close the cut with flat caps (a difference cut); with split the cut part becomes a new object, also closed (Nomad Split). Union adds the shape extruded through the model's depth as one closed surface; Join adds it as a separate part of the same mesh. New cut vertices and corners interpolate UVs, colors, mask, weights and blendshape targets; the caps get a new face set. One undo step.

  • Operation sculpt.trim
  • In Model
ArgumentTypeDefaultDescription
meshesSequence[MeshRef]—The mesh to trim (default: the selected object's).
polygonAnyrequiredClosed screen polygon [[x, y], …] in px (+y down); a box is its 4 corners.
viewAnyrequiredCamera for screen coordinates: {viewProj: [16 numbers, column-major, mesh space → clip], size: [w, h] px, eye: [x, y, z, w] (w = 1 perspective position, 0 orthographic direction towards the camera), unitsPerWorld?: number}.
modeLiteral["difference", "union", "join"]"difference"Difference cuts the shape away; Union adds it to the model as one closed surface (both must be closed); Join adds it as a separate closed part of the same mesh. (difference / union / join).
splitboolFalseDifference only: keep the cut part as a new object, closed along the same cut (Nomad Split).
labelstr"Trim"Undo label (Box Trim, Lasso Trim, Split).

Undo Sculpt Step

tb.ops.sculpt.undo() -> Result

Undo the last stroke or sculpt edit of the session.

  • Operation sculpt.undo
  • In Model