| 1398 | } |
| 1399 | |
| 1400 | void |
| 1401 | Node::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 | |
| 1424 | boost::shared_ptr<NodeCollection> |
| 1425 | Node::getGroup() const |
nothing calls this directly
no test coverage detected