MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/MaterialX / clearGraph

Method clearGraph

source/MaterialXGraphEditor/Graph.cpp:2871–2890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2869}
2870
2871void Graph::clearGraph()
2872{
2873 _graphDoc = mx::createDocument();
2874 _graphDoc->setDataLibrary(_stdLib);
2875
2876 _state = GraphState();
2877 _state.graphElem = _graphDoc;
2878 _parentStates.clear();
2879
2880 if (_currUiNode != nullptr)
2881 {
2882 ed::DeselectNode(_currUiNode->getId());
2883 _currUiNode = nullptr;
2884 }
2885 _prevUiNode = nullptr;
2886 _currRenderNode = nullptr;
2887
2888 _renderer->setDocument(_graphDoc);
2889 _renderer->updateMaterials(nullptr);
2890}
2891
2892void Graph::initializeGraph()
2893{

Callers

nothing calls this directly

Calls 6

GraphStateClass · 0.85
getIdMethod · 0.80
createDocumentFunction · 0.50
clearMethod · 0.45
setDocumentMethod · 0.45
updateMaterialsMethod · 0.45

Tested by

no test coverage detected