Message 1 of 2
Finding a shape (DAG) node through the DG

Not applicable
06-21-2017
08:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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?