Matte
04-14-2008, 08:08 PM
Hello all,
Is there anyone how knows how to create a 'kDoubleAngleAttribute' using the API? Initialization is like normal in the Initialize function for the node, nothing strange there, but i cant seem to figure out how to make an attribute of this type.
The reason in this case that i want this specfic attributetype is that by using this attributetype you can get rid of all those unitConversion nodes that are automatically created when connecting attributes together. In this case concering rotate outputs from other nodes, which are always doubleAngle type of attributes. If i can use this exact type on my node the unitConversion node will not be needed, since the type is the same, meaning less nodes in the longer run for maya to handle when the amount of nodes starts to build up.
The corresponding MEL command for creating a doubleAngle attribute is simple enough:
addAttr -ln Values -at doubleAngle "object";
Since its so simple via MEL, i assume there is something simple i have missed, since i cant seem to figure out how to do it in the API. Anyone?
Edit: And of course i figured it out like 10 minutes after posting this question, hehe. Its in the MFnUnitAttribute class. :)
/Matte
Is there anyone how knows how to create a 'kDoubleAngleAttribute' using the API? Initialization is like normal in the Initialize function for the node, nothing strange there, but i cant seem to figure out how to make an attribute of this type.
The reason in this case that i want this specfic attributetype is that by using this attributetype you can get rid of all those unitConversion nodes that are automatically created when connecting attributes together. In this case concering rotate outputs from other nodes, which are always doubleAngle type of attributes. If i can use this exact type on my node the unitConversion node will not be needed, since the type is the same, meaning less nodes in the longer run for maya to handle when the amount of nodes starts to build up.
The corresponding MEL command for creating a doubleAngle attribute is simple enough:
addAttr -ln Values -at doubleAngle "object";
Since its so simple via MEL, i assume there is something simple i have missed, since i cant seem to figure out how to do it in the API. Anyone?
Edit: And of course i figured it out like 10 minutes after posting this question, hehe. Its in the MFnUnitAttribute class. :)
/Matte
