Description
It provides methods for editing a Select Set.
Object
| SelectSet(name=string) |
Functions
| Name | Argument types | Returns | Description |
| setContents | list | success (bool) | Sets the contents of the Select Set, a list of object names (str). |
| setColor | int | success (bool) | Sets the color of the Select Set. Available colors: kWhite kDarkWhite kLightGray kGray kDarkGray kBlack kLightPurple kPurple kDarkPurple kLightBlue kBlue kDarkBlue kLightTurquoise kTurquoise kDarkTurquoise kLightGreen kGreen kDarkGreen kLightYellow kYellow kDarkYellow kLightOrange kOrange kDarkOrange kLightRed kRed kDarkRed kLightPink kPink kDarkPink |
| setName | string | success (bool) | Sets the name (label) of the Select Set. |
| select | N/A | success (bool) | Replace select the contents (existing objects) in the scene. |
| addSelect | N/A | success (bool) | Add select the contents (existing objects) in the scene. |
| deselect | N/A | success (bool) | Deselect the contents. |
| delete | N/A | success (bool) | Deletes the Select Set. |
| getContents | N/A | list | Returns the contents of the Select Set. |
| getColor | N/A | int | Returns the index color of the Select Set. |
| getName | N/A | string | Returns the name (label) of the Select Set. |
Examples
This changes the label of a select from "Apple" to "Orange":
from animBot import OpenAnimBot as OA
mySelectSet = OA.SelectSet("Apple")
mySelectSet.setName("Orange")This sets the color to blue for all Select Sets which contains the object "superman:hand":
from animBot import OpenAnimBot as OA
for selectSet in OA.listSelectSets():
if "superman:hand" in selectSet.getContents():
selectSet.setColor(OA.kBlue)
This creates a Select Set containing selected objects and sets the name to "Left_Arm":
mySelectSet = OA.createSelectSet()
mySelectSet.setName("Left_Arm")This deletes all yellow Select Sets:
from animBot import OpenAnimBot as OA
for selectSet in OA.listSelectSets():
if selectSet.getColor() != OA.kYellow:
continue
selectSet.delete()