View Full Version : Compute Function in API

11 November 2006, 12:14 PM

I have created a custom node with a few simple attributes and I'm trying to get it to call into the compute function when one of these changes, but it only calls in with the LocalPosition and LocalScale plugs.

To illustrate:

I have two attributes, Mass and Output.

I have added them in the Initialize function and set attributeAffects(Mass, Output).

Now, I would expect that on modifying Mass in Maya, the compute function would be called with the Output plug, but it doesn't.

Can anyone explain how to get it to do this?

Another problem I have that needs fixing is to get it to call into the compute function every frame when playing back, I have created an attribute and connected it with the time1.outTime, but it only seems to call in when you stop playing (and has the same problem as above, calls with LocalPosition plugs only, etc).


11 November 2006, 04:15 PM
what happens when you query the output-attribute (getAttr bla.output)?

11 November 2006, 09:00 PM
post some code?

CGTalk Moderation
11 November 2006, 09:00 PM
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.