I'm having trouble using the setPerParticleAttribute() method to set
the colors of individual particles in a particle system. Here is an
example script:
import pymel as pm
pm.newFile(f=1)
pPos = [ (0,1,0), (0,2,0), (0,3,0) ]
pts = pm.particle(p=pPos)
pm.addAttr(pts[0].longName(), longName='rgbPP',
dataType='vectorArray')
pCol = [ (1,0,0), (0,1,0), (0,0,1) ]
pts[1].setPerParticleAttribute('rgbPP', pCol)
The call to setPerParticleAttribute method throws the following
exception:
Error: RuntimeError: (kInvalidParameter): Unknown type
Am I using setPerParticleAttribute() incorrectly? Any pointers would
be greatly appreciated. Thanks.
--
http://groups.google.com/group/python_inside_maya