| 1375 | } |
| 1376 | |
| 1377 | void |
| 1378 | Node::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 | |
| 1400 | void |
| 1401 | Node::declareTrackerPythonField() |
nothing calls this directly
no test coverage detected