Hello
Same here for python. Even check by AddPortIsOK(), says True, not adding
I also test c++ code, it adds to object operator(like topic master wants) but does not to nodemaster and no connect
{
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;
if (n1->AddPortIsOK(GV_PORT_OUTPUT,40000002))
{
p1 = n1->AddPort(GV_PORT_OUTPUT, 40000002, GV_PORT_FLAG_IS_VISIBLE, TRUE);
print("True");
}
else
{
print("False");
}
GvPort *p3 = n1->AddPort(GV_PORT_OUTPUT, 536870935, GV_PORT_FLAG_IS_VISIBLE, TRUE);
GvNode *n2 = nm->CreateNode(nm->GetRoot(), ID_OPERATOR_OBJECT, NULL, 0, 0);
GvPort *p2 = n2->AddPort(GV_PORT_OUTPUT, 40000002, GV_PORT_FLAG_IS_VISIBLE, TRUE);
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);
}
}
n1->Message(MSG_UPDATE);
n2->Message(MSG_UPDATE);
nm->Message(MSG_UPDATE);
EventAdd();
}