PDA

View Full Version : Compute Function in API


dannybe
11-01-2006, 11:14 AM
Hi,

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).

Thanks,
Dan

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

dbsmith
11-05-2006, 08:00 PM
post some code?

CGTalk Moderation
11-05-2006, 08: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.