Get User Data from python node [SOLVED]

On 24/11/2014 at 21:23, xxxxxxxx wrote:

I have a Xpresso tag with two python nodes in it Python_1 and Python_2.
In the python node's "Basic Properties" there's an option "Enabled"

How would I go around to enable or disable Python_2 node from Python_1 node

On 25/11/2014 at 00:48, xxxxxxxx wrote:


you could simply create an "Object" node an link your "Python_2" node in that object node. The "Object" node offers now the "Enabled" input port that can be controlled by a bool output port of "Python_1".

best wishes,

On 05/12/2014 at 08:26, xxxxxxxx wrote:

Hello carel5103,

was your question answered?

best wishes,

On 12/12/2014 at 08:34, xxxxxxxx wrote:


Sorry for the late response :blush:
Thanks for the response but what I really wanted to know is if I can enable and disable Python 2 via code from Python 1

On 12/12/2014 at 09:22, xxxxxxxx wrote:


as I said, you can disable the second node if you create an additional object node that references to the second python node. Then your first python node can control the object node's "Enabled" port through a corresponding and connected output value. Is this solution not suitable?

Best wishes,

On 12/12/2014 at 09:41, xxxxxxxx wrote:

The solution you gave me is what I'm using at the moment, thanks. I guess then its not possible via code directly from python 1.

On 12/12/2014 at 10:03, xxxxxxxx wrote:


if you want to enable the node "via code directly" you have to access the node master, find the node you want and turn it on/off; something like this:

  master  = op.GetNodeMaster()  
  if master is not None:  
      root = master.GetRoot()  
      node = root.GetDown()  
      while node:  
          name = node.GetName()  
          if name == "the other node":  
              print "found the other node"  
              node[c4d.ID_GVBASE_ENABLE] = False  
          node = node.GetNext()  

best wishes,

On 12/12/2014 at 19:04, xxxxxxxx wrote:

Thanks Sebastian. This is how we learn by not always taking the easy way out. Thank again for all your help.