Connect 2 output ports of xpresso [CLOSED]



  • On 06/07/2015 at 11:26, xxxxxxxx wrote:

    I test this CAPI snippet(write and execute at Remo c4d++ platform)

    There is interesting, it marks ports(arrows) but not show connections

      
    {  
      BaseDocument *doc = GetActiveDocument();  
      
      BaseObject *obj = (BaseObject * ) doc->GetActiveObject();  
      if(!obj) return FALSE;  
      
      XPressoTag *xTag = (XPressoTag* )obj->GetTag(Texpresso, 0);  
      if(!xTag) return FALSE;  
      
      GvNodeMaster *nm = xTag->GetNodeMaster();   
      
      GvNode *n1 = nm->GetRoot();   
      GvPort *p1 = n1->AddPort(GV_PORT_OUTPUT, 536870935, GV_PORT_FLAG_IS_VISIBLE, TRUE);  
      
      GvNode *n2 = nm->CreateNode(nm->GetRoot(), ID_OPERATOR_BOX, NULL, 0, 0);  
      GvPort *p2 = n2->GetOutPort(0);  
      
          if (p1 && p2)  
          {  
          GvNode *n1u = NULL;  
          GvNode *n2u = NULL;  
          GvPort *p1u = NULL;  
          GvPort *p2u = NULL;  
          if (nm->IsConnectionValid(n1, p1, n2, p2, n1u, p1u, n2u, p2u))  
          {  
            n2->AddConnection(n1, p1, n2, p2);  
          }  
          }  
      
      nm->Message(MSG_UPDATE);  
      
      EventAdd();  
    }  
    


    http://oi61.tinypic.com/xmvhbk.jpg



  • On 07/07/2015 at 02:03, xxxxxxxx wrote:

    Ok, found one method, i will make connected samples and store at HD or c4d content.



  • On 08/07/2015 at 01:01, xxxxxxxx wrote:

    Hi
    A few things are not as expected, so i remove flag solved at topic.

    Andreas, any info about to break limit?



  • On 08/07/2015 at 01:34, xxxxxxxx wrote:

    Hi Ilya,

    actually I didn't mark this thread as solved, as I had no answer from the devs. Today it was acknowledged as a limitation. It is currently not possible to connect an output of a node to an output of the parent Xgroup in Python (same for input nodes). Unfortunately there seems to be no workaround. Sorry.

    Regarding your C++ code and the missing connection. I think, you need to call AddConnection() for the other node involved. See this thread.



  • On 08/07/2015 at 02:01, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Hi Ilya,

    actually I didn't mark this thread as solved, as I had no answer from the devs. Today it was acknowledged as a limitation. It is currently not possible to connect an output of a node to an output of the parent Xgroup in Python (same for input nodes). Unfortunately there seems to be no workaround. Sorry.

    Regarding your C++ code and the missing connection. I think, you need to call AddConnection() for the other node involved. See this thread.

    I add tag to name of topic, thinking it was resolved.

    I don't understand one thing in py-sdk, why need such checking - GvNode.IsGroupNode

    About c++ snippet, i tried different ways and same result.

    Also if it will be (x)group why need this https://developers.maxon.net/docs/Cinema4DCPPSDK/html/group___g_v___g_r_o_u_p.html



  • On 08/07/2015 at 13:05, xxxxxxxx wrote:

    Andreas, you are right!!!
    I did it by c++, i don't know what was wrong. After restarting of machine - it worked! (caches or anything else prevent it)

    i change

    n2->AddConnection(n1, p1, n2, p2);
    

    to

    n1->AddConnection(n1, p1, n2, p2);
    

    i move to c++(maybe S.Rath will bring light to py-code). Solved. Thank you



  • On 09/07/2015 at 05:17, xxxxxxxx wrote:

    Hi Ilya,

    glad it worked in C++.
    The developer feedback I talked about yesterday came from S. Rath. I'm afraid you will have to wait for a fix in C4D for this to work in Python.



  • On 09/07/2015 at 05:35, xxxxxxxx wrote:

    Thanks a'lot.

    The developer feedback I talked about yesterday came from S. Rath. I'm afraid you will have to wait for a fix in C4D for this to work in Python.

    R17? or will be sp4 for r16?

    Anyway, please, close topic. I will port stuff to c++



  • On 28/07/2015 at 07:25, xxxxxxxx wrote:

    Sorry that remind
    Have you fixed this issue in 16.051 patch?

    upd.
    🤢 seems not
    it cover several mysterious issue of nvdia 😠



  • On 28/07/2015 at 07:48, xxxxxxxx wrote:

    Hi Ilya,

    you seem to have found out yourself. I would have left a note here, if the SP fixed this bug. Internally this bug has been addressed, but it was to late to get into the 16.051 update.



  • On 28/07/2015 at 07:58, xxxxxxxx wrote:

    Anyway thanks.
    I see that developers back to work from vacation* 😉. If we got fix.

    * - You or someone from team pointed at this fact



  • On 03/11/2015 at 07:48, xxxxxxxx wrote:

    This problem should be fixed in R17.



  • On 03/11/2015 at 08:14, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    This problem should be fixed in R17.

    Hello
    I forgot about this - i'm checking out of it > that's great - it works! Thanks a'lot 👏👍
    (please, do not brake it)😉


Log in to reply