hi !
I'm writing a node with compound attributes, and, as always, I'm struggling
with syntax !
I want my attributes to have this hierarchy :
element
|__element[0]
|__ element[0].position
|__element[0].positionX
|__element[0].positionY
|__element[0].positionZ
|__ element[0].rotation
|__ ...
|_ element[1]
|__ etc...
(Position is an MFnNumericAttribute.createPoint() and orientation is an array,
and my attributes are outputs)
So the declaration is done correctly, but when I need to write them with the
databuilder, it's getting a bit more tricky :
hElement = data.outputArrayValue(Node.aElement)
bElement = hElement.builder()
and finally
for i in xrange(num_elements):
bElement.addElement(i).setFloatVector(0, 1, 0)
Obviously, I'm doing something wrong, because my node always returns 0,0,0.
I think I'm actually pointing to the parent, but don't know how to access to
the child, from there.
Any idea ?
Thanks
(I'm using the python api2.0 for this one)
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/af89ea57-5b3a-42b0-ba55-6a65001627dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.