When are plugs updated in parallel evaluation?

When are plugs updated in parallel evaluation?

jmreinhart
Advisor Advisor
603 Views
1 Reply
Message 1 of 2

When are plugs updated in parallel evaluation?

jmreinhart
Advisor
Advisor

I am trying to resolve an issue with an MPxLocator. The problem is that when parallel evaluation is used, the values I get from plugs in the prepareForDraw method do not update properly. I set up some print statements to compare the value being set in the calculate method and the value pulled out of the plug in the prepareForDraw method

 

DG:

// trianglePoint set to:126.244492 // 
// prepareForDraw // 
// trianglePoint is:126.244492 // 
// addUIDrawables // 

// trianglePoint set to:126.619934 // 
// prepareForDraw // 
// trianglePoint is:126.619934 // 
// addUIDrawables // 

Things are as expected, the value is set in the calculate method and then pulled out in the prepareForDraw method.

 

Parallel:

// prepareForDraw // 
// trianglePoint is:133.689761 // 
// matrix pos is:-2.716647 // 
// addUIDrawables // 
// prepareForDraw // 
// trianglePoint is:133.689761 // 
// matrix pos is:-2.716647 // 
// addUIDrawables // 
trianglePoint set to:132.663135
trianglePoint set to:131.978351

 

So the compute method is seemingly called after the move manipulator is released. This is in line with what I see in the viewport because the MpxLocator only visually updates when you first start moving it (so it pulls the value that was set at the end of the previous move), but doesn't continue to update as you move around more. I have attached a video of this.

 

0 Likes
Accepted solutions (1)
604 Views
1 Reply
Reply (1)
Message 2 of 2

jmreinhart
Advisor
Advisor
Accepted solution

The evaluate as expected, the MGlobal::displayInfo just prints in an unexpected way.