I created a attribute OpenMaya.MFnNumericAttribute that was created as
"createColor" with set Array set to true. I want to change the values
of R,G, and B by looping through the entire array rather then logical
index at this time. "distance" is a array of float values.
outputHandle = data.outputArrayValue( sample.vertexColor )
outputBuilder = outputHandle.builder()
for i in range(len(distance)):
dataHandle.jumpToElement(i)
handle = dataHandle.inputValue()
result = handle.asFloat3()
try:
outputHandle.jumpToElement(i)
outdatahandle = outputHandle.outputValue()
except:
outdatahandle = outputBuilder.addElement(i)
v = distance[i]
outdatahandle.set3Float(v,v,v)
Similar topics have been brought up before I just can't seem to get
it working.
Thanks,
Brian
www.meljunky.com
--
http://groups.google.com/group/python_inside_maya