MPxNode compute array attribute independently

MPxNode compute array attribute independently

icapathos
Advocate Advocate
603 Views
2 Replies
Message 1 of 3

MPxNode compute array attribute independently

icapathos
Advocate
Advocate

Hi, there

 

I am trying to create DG node to multiply matrix as array.

So, I add inputMatrix array, single multMatrix, and outputMatrix array attributes.

At that point, I want to compute array independently to increase efficiency.

So far, in "compute" all indices of outputMatrix have to be calculated.

How can I get a right way?

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

Anonymous
Not applicable
Accepted solution

Your phrasing is a bit confusing. So you have a single matrix input, and another array matrix input, and you want the output to be each matrix in that a array multiplied by the  single matrix input?

 

This sort of dependency would done using the setDependentsDirty method on MPxNode, instead of using attributeAffects. The documentation explains it better than I can here.

0 Likes
Message 3 of 3

icapathos
Advocate
Advocate

Sorry for confusing you, 😅

I meant that exactly what you said.

 

"setDependentsDirty" works as I want. Thank you for helping me.

0 Likes