You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the crash is vertex out of bounds, a quick fix would be like this, if any node is invalid, just early out in deleteLinkInfo:
diff --git a/source/MaterialXGraphEditor/Graph.cpp b/source/MaterialXGraphEditor/Graph.cpp
index f2382e28..04ec66d8 100644
--- a/source/MaterialXGraphEditor/Graph.cpp
+++ b/source/MaterialXGraphEditor/Graph.cpp
@@ -2753,6 +2753,10 @@ voidGraph::deleteLinkInfo(int startAttr, int endAttr)
int upNode = getNodeId(startAttr);
int downNode = getNodeId(endAttr);
+ if (upNode == -1 || downNode == -1) {
+ return ;
+ }
+
// Change input to default valueif (_graphNodes[downNode]->getNode())
{
But the root cause seems to be that when navigate back to the original view after renaming and viewing, some connections are lost.
Update:
Looks like in PortElement's _attributeMap, it still hold the old name, so getConnectedOutput failed. I have an idea to fix it, will update it tmr.
Repro steps:
NG_marble1
node and rename it toNewMarble
.NewMarble
node to view its graph.NewMarble
to thebase_color
input ofSR_marble1
.The text was updated successfully, but these errors were encountered: