Description


It provides methods for editing a Select Set.


Object


SelectSet(name=string)



Functions


NameArgument typesReturnsDescription
setContentslistsuccess (bool)Sets the contents of the Select Set, a list of object names (str).
setColorintsuccess (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

setNamestringsuccess (bool)
Sets the name (label) of the Select Set.
selectN/Asuccess (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.
deleteN/Asuccess (bool)
Deletes the Select Set.
getContentsN/AlistReturns the contents of the Select Set.
getColorN/A
intReturns the index color of the Select Set.
getNameN/A
stringReturns 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()