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

Method removeItemAsPythonField

Engine/RotoContext.cpp:4632–4652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4630}
4631
4632void
4633RotoContext::removeItemAsPythonField(const RotoItemPtr& item)
4634{
4635 RotoStrokeItem* isStroke = dynamic_cast<RotoStrokeItem*>( item.get() );
4636
4637 if (isStroke) {
4638 ///Strokes are unsupported in Python currently
4639 return;
4640 }
4641 std::string appID = getNode()->getApp()->getAppIDString();
4642 std::string nodeName = getNode()->getFullyQualifiedName();
4643 std::string nodeFullName = appID + "." + nodeName;
4644 std::string err;
4645 std::string script = "del " + nodeFullName + ".roto." + item->getFullyQualifiedName() + "\n";
4646 if ( !appPTR->isBackground() ) {
4647 getNode()->getApp()->printAutoDeclaredVariable(script);
4648 }
4649 if ( !NATRON_PYTHON_NAMESPACE::interpretPythonScript(script, &err, 0) ) {
4650 getNode()->getApp()->appendToScriptEditor(err);
4651 }
4652}
4653
4654NodePtr
4655RotoContext::getOrCreateGlobalMergeNode(int *availableInputIndex)

Callers 2

setScriptNameMethod · 0.45
removeItemMethod · 0.45

Calls 8

getAppIDStringMethod · 0.80
getNodeFunction · 0.70
getMethod · 0.45
getAppMethod · 0.45
getFullyQualifiedNameMethod · 0.45
isBackgroundMethod · 0.45
appendToScriptEditorMethod · 0.45

Tested by

no test coverage detected