MPxNode::attributeAffects stops working

MPxNode::attributeAffects stops working

Sebastian_Wiendl
Enthusiast Enthusiast
718 Views
2 Replies
Message 1 of 3

MPxNode::attributeAffects stops working

Sebastian_Wiendl
Enthusiast
Enthusiast

Hi everyone,

 

I am struggling with MPxNode::attributeAffects().

 

So I have it set up like 

MPxNode::attributeAffects( A, B );

A is a float attribute accessible in the ui. And while I am on the first playback frame, I keep getting the callbacks whenever I change the value for A. So far so good.

But if I play to let's say frame 10 and then change A in the ui, I only get 1 more callback and anytime after that I never get a callback from the affects anymore, even when I go back to frame 1.

 

This doesn't seem like expected behavior?

Any idea what could be causing this?

Could it be connected to MDataBlock::setClean?

 

Any help is very much appreciated.

0 Likes
719 Views
2 Replies
Replies (2)
Message 2 of 3

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

MDataBlock::setClean is required when finished updating in compute, dirty propagate will be block if the plug is already dirty. dgdirty command could enforce a clean and make dirty propagate work again. You could try it first when affectAttribute stops working.

 

BTW: It sounds like a known issue which causing invisible object in DG stops updating Maya 2018. 

 

Yours,

Li

0 Likes
Message 3 of 3

Sebastian_Wiendl
Enthusiast
Enthusiast

Thanks for the response. I'm just getting back to the project and I'll try your suggestions.

0 Likes