PDA

View Full Version : API: passing handles to sub-routines in the compute function


tredeger
10-09-2006, 03:19 AM
Does anyone know if I can safely pass a handle from the compute function to a sub-routine? I think this should be possible, but i'm not sure if it's worth doing. When I pass in the handle, I should be able to use it's methods right? Well, it's a handle to an array attr, so when I try to get a handle to one of it's elements I'm getting an undeclared identifier error from the $returnStatus argument. Any ideas? Thanks in advance for any help.

Here's the function I'm trying to call from compute:


MTransformationMatrix getTransformationMatrix (int target, MArrayDataHandle& MatrixArrayData) {
MTransformationMatrix transformationMatrix;

MatrixArrayData.jumpToElement(target);
MDataHandle MatrixData = MatrixArrayData.inputValue(&returnStatus);
transformationMatrix = MatrixData.asMatrix();

return transformationMatrix;
}

CGTalk Moderation
10-09-2006, 03:19 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.