hi, i need help to setup the output array from my node. I have so far a type attribute(string), a numericArray(k2Double) input and a numericArray(k3Double) output.
to change the length of the input is simple, maya provides a handy button; but i cant find a way to successfully increase the length of the output. my node works for the first entry but when trying to create/go to next output it will fail. i have attempted to use ".setUsesArrayDataBuilder" and ".addlast" but either i am using them wrong or they refer to something else. i need the input and the output to have the same length.
CODE
def nodeInitializer():
nAttr = OpenMaya.MFnNumericAttribute()
tAttr = OpenMaya.MFnTypedAttribute()
#############################create attrs#############################
try:
fileNode.aInArray=nAttr.create("inArray","in",OpenMaya.MFnNumericData.k2Double )
nAttr.setArray( 1 );
nAttr.setKeyable(1)
nAttr.setStorable(1)
nAttr.setReadable(1)
nAttr.setWritable(1)
except:
print "error:001 "
print sys.exc_info()
try:
fileNode.aOutArray=nAttr.create("outArray","out",OpenMaya.MFnNumericData.k3Double )
nAttr.setArray( 1 );
nAttr.setKeyable(0)
nAttr.setStorable(0)
nAttr.setReadable(1)
nAttr.setWritable(0)
nAttr.setHidden(0)
nAttr.setChannelBox(1)
nAttr.setUsesArrayDataBuilder(1)
except:
print "error:002 "
print sys.exc_info()
try:
fileNode.aAddress = tAttr.create("file", "f", OpenMaya.MFnData.kString )
tAttr.setKeyable(1)
tAttr.setStorable(1)
tAttr.setReadable(1)
tAttr.setWritable(1)
except:
print "error:003 "
print sys.exc_info()