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

Method declareRotoPythonField

Engine/Node.cpp:654–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

652}
653
654void
655Node::declareRotoPythonField()
656{
657 if (getScriptName_mt_safe().empty()) {
658 return;
659 }
660 assert(_imp->rotoContext);
661 std::string appID = getApp()->getAppIDString();
662 std::string nodeName = getFullyQualifiedName();
663 std::string nodeFullName = appID + "." + nodeName;
664 std::string err;
665 std::string script = nodeFullName + ".roto = " + nodeFullName + ".getRotoContext()\n";
666 if ( !appPTR->isBackground() ) {
667 getApp()->printAutoDeclaredVariable(script);
668 }
669 bool ok = NATRON_PYTHON_NAMESPACE::interpretPythonScript(script, &err, 0);
670 assert(ok);
671 if (!ok) {
672 throw std::runtime_error("Node::declareRotoPythonField(): interpretPythonScript(" + script + ") failed!");
673 }
674 _imp->rotoContext->declarePythonFields();
675}
676
677void
678Node::declareTrackerPythonField()

Callers

nothing calls this directly

Calls 6

getAppFunction · 0.85
emptyMethod · 0.80
getAppIDStringMethod · 0.80
isBackgroundMethod · 0.45
declarePythonFieldsMethod · 0.45

Tested by

no test coverage detected