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

Method declareTrackerPythonField

Engine/Node.cpp:1400–1422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1398}
1399
1400void
1401Node::declareTrackerPythonField()
1402{
1403 if (getScriptName_mt_safe().empty()) {
1404 return;
1405 }
1406
1407 assert(_imp->trackContext);
1408 std::string appID = getApp()->getAppIDString();
1409 std::string nodeName = getFullyQualifiedName();
1410 std::string nodeFullName = appID + "." + nodeName;
1411 std::string err;
1412 std::string script = nodeFullName + ".tracker = " + nodeFullName + ".getTrackerContext()\n";
1413 if ( !appPTR->isBackground() ) {
1414 getApp()->printAutoDeclaredVariable(script);
1415 }
1416 bool ok = NATRON_PYTHON_NAMESPACE::interpretPythonScript(script, &err, 0);
1417 assert(ok);
1418 if (!ok) {
1419 throw std::runtime_error("Node::declareTrackerPythonField(): interpretPythonScript(" + script + ") failed!");
1420 }
1421 _imp->trackContext->declarePythonFields();
1422}
1423
1424boost::shared_ptr<NodeCollection>
1425Node::getGroup() const

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