EnumAttribute¶
-
class
cgp_maya_utils.scene.EnumAttribute(fullName)¶ Bases:
cgp_maya_utils.scene.Attributeattribute object that manipulates a
enumattribute-
classmethod
create(node, name, items=None, value=None, connections=None, **__)¶ create an enum attribute
Parameters: - node (str) – node on which to create the attribute
- name (str) – name of the attribute to create
- items (list[str]) – items used to create the attribute
- value (int or str) – value to set on the attribute
- connections (dict) – connection to build on the attribute -
{'source': node.attribute, 'destinations': [node.attribute ...]}
Returns: the created attribute
Return type:
-
data(skipConversionNodes=True)¶ data necessary to store the enum attribute on disk and/or recreate it from scratch
Parameters: skipConversionNodes (bool) – True: conversion nodes are skipped -Falseconversion nodes are not skippedReturns: the data of the enum attribute Return type: dict
-
items()¶ get the items of the enum attribute
Returns: the items of the enum attribute Return type: list[str]
-
classmethod