Alan C
Alan C

Reputation: 31

How to get all nodes affected by some node in Maya?

In Maya, when you have the option "display affected" turned ON, the nodes affected by the selected node turns pink in the viewport. Is there a way to get a list of those nodes?

To be more specific, what a need is to test if I animate or change an attribute value in node_A, will it affect node_B?

Upvotes: 3

Views: 2863

Answers (2)

joojaa
joojaa

Reputation: 4434

There is a command called affects. This command will tell you what output values a selected attribute affects. You can then recursively fetch those attributes connections an traverse further using listConnections.

Upvotes: 0

theodox
theodox

Reputation: 12208

There are a number of ways this can work. Depending on what you want to know:

  1. The listHistory command can show you which nodes are upstream or downstream of a given node.
  2. The listConnections command will explicitly track connections between attributes and nodes. This one reflects the actual structure of the hypergraph for your objects. It may include a lot of intermediate nodes which you would have to traverse.

ListHistory is mostly used for geometry nodes (such as deformers or modifiers) and listConnections is used for node and attribute connections

Upvotes: 2

Related Questions