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

Method addInstanceInternal

Gui/MultiInstancePanel.cpp:667–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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