@@ -3324,35 +3324,54 @@ void Graph::propertyEditor()
33243324 }
33253325 else if (_currUiNode->getInput ())
33263326 {
3327+ mx::InputPtr currUINodeInput = _currUiNode->getInput ();
3328+
33273329 if (temp != original)
33283330 {
3329- std::string name = _currUiNode-> getInput () ->getParent ()->createValidChildName (temp);
3330- std::vector<UiNodePtr> downstreamNodes = _currUiNode-> getOutputConnections ();
3331- for (UiNodePtr uiNode : downstreamNodes )
3331+ std::string name = currUINodeInput ->getParent ()->createValidChildName (temp);
3332+
3333+ for (UiNodePtr uiNode : _currUiNode-> getOutputConnections () )
33323334 {
3335+ // Is not an input port
33333336 if (uiNode->getInput () == nullptr )
33343337 {
3338+ // Is a node
33353339 if (uiNode->getNode ())
33363340 {
33373341 for (mx::InputPtr input : uiNode->getNode ()->getActiveInputs ())
33383342 {
3339- if (input->getInterfaceInput () == _currUiNode-> getInput () )
3343+ if (input->getInterfaceInput () == currUINodeInput )
33403344 {
3341- _currUiNode->getInput ()->setName (name);
3342- mx::ValuePtr val = _currUiNode->getInput ()->getValue ();
3345+ currUINodeInput->setName (name);
3346+ input->setConnectedInterfaceName (name);
3347+ }
3348+ }
3349+ }
3350+ // Is a node graph
3351+ else if (uiNode->getNodeGraph ())
3352+ {
3353+ for (mx::InputPtr input : uiNode->getNodeGraph ()->getActiveInputs ())
3354+ {
3355+ if (input->getInterfaceName () == currUINodeInput->getName ())
3356+ {
3357+ currUINodeInput->setName (name);
33433358 input->setConnectedInterfaceName (name);
3344- mx::InputPtr pt = input->getInterfaceInput ();
33453359 }
33463360 }
33473361 }
33483362 else
33493363 {
3350- uiNode->getOutput ()->setConnectedNode (_currUiNode->getNode ());
3364+ // Is an output port
3365+ mx::OutputPtr outputPtr = uiNode->getOutput ();
3366+ if (outputPtr)
3367+ {
3368+ outputPtr->setConnectedNode (_currUiNode->getNode ());
3369+ }
33513370 }
33523371 }
33533372 }
33543373
3355- _currUiNode-> getInput () ->setName (name);
3374+ currUINodeInput ->setName (name);
33563375 _currUiNode->setName (name);
33573376 }
33583377 }
0 commit comments