Deselect All
tb.ops.selection.clear() -> ResultClear the object, component, rig and guide selection.
Docs · Python API
tb.ops.selection31 operations. Without targets=, an operation works on the current selection, like its button in the editor.
tb.ops.selection.clear() -> ResultClear the object, component, rig and guide selection.
tb.ops.selection.clear_components(
*,
kind: Literal["vertex", "edge", "face"] = ...,
) -> ResultClear the component selection of one kind (default: the current mode's) on every mesh; objects stay selected.
| Argument | Type | Default | Description |
|---|---|---|---|
kind | Literal["vertex", "edge", "face"] | — | Component kind to clear (default: the current mode). (vertex / edge / face). |
tb.ops.selection.components(*, mesh: MeshRef = ...) -> ResultThe selected vertices, edges and faces of each mesh as dense indices (ascending), with the active component. One entry per mesh with a component selection, or only 'mesh'. Read-only.
| Argument | Type | Default | Description |
|---|---|---|---|
mesh | MeshRef | — | Only this mesh (default: every mesh with a component selection). |
tb.ops.selection.convert(
*,
uv_map: str = ...,
to: Literal["vertex", "edge", "face", "island", "uv"],
from_: Literal["vertex", "edge", "face", "island", "uv"] = ...,
) -> ResultConvert the component selection to another kind: vertices → edges/faces whose vertices are all selected; edges/faces → all their vertices; edges → faces using them; faces → all their edges; anything → the islands (connected pieces) it touches; islands → all their elements; to/from UVs through the face corners (the UV pane's selection). Switches the Model editor to the target mode; UV targets keep it.
| Argument | Type | Default | Description |
|---|---|---|---|
uv_map | str | — | UV map to edit (default: each mesh's displayed UV map, or its active map before a view choice). |
to | Literal["vertex", "edge", "face", "island", "uv"] | required | The component type the selection becomes: vertices, edges, faces, UV islands or UVs. (vertex / edge / face / island / uv). |
from_ | Literal["vertex", "edge", "face", "island", "uv"] | — | Source kind (default: the current component mode). Pass 'uv' to convert the UV selection. (vertex / edge / face / island / uv). |
tb.ops.selection.grow(*, face_step: bool = False) -> ResultExpand the component selection by one topological ring (on every mesh with a selection).
| Argument | Type | Default | Description |
|---|---|---|---|
face_step | bool | False | Step over whole faces (elements sharing a corner) instead of single edges. |
tb.ops.selection.invert() -> ResultObject mode: select exactly the visible, unlocked mesh and curve objects that are not selected. Component modes: invert the components of the current kind on the meshes of the selected objects.
tb.ops.selection.loop_to_region(*, select_bigger: bool = False) -> ResultSelect the faces enclosed by the selected edge loop; switches to face mode.
| Argument | Type | Default | Description |
|---|---|---|---|
select_bigger | bool | False | Select the larger region instead of the enclosed (smaller) one. |
tb.ops.selection.region_to_loop() -> ResultSelect the boundary edges of the selected faces; switches to edge mode.
tb.ops.selection.select(
*,
nodes: Sequence[ObjectRef],
mode: Literal["replace", "add", "remove", "toggle"] = "replace",
active: ObjectRef = ...,
) -> ResultSelect objects by id, name or path. One undo step (none when the selection does not change).
| Argument | Type | Default | Description |
|---|---|---|---|
nodes | Sequence[ObjectRef] | required | Nodes. |
mode | Literal["replace", "add", "remove", "toggle"] | "replace" | How to combine with the current selection. (replace / add / remove / toggle). |
active | ObjectRef | — | Object to make active (default: the last one selected). |
tb.ops.selection.select_all() -> ResultObject mode: select every visible, unlocked mesh and curve object (selected objects that cannot be picked stay selected). Component modes: select every component of the current kind on the meshes of the selected objects.
tb.ops.selection.select_by_face_sides(
*,
count: int = 3,
comparison: Literal["equal", "less", "greater", "notEqual"] = "equal",
) -> ResultSelect faces by their vertex count (triangles, quads, n-gons); switches to face mode.
| Argument | Type | Default | Description |
|---|---|---|---|
count | int | 3 | Number of sides to compare with (3 = triangles, 4 = quads). (3…1000000). |
comparison | Literal["equal", "less", "greater", "notEqual"] | "equal" | Selects faces with exactly, fewer than or more than this many sides. (equal / less / greater / notEqual). |
tb.ops.selection.select_components(
*,
mesh: MeshRef,
kind: Literal["vertex", "edge", "face", "island"],
indices: Sequence[int] = ...,
ranges: Sequence[int] = ...,
mode: Literal["replace", "add", "remove", "toggle"] = "replace",
surface: bool = False,
) -> ResultSelect vertices, edges (vertex index pairs), faces or islands (any face index of the island) of a mesh by dense index; stored by stable element id. Local inspection needs no unique scene placement; world-space tools resolve that separately. Switches to that component mode and keeps the editing mesh independent from the active handle.
| Argument | Type | Default | Description |
|---|---|---|---|
mesh | MeshRef | required | Mesh. |
kind | Literal["vertex", "edge", "face", "island"] | required | Kind (vertex / edge / face / island). |
indices | Sequence[int] | — | Dense indices (give these or ranges). (0…4294967295). |
ranges | Sequence[int] | — | Half-open dense index ranges as flattened start, end pairs: the compact form of a large area selection (give these or indices). (0…4294967295). |
mode | Literal["replace", "add", "remove", "toggle"] | "replace" | How to combine with the current selection. (replace / add / remove / toggle). |
surface | bool | False | Faces: grow each face to the whole surface it belongs to, the way a B-rep face reads (CAD mode picks): a flat face across its coplanar splits (a boolean top around a hole), a curved surface (a cylinder wall, a bevel's rounded strip) across edges not sharper than 30° and not marked sharp. |
tb.ops.selection.select_interior_faces(
*,
mode: Literal["volume", "noBoundary"] = "volume",
) -> ResultSelect faces inside the mesh volume, such as the wall left between two joined boxes; switches to face mode.
| Argument | Type | Default | Description |
|---|---|---|---|
mode | Literal["volume", "noBoundary"] | "volume" | 'volume': faces inside the mesh volume. 'noBoundary': every face without a boundary or non-manifold edge. (volume / noBoundary). |
tb.ops.selection.select_linked() -> ResultSelect all geometry connected to the current component selection.
tb.ops.selection.select_loop() -> ResultExtend every selected edge to its whole edge loop (across four-way vertices, along open borders).
tb.ops.selection.select_loose(*, extend: bool = False) -> ResultSelect loose points (no edges), wire edges (no faces) or loose faces (no neighbouring face) in the current mode (vertex mode from object mode).
| Argument | Type | Default | Description |
|---|---|---|---|
extend | bool | False | Add the loose elements to the current selection instead of replacing it. |
tb.ops.selection.select_mirror(
*,
axes: Any = ["x"],
extend: bool = False,
topology: bool = False,
) -> ResultSelect mirrored counterparts across local axes using positions or symmetric polygon connectivity.
| Argument | Type | Default | Description |
|---|---|---|---|
axes | Any | ["x"] | Local mirror planes to apply, in order: a list of "x", "y", "z" (default: X). |
extend | bool | False | Keep the current selection and add the mirrored elements. |
topology | bool | False | Pair components by polygon connectivity from a symmetry-plane edge, including displaced symmetric sides. |
tb.ops.selection.select_non_manifold(
*,
extend: bool = False,
wire: bool = True,
boundary: bool = True,
multi_face: bool = True,
non_contiguous: bool = True,
vertices: bool = True,
) -> ResultSelect non-manifold geometry: wire, boundary and multi-face edges, edges between faces with flipped winding, and bowtie vertices (edge mode from object mode).
| Argument | Type | Default | Description |
|---|---|---|---|
extend | bool | False | Add to the current selection instead of replacing it. |
wire | bool | True | Wire edges (no faces). |
boundary | bool | True | Open boundary edges (one face). |
multi_face | bool | True | Edges shared by more than two faces. |
non_contiguous | bool | True | Edges between two faces wound in opposite directions. |
vertices | bool | True | Vertices whose faces form separate fans (bowties) or that only touch wire edges (vertex mode). |
tb.ops.selection.select_nth(
*,
nth: int = 2,
offset: int = 0,
skip: int = 1,
mode: Literal["vertex", "edge", "face"] = ...,
) -> ResultDeselect every nth component of the selection in a checker pattern, walking out from the active component (selects everything first when nothing is selected).
| Argument | Type | Default | Description |
|---|---|---|---|
nth | int | 2 | Interval length (2 = every other component). (1…1000000). |
offset | int | 0 | Shift of the pattern. (0…1000000). |
skip | int | 1 | How many consecutive components stay selected in each interval. Must not exceed nth. (1…1000000). |
mode | Literal["vertex", "edge", "face"] | — | Component mode to work in; defaults to the current one (faces from object mode). (vertex / edge / face). |
tb.ops.selection.select_outside_sets(
*,
meshes: Sequence[MeshRef] = ...,
extend: bool = False,
) -> ResultSelect the points that belong to no Vertex Set and switch to vertex mode. Meshes without Vertex Sets are skipped.
| Argument | Type | Default | Description |
|---|---|---|---|
meshes | Sequence[MeshRef] | — | Meshes to search (default: meshes with a component selection, else the selected mesh objects). |
extend | bool | False | Add to the vertex selection instead of replacing it. |
tb.ops.selection.select_random(
*,
ratio: float = 0.5,
seed: int = 0,
action: Literal["select", "deselect"] = "select",
mode: Literal["vertex", "edge", "face"] = ...,
) -> ResultRandomly select or deselect an exact share of the components (repeatable with the same seed).
| Argument | Type | Default | Description |
|---|---|---|---|
ratio | float | 0.5 | Share of the components to select or deselect (0 to 1). (0…1). |
seed | int | 0 | Random seed; the same seed gives the same pattern. (0…4294967295). |
action | Literal["select", "deselect"] | "select" | Add random components, or remove random components from the selection. (select / deselect). |
mode | Literal["vertex", "edge", "face"] | — | Component mode to work in; defaults to the current one (faces from object mode). (vertex / edge / face). |
tb.ops.selection.select_rig(
*,
bones: Any = ...,
controls: Any = ...,
items: Any = ...,
active: str = ...,
mode: Literal["replace", "add", "remove", "toggle"] = "replace",
) -> ResultSelect skeleton bones (by name or id) or rig controls (by id, or the name their animation curves record). Bones and controls are exclusive categories: selecting one kind clears the other (in the Previewer they also replace the object selection). One undo step.
| Argument | Type | Default | Description |
|---|---|---|---|
bones | Any | — | Bone names or ids. |
controls | Any | — | Control ids or names; in Skeleton Rig mode also body-rig goal ids (armL/end). |
items | Any | — | Control Rig hierarchy: ordered typed {kind: node|bone|control, id} members. Mixed categories are combined atomically; the last surviving requested member is primary. Use instead of bones/controls/active. |
active | str | — | Bone or control to make active after selection, by the same name/id resolution. It must remain selected; the active item is last in selection order. |
mode | Literal["replace", "add", "remove", "toggle"] | "replace" | How to combine with the current selection. (replace / add / remove / toggle). |
tb.ops.selection.select_rig_related(
*,
relation: Literal["parent", "children", "hierarchy", "opposite"],
mode: Literal["replace", "add", "remove", "toggle"] = "replace",
) -> ResultSelect the parent, children, hierarchy or opposite-side partners of the selected bones (partners by the shared left/right naming rules). One undo step.
| Argument | Type | Default | Description |
|---|---|---|---|
relation | Literal["parent", "children", "hierarchy", "opposite"] | required | Which bones to select. (parent / children / hierarchy / opposite). |
mode | Literal["replace", "add", "remove", "toggle"] | "replace" | How to combine with the current selection. (replace / add / remove / toggle). |
tb.ops.selection.select_ring() -> ResultExtend every selected edge to its edge ring (the opposite edges across quads).
tb.ops.selection.select_sharp_edges(*, threshold: float = 30.0) -> ResultSelect edges whose adjacent faces meet at or above the angle, plus open and non-manifold edges; switches to edge mode.
| Argument | Type | Default | Description |
|---|---|---|---|
threshold | float | 30.0 | Minimum angle between the face normals, in degrees. (degrees; 0…180). |
tb.ops.selection.select_side_of_active(
*,
axis: Literal["x", "y", "z"] = "x",
sign: Literal["positive", "negative", "aligned"] = "positive",
threshold: float = 0.0001,
orientation: Literal["local", "global"] = "local",
active_vertex: int = ...,
mesh: MeshRef = ...,
) -> ResultSelect every vertex on one side of the active vertex along an axis, or aligned with it.
| Argument | Type | Default | Description |
|---|---|---|---|
axis | Literal["x", "y", "z"] | "x" | Axis to compare along. (x / y / z). |
sign | Literal["positive", "negative", "aligned"] | "positive" | Select the positive side, the negative side, or points aligned with the active vertex. (positive / negative / aligned). |
threshold | float | 0.0001 | Tolerance around the active vertex, in mesh units. (scene units; 0…50). |
orientation | Literal["local", "global"] | "local" | Compare in object (local) or world (global) coordinates. (local / global). |
active_vertex | int | — | Vertex to measure from; defaults to the active (last selected) vertex. (0…4294967295). |
mesh | MeshRef | — | Mesh of the active vertex (default: the mesh of the active component). |
tb.ops.selection.select_similar(
*,
property: str = ...,
threshold: float = 0.1,
compare: Literal["equal", "greater", "less"] = "equal",
) -> ResultSelect every component similar to a selected one by a property (faces: area, sides, normal, perimeter, coplanar, material, smooth; edges: length, face angle, face count, direction, seam, sharp, crease, bevel weight; vertices: connected edges / faces, normal, crease, weight maps).
| Argument | Type | Default | Description |
|---|---|---|---|
property | str | — | Property to compare (default: the first property of the current mode: area, length or connectedEdges). |
threshold | float | 0.1 | Area / perimeter / length: fraction of the reference; normal / coplanar / direction: 1 − cos of the angle; face angle: degrees; crease / bevel weight: absolute difference. (0…1000000). |
compare | Literal["equal", "greater", "less"] | "equal" | Selects components whose value is equal to, greater than or less than the selected ones' value. (equal / greater / less). |
tb.ops.selection.set_mode(
*,
mode: Literal["object", "vertex", "edge", "face", "island", "uv", "cad"],
node: ObjectRef = ...,
) -> ResultSwitch between object, vertex, edge, face, island, UV and CAD selection (CAD selects points, edges and faces together). Model and Control Rig may hold a component-mode intent before a mesh exists; tools validate editable targets when used. UV mode requires Model and a UV map. Without an existing component context or selected editable mesh, uses the first pickable mesh (Control Rig prefers a skinned mesh). Between vertex, edge and face the selection converts through its vertices. Object mode releases the edit lock and retains local membership until another object selection parks it.
| Argument | Type | Default | Description |
|---|---|---|---|
mode | Literal["object", "vertex", "edge", "face", "island", "uv", "cad"] | required | Mode (object / vertex / edge / face / island / uv / cad). |
node | ObjectRef | — | Optional exact object to select atomically when entering Object mode; other modes refuse it. |
tb.ops.selection.set_track_order(
*,
vertex: bool = ...,
edge: bool = ...,
face: bool = ...,
) -> ResultPer component kind, keep the order components are picked in: Merge at First / Last and other pick-order tools read it. Off (the default) makes large selections much faster and lists components in index order. Object selections always keep their order. Without parameters it returns the current setting. A preference, not an undo step.
| Argument | Type | Default | Description |
|---|---|---|---|
vertex | bool | — | Keep pick order for this kind (omit to leave the setting unchanged). |
edge | bool | — | Keep pick order for this kind (omit to leave the setting unchanged). |
face | bool | — | Keep pick order for this kind (omit to leave the setting unchanged). |
tb.ops.selection.shortest_path(
*,
mesh: MeshRef,
kind: Literal["vertex", "edge", "face"],
from_: int,
to: int,
) -> ResultAdd the shortest path between two components of one mesh (Ctrl+Shift+click from the last selected component).
| Argument | Type | Default | Description |
|---|---|---|---|
mesh | MeshRef | required | Mesh. |
kind | Literal["vertex", "edge", "face"] | required | Kind (vertex / edge / face). |
from_ | int | required | Dense index of the start component. (0…4294967295). |
to | int | required | Dense index of the end component. (0…4294967295). |
tb.ops.selection.shrink(*, face_step: bool = False) -> ResultContract the component selection from its outer components.
| Argument | Type | Default | Description |
|---|---|---|---|
face_step | bool | False | Step over whole faces (elements sharing a corner) instead of single edges. |