PDA

View Full Version : API: compute function not invoked


madgodz
10-08-2007, 07:52 AM
after searching through the forum and looking at all the threads on this function call, I am still unclear on how to invoke it.

myNode has an an input and output attribute.

addAttribute(inTime);
addAttribute(filename);
attributeAffects(inTime, filename);

In myCmd::doIt(), I call:

MPlug inTimePlug = depNodeFn.findPlug(MString("inTime"),&stat);

which returns successfully. I have tried the following push/pull methods to get the myNode ::compute() function to invoke:

inTimePlug.setValue(frameNum);

MObject the_value;
filenamePlug.setValue(the_value);

Am I missing anything? Any extra connections need to be made? Am I supposed to use the MDagModifier?

BenBarker
10-10-2007, 04:44 AM
Sorry I don't have an immediate answer but I am confused. What is the purpose of myCmd?

Generally the compute method is called by Maya on DG update, it might not be updating because the scene isn't updating. MDagModifier might cause this to happen, but it seems that things that would need to be computed in a command would be done right inside doIt.

CGTalk Moderation
10-10-2007, 04:44 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.