@@ -39,29 +39,33 @@ def addAttribute(
3939):
4040 """Add attribute to a node.
4141
42- Arguments :
43- node (pm.node._Node | str): The object to add the new attribute.
42+ Args :
43+ node (dagNode or str): The object to add the new attribute.
4444 longName (str): The attribute name.
45- attributeType (str): The Attribute Type. Exp: 'string', 'bool', 'long', etc...
46- value (float | int | bool | list[float] | tuple[float]): The default value.
47- niceName (str): The attribute nice name. (optional)
48- shortName (str): The attribute short name. (optional)
49- minValue (float | int): minimum value. (optional)
50- maxValue (float | int): maximum value. (optional)
51- keyable (bool): Set if the attribute is keyable or not. (optional)
52- readable (bool): Set if the attribute is readable or not. (optional)
53- storable (bool): Set if the attribute is storable or not. (optional)
54- writable (bool): Set if the attribute is writable or not. (optional)
55- channelBox (bool): Set if the attribute is in the channelBox or not,
56- when the attribute is not keyable. (optional)
57- softMinValue (float): Lower limit of Maya Attribute Editor sliders. (optional)
58- softMaxValue (float): Upper limit of Maya Attribute Editor sliders. (optional)
59- usedAsColor (bool): Whether the added attribute is a color. (optional)
60- childSuffixes (list[str]): List of child attribute suffixes if creating a
61- compound attribute. Default is XYZ, or RGB if ``usedAsColor=True``.
45+ attributeType (str): The Attribute Type. Exp: 'string', 'bool',
46+ 'long', etc.
47+ value (float or int or bool or list): The default value.
48+ niceName (str, optional): The attribute nice name.
49+ shortName (str, optional): The attribute short name.
50+ minValue (float or int, optional): Minimum value.
51+ maxValue (float or int, optional): Maximum value.
52+ keyable (bool): Set if the attribute is keyable or not.
53+ readable (bool): Set if the attribute is readable or not.
54+ storable (bool): Set if the attribute is storable or not.
55+ writable (bool): Set if the attribute is writable or not.
56+ channelBox (bool): Set if the attribute is in the channelBox
57+ or not, when the attribute is not keyable.
58+ softMinValue (float, optional): Lower limit of Maya Attribute
59+ Editor sliders.
60+ softMaxValue (float, optional): Upper limit of Maya Attribute
61+ Editor sliders.
62+ usedAsColor (bool, optional): Whether the attribute is a color.
63+ childSuffixes (list of str, optional): Child attribute suffixes
64+ for compound attributes. Default is XYZ, or RGB if
65+ usedAsColor is True.
6266
6367 Returns:
64- pm.Attribute: A pymaya ``Attribute`` wrapper of the new attribute.
68+ pm.Attribute: The new attribute.
6569 """
6670 if isinstance (node , str ):
6771 try :
@@ -159,23 +163,22 @@ def addVector3Attribute(
159163 usedAsColor = False ,
160164 attributeType = "float3" ,
161165):
162- """
163- Add a vector3 attribute to a node.
166+ """Add a vector3 attribute to a node.
164167
165- Arguments :
166- node (pm.node._Node | str): The object to add the new attribute.
168+ Args :
169+ node (dagNode or str): The object to add the new attribute.
167170 longName (str): The attribute name.
168- value (list[ float] ): The default value in a list for RGB.
169- E.g. [1.0, 0.99, 0.13].
170- keyable (bool): Set if the attribute is keyable or not. (optional)
171- readable (bool): Set if the attribute is readable or not. (optional)
172- storable (bool): Set if the attribute is storable or not. (optional)
173- writable (bool): Set if the attribute is writable or not. (optional)
174- niceName (str): The attribute nice name. (optional)
175- shortName (str): The attribute short name. (optional)
171+ value (list of float): The default value in a list for RGB.
172+ Exp: [1.0, 0.99, 0.13].
173+ keyable (bool): Set if the attribute is keyable or not.
174+ readable (bool): Set if the attribute is readable or not.
175+ storable (bool): Set if the attribute is storable or not.
176+ writable (bool): Set if the attribute is writable or not.
177+ niceName (str, optional ): The attribute nice name.
178+ shortName (str, optional ): The attribute short name.
176179
177180 Returns:
178- pm.Attribute: A pymaya ``Attribute`` wrapper of the new attribute.
181+ pm.Attribute: The new attribute.
179182 """
180183 if isinstance (node , str ):
181184 try :
0 commit comments