Message 1 of 3
[Python] addAttr fail to create float2 attribute into compound attribute
Not applicable
09-18-2015
03:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I want to create a compound attribute with several float2 attributes inside (as extra attributes of a transform node).
It works well with float3 attributes :
cmds.addAttr(longName='compoundAttr', numberOfChildren=1, attributeType='compound') cmds.addAttr(longName='sup', attributeType='float3', parent='sampson') cmds.addAttr(longName='sub1', attributeType='float', parent='sup') cmds.addAttr(longName='sub2', attributeType='float', parent='sup') cmds.addAttr(longName='sub3', attributeType='float', parent='sup')
But it fails when I use a float2 instead of float3 :
cmds.addAttr(longName='coumpoundAttr', numberOfChildren=1, attributeType='compound') cmds.addAttr(longName='sup', attributeType='float2', parent='coumpoundAttr') cmds.addAttr(longName='sub1', attributeType='float', parent='sup') cmds.addAttr(longName='sub2', attributeType='float', parent='sup')
I am doing something wrong ?
Thanks a lot.