Hello,
Having trouble with doubleArrays.
I can set a string array easily like this:
import maya.cmds as cmds
ball = cmds.sphere()[0]
names = ["a", "b", "c"]
cmds.addAttr(ball, ln = "myStrings", dt= "stringArray")
cmds.setAttr(ball+'.myStrings', len(names), type = "stringArray", *names)
cmds.getAttr(ball+".myStrings")
# Result: [u'a', u'b', u'c'] #
But similar code using a doubleArray gives an error:
numbers = [1, 2, 3]
cmds.addAttr(ball, ln = "myNums", dt= "doubleArray")
cmds.setAttr(ball+'.myNums', len(numbers), type = "doubleArray", *numbers)
cmds.getAttr(ball+".myNums")
# RuntimeError: setAttr: Too much data was provided. The last 1 elements were not used. #
Any ideas why doubleArrays are n't the same as stringArrays?