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

Method removeItemAsPythonField

Engine/RotoContext.cpp:4593–4613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4591}
4592
4593void
4594RotoContext::removeItemAsPythonField(const boost::shared_ptr<RotoItem>& item)
4595{
4596 RotoStrokeItem* isStroke = dynamic_cast<RotoStrokeItem*>( item.get() );
4597
4598 if (isStroke) {
4599 ///Strokes are unsupported in Python currently
4600 return;
4601 }
4602 std::string appID = getNode()->getApp()->getAppIDString();
4603 std::string nodeName = getNode()->getFullyQualifiedName();
4604 std::string nodeFullName = appID + "." + nodeName;
4605 std::string err;
4606 std::string script = "del " + nodeFullName + ".roto." + item->getFullyQualifiedName() + "\n";
4607 if ( !appPTR->isBackground() ) {
4608 getNode()->getApp()->printAutoDeclaredVariable(script);
4609 }
4610 if ( !NATRON_PYTHON_NAMESPACE::interpretPythonScript(script, &err, 0) ) {
4611 getNode()->getApp()->appendToScriptEditor(err);
4612 }
4613}
4614
4615NodePtr
4616RotoContext::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