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.sets

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

Add to Set

tb.ops.sets.add(*, set: str, members: Any = ...) -> Result

Add the selection or members to a set. One undo step.

  • Operation sets.add
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
setstrrequiredThe set's name.
membersAny—Member names: "Cube", "joint:Hips", "control:Hips_CTL". Default: the selected objects, joints or controls.

Create Set

tb.ops.sets.create(
    *,
    name: str = ...,
    members: Any = ...,
    empty: bool = False,
    quick_select: bool = False,
    color: str = ...,
) -> Result

Create an Object Set from the selected objects, joints and controls or from members. One undo step.

  • Operation sets.create
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
namestr—Default "Object Set"; taken names get a number.
membersAny—Member names: "Cube", "joint:Hips", "control:Hips_CTL". Default: the selected objects, joints or controls.
emptyboolFalseCreate the set without members.
quick_selectboolFalseA Quick Select Set: also shown on the sets bar.
colorstr—Sets-bar color '#rrggbb' (empty: none).

Delete Set

tb.ops.sets.delete(*, set: str) -> Result

Delete a set (its members are untouched). One undo step.

  • Operation sets.delete
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
setstrrequiredThe set's name.

Difference of Sets

tb.ops.sets.difference(
    *,
    sets: Any,
    name: str = "Difference",
    quick_select: bool = False,
) -> Result

Create a set holding the members of the first of sets that are in none of the others.

  • Operation sets.difference
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
setsAnyrequiredTwo or more set names.
namestr"Difference"Name.
quick_selectboolFalseQuick Select.

Intersection of Sets

tb.ops.sets.intersection(
    *,
    sets: Any,
    name: str = "Intersection",
    quick_select: bool = False,
) -> Result

Create a set holding the members common to all sets.

  • Operation sets.intersection
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
setsAnyrequiredTwo or more set names.
namestr"Intersection"Name.
quick_selectboolFalseQuick Select.

List Sets

tb.ops.sets.list(*, member: ObjectRef = ...) -> Result

Every Object Set: name, quick-select flag and member count; member keeps the sets holding that object. Component sets: mesh.set.list.

  • Operation sets.list
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
memberObjectRef—An object: the sets holding it.

Set Members

tb.ops.sets.members(*, set: str) -> Result

The set's members as names.

  • Operation sets.members
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
setstrrequiredThe set's name.

Remove from Set

tb.ops.sets.remove(*, set: str, members: Any = ...) -> Result

Remove the selection or members from a set. One undo step.

  • Operation sets.remove
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
setstrrequiredThe set's name.
membersAny—Member names: "Cube", "joint:Hips", "control:Hips_CTL". Default: the selected objects, joints or controls.

Rename Set

tb.ops.sets.rename(*, set: str, name: str) -> Result

Rename a set; a name another set has gets a number.

  • Operation sets.rename
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
setstrrequiredThe set's name.
namestrrequiredName.

Select Set

tb.ops.sets.select(
    *,
    set: str,
    mode: Literal["replace", "add", "remove", "toggle"] = "replace",
) -> Result

Select the members of a set. One undo step.

  • Operation sets.select
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
setstrrequiredThe set's name.
modeLiteral["replace", "add", "remove", "toggle"]"replace"How to combine with the current selection. (replace / add / remove / toggle).

Set Color

tb.ops.sets.set_color(*, set: str, color: str) -> Result

The set's sets-bar color.

  • Operation sets.set_color
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
setstrrequiredThe set's name.
colorstrrequiredSets-bar color '#rrggbb' (empty: none).

Edit Set Members

tb.ops.sets.set_members(*, set: str, members: Any) -> Result

Replace a set's members with members (the Edit Set dialog). One undo step.

  • Operation sets.set_members
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
setstrrequiredThe set's name.
membersAnyrequiredMember names: "Cube", "joint:Hips", "control:Hips_CTL". Default: the selected objects, joints or controls.

Quick Select Set

tb.ops.sets.set_quick_select(*, set: str, on: bool) -> Result

Make a set a Quick Select Set (listed on the sets bar) or a plain set.

  • Operation sets.set_quick_select
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
setstrrequiredThe set's name.
onboolrequiredOn.

Union of Sets

tb.ops.sets.union(
    *,
    sets: Any,
    name: str = "Union",
    quick_select: bool = False,
) -> Result

Create a set holding the members of any of sets.

  • Operation sets.union
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
setsAnyrequiredTwo or more set names.
namestr"Union"Name.
quick_selectboolFalseQuick Select.