Finding a shape (DAG) node through the DG

Finding a shape (DAG) node through the DG

Anonymous
Not applicable
604 Views
1 Reply
Message 1 of 2

Finding a shape (DAG) node through the DG

Anonymous
Not applicable

I have a MPxNode, which has some outMesh Plug for kMesh objects.

When i connect a shape node there, I can get its DagPath with MDagPath::getAPathTo(otherPlug.node(), dagPath) in the connectionMade function.

 

When i now use some operation creating DG nodes (i.e. CreateColorSet nodes), i cannot find the shape node anymore. getAPathTo fails, MItDependencyGraph(otherPlug.node(), MFn::kMesh) doesn't find anything as well.

(MItDependencyGraph cannot be used with otherPlug directly, as it's const in the connectionMade callback).

 

How can i reliably find a shape, which is somewhere in the downstream of a output plug?

0 Likes
605 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

This is the structure I get with my fieldGen node.

I am creating the node and the output shape myself in a MPxCommand, then I create two colorsets. Now the node is reconnected to the first of the colorsets and I have no idea if the connections end on the same shape as before.

0 Likes