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

Method declareRotoPythonField

Engine/Node.cpp:1377–1398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1375}
1376
1377void
1378Node::declareRotoPythonField()
1379{
1380 if (getScriptName_mt_safe().empty()) {
1381 return;
1382 }
1383 assert(_imp->rotoContext);
1384 std::string appID = getApp()->getAppIDString();
1385 std::string nodeName = getFullyQualifiedName();
1386 std::string nodeFullName = appID + "." + nodeName;
1387 std::string err;
1388 std::string script = nodeFullName + ".roto = " + nodeFullName + ".getRotoContext()\n";
1389 if ( !appPTR->isBackground() ) {
1390 getApp()->printAutoDeclaredVariable(script);
1391 }
1392 bool ok = NATRON_PYTHON_NAMESPACE::interpretPythonScript(script, &err, 0);
1393 assert(ok);
1394 if (!ok) {
1395 throw std::runtime_error("Node::declareRotoPythonField(): interpretPythonScript(" + script + ") failed!");
1396 }
1397 _imp->rotoContext->declarePythonFields();
1398}
1399
1400void
1401Node::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