CompoundAttribute

class cgp_maya_utils.scene.CompoundAttribute(fullName)

Bases: cgp_maya_utils.scene.Attribute

attribute object that manipulates any kind of compound attribute

components()

the components of the compound attribute

Returns:the components of the compound attribute
Return type:list[cgp_maya_utils.sceneAttribute]
classmethod create(node, name, components=None, value=None, connections=None, **__)

create a compound attribute

Parameters:
  • node (str) – node on which to create the attribute
  • name (str) – name of the attribute to create
  • components (any) – components used to create the attribute - default is Axis.ALL
  • value (list[any]) – value to set on the attribute
  • connections (dict) – connection to build on the attribute - {‘source’: obj.attr, ‘destinations’: [obj.attr …]}
Returns:

the created attribute

Return type:

cgp_maya_utils.scene.CompoundAttribute

data(skipConversionNodes=True)

data necessary to store the compound attribute on disk and/or recreate it from scratch

Parameters:skipConversionNodes (bool) – True : conversion nodes are skipped - False conversion nodes are not skipped
Returns:the data of the compound attribute
Return type:dict
setValue(value)

set the value of the compound attribute

Parameters:value (list[any]) – value to set on the compound attribute
subType()

the subType of the compound attribute

Returns:the subType of the compound attribute
Return type:str
value()

the value of the compound attribute

Returns:the value of the compound attribute
Return type:any