Maya API i can't affect attribute type kFloatArray, kDoubleArray


#1

Hello everybody!
Help me please, how to execute function attributeAffects for type kFloatArray? here is source code:

//// attribute interval ////
intval = attNum.create("intr", "intr", MFnNumericData::kInt, 0, &stat);
CHECK_MSTATUS_AND_RETURN_IT(stat);
CHECK_MSTATUS(attNum.setKeyable(true));
CHECK_MSTATUS(attNum.setMin(0));
stat = addAttribute(intval);
CHECK_MSTATUS_AND_RETURN_IT(stat);


//// attribute inMesh ////
inMesh = attrType.create("inMesh", "inMesh", MFnData::kMesh, &stat);
CHECK_MSTATUS_AND_RETURN_IT(stat);
CHECK_MSTATUS(attrType.setStorable(true));
stat = addAttribute(inMesh);
CHECK_MSTATUS_AND_RETURN_IT(stat);

//// outMap ////
outMap = attrType.create("oMap", "oMap", MFnData::kDoubleArray, &stat);
CHECK_MSTATUS_AND_RETURN_IT(stat);
stat = addAttribute(outMap);
CHECK_MSTATUS_AND_RETURN_IT(stat);

stat = attributeAffects( intval, outMap);
CHECK_MSTATUS_AND_RETURN_IT(stat);
stat = attributeAffects( inMesh, outMap);
CHECK_MSTATUS_AND_RETURN_IT(stat);

The function compute() is not working, if i change type of attribute “outMap” for example double or float(not k*Array), compute() func. started and attributeAffects is working. What is the problem, Where is a mistake? I don’t understand. Thank’s