Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Parallel evaluation, evaluating the wrong plug.

Parallel evaluation, evaluating the wrong plug.

jmreinhart
Advisor Advisor
589 Views
1 Reply
Message 1 of 2

Parallel evaluation, evaluating the wrong plug.

jmreinhart
Advisor
Advisor

I'm working on a custom node that take a single mesh input, and an array of intArray attributes that represent face IDs. For each set of face IDs there is an output containing the positions of the triangles that make up that set of faces. 

 

I was using setDependentsDirty to create that input element to output element relationship, However I've run into an issue when I switch to using parallel evaluation. 

 

When I set keyframes and use the time slider, the compute method tries to compute a the output with the index "4294967295" when I only have 4 output connections.  

I know that in parallel evaluation setDependentsDirty does not work and I should impliment preEvaluation, but after looking through the documentation I don't see how I can re-impliment the input element to output element relationship. Any help would be greatly appreciated.

Accepted solutions (1)
590 Views
1 Reply
Reply (1)
Message 2 of 2

jmreinhart
Advisor
Advisor
Accepted solution

The problem appears to have come from my compute method

 

if (plug == trianglePoints)
{
     do stuff
}

 

I was assuming the plug was an element and not the array plug itself. Adding a check like this resolved the issue. The displayed 

 

if (plug.isElement())
{
}

 

So when I was trying to use the plug as if it was an element it caused the crash (so user error on my part).

4294967295 =  2^32 − 1 (so the number is probably coming from the 32 byte limit somewhere internally)