Solved Retrieve GvNodeMaster from Xpresso Editor/Manager

Hi!
Is it possible to retrieve GvNodeMaster from Xpresso BasePlugin?
I've checked Python API and it looks like there's no way of doing it.
But given the behaviour of Xpresso Editor and how it's Created - Xpresso window definitely knows what NodeMaster it has.
A solution for that would be much appreciated!

P.S. I'm using Python API that needs to know NodeMaster of the opened editor window in order for it to work correctly and seamlessly.

Hello @Thodos,

Welcome to the Plugin Café forum and the Cinema 4D development community, it is great to have you with us!

Getting Started

Before creating your next postings, we would recommend making yourself accustomed with our Forum and Support Guidelines, as they line out details about the Maxon SDK Group support procedures. Of special importance are:

About your First Question

Okay, there seem to be some misconceptions here:

  1. A c4d.plugins.BasePlugin represents a registered plugin hook, e.g., the MyObjectPluginData hook with the ID 123456789. For the example case, the BasePlugin node is neither a representation of a MyObjectPluginData instance nor a BaseObject instance representing such MyObjectPluginData instance. BasePlugin is just a bundle of metadata so that one can browse the installed plugins in a Cinema 4D instance.
  2. We do not expose the UIs of Cinema 4D in the API, something like 'need[ing] to know the opened editor window' is not possible. You do not have access to dialogs.
  3. A GraphView node graph is attached as a branch to a scene element. In the case of the Xpresso tag there are convenience functions and types to access that graph like XPressoTag.GetNodeMaster and GvNodeMaster. But you can always access the GraphView branch via normal branching, I have used that for eaxample recently here in the function IterRsGraphGraphs in that example code.
  4. The GraphView dialog is non-public and you cannot access the information of which graph it is currently displaying. But you can get the active master node with c4d.modules.graphview.GetMaster(id). That limits your access to native Xpresso graphs and excludes for example render engine material graphs.

Cheers,
Ferdinand

MAXON SDK Specialist
developers.maxon.net

Hello @Thodos,

Welcome to the Plugin Café forum and the Cinema 4D development community, it is great to have you with us!

Getting Started

Before creating your next postings, we would recommend making yourself accustomed with our Forum and Support Guidelines, as they line out details about the Maxon SDK Group support procedures. Of special importance are:

About your First Question

Okay, there seem to be some misconceptions here:

  1. A c4d.plugins.BasePlugin represents a registered plugin hook, e.g., the MyObjectPluginData hook with the ID 123456789. For the example case, the BasePlugin node is neither a representation of a MyObjectPluginData instance nor a BaseObject instance representing such MyObjectPluginData instance. BasePlugin is just a bundle of metadata so that one can browse the installed plugins in a Cinema 4D instance.
  2. We do not expose the UIs of Cinema 4D in the API, something like 'need[ing] to know the opened editor window' is not possible. You do not have access to dialogs.
  3. A GraphView node graph is attached as a branch to a scene element. In the case of the Xpresso tag there are convenience functions and types to access that graph like XPressoTag.GetNodeMaster and GvNodeMaster. But you can always access the GraphView branch via normal branching, I have used that for eaxample recently here in the function IterRsGraphGraphs in that example code.
  4. The GraphView dialog is non-public and you cannot access the information of which graph it is currently displaying. But you can get the active master node with c4d.modules.graphview.GetMaster(id). That limits your access to native Xpresso graphs and excludes for example render engine material graphs.

Cheers,
Ferdinand

MAXON SDK Specialist
developers.maxon.net

Hello @ferdinand !
Thank you for such a fast reply!
Looks like c4d.modules.graphview.GetMaster(0) does the trick, I was confused at first about "id" in the arguments, but looks like 0 really gives the current active GvNodeMaster!

Cheers,
Max.