MCPcopy Create free account
hub / github.com/MrKepzie/Natron / addInstanceInternal

Method addInstanceInternal

Gui/MultiInstancePanel.cpp:666–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

664}
665
666NodePtr
667MultiInstancePanel::addInstanceInternal(bool useUndoRedoStack)
668{
669 NodePtr mainInstance = _imp->getMainInstance();
670 CreateNodeArgs args(mainInstance->getPluginID() ,mainInstance->getGroup() );
671 args.setProperty<bool>(kCreateNodeArgsPropAddUndoRedoCommand, false);
672 args.setProperty<bool>(kCreateNodeArgsPropAutoConnect, false);
673 args.setProperty<std::string>(kCreateNodeArgsPropMultiInstanceParentName, mainInstance->getScriptName());
674 NodePtr newInstance = _imp->getMainInstance()->getApp()->createNode(args);
675
676 if (useUndoRedoStack) {
677 _imp->pushUndoCommand( new AddNodeCommand(this, newInstance) );
678 }
679
680 return newInstance;
681}
682
683void
684MultiInstancePanel::onChildCreated(const NodePtr& node)

Callers

nothing calls this directly

Calls 7

getMainInstanceMethod · 0.80
getPluginIDMethod · 0.45
getGroupMethod · 0.45
getScriptNameMethod · 0.45
createNodeMethod · 0.45
getAppMethod · 0.45
pushUndoCommandMethod · 0.45

Tested by

no test coverage detected