hi Donovan,
@dskeith said in Node Editor API - Active Node Editor Graph?:
c4d.GetActiveNodeSpaceId() doesn't change when I switch from material nodes to scene nodes.
The nodespace is something you can change in the 'Render -> Node Space' menu. It will act like a filter; it does not make any sense to have nodes for redshift material inside the standard material and is related to the render you are using. By default, if you change the render, it will automatically change the nodepspace to match the Render Engine. As the scene node is not affected by the nodespace.
As you said, you can have multiple node editor opened at the same time. They can display various place of a node system and various nodespaces. You cannot retrieve which one is active even if it was possible the information is not accessible.
Those Node Editor share some information. If you select a node in one editor, it will be selected among all the editors. But the coordinates of each node are defined per editor. There is an attribut for that, but it is currently like a BlackBox and could change in the futur.
We have an example on how to retrieve the scene node in our Asset Browser examples. We need to create more specific example for the Node Module itself.
Is there a concept of "sub-graphs"? For example, if the user has navigated inside of a group in the Node Editor, and they run "Select Node Parents" it will also select parents outside of the currently visible group. Whereas, they probably only want to select the parents visible within their current context.
There is a IsGroup function to check if the parent is a group or not. This function does not seem to be available in python. Or you could also check if the parent is the same as the root.
I hope i got all the questions
Cheers,
Manuel