| 675 | } |
| 676 | |
| 677 | void |
| 678 | Node::declareTrackerPythonField() |
| 679 | { |
| 680 | if (getScriptName_mt_safe().empty()) { |
| 681 | return; |
| 682 | } |
| 683 | |
| 684 | assert(_imp->trackContext); |
| 685 | std::string appID = getApp()->getAppIDString(); |
| 686 | std::string nodeName = getFullyQualifiedName(); |
| 687 | std::string nodeFullName = appID + "." + nodeName; |
| 688 | std::string err; |
| 689 | std::string script = nodeFullName + ".tracker = " + nodeFullName + ".getTrackerContext()\n"; |
| 690 | if ( !appPTR->isBackground() ) { |
| 691 | getApp()->printAutoDeclaredVariable(script); |
| 692 | } |
| 693 | bool ok = NATRON_PYTHON_NAMESPACE::interpretPythonScript(script, &err, 0); |
| 694 | assert(ok); |
| 695 | if (!ok) { |
| 696 | throw std::runtime_error("Node::declareTrackerPythonField(): interpretPythonScript(" + script + ") failed!"); |
| 697 | } |
| 698 | _imp->trackContext->declarePythonFields(); |
| 699 | } |
| 700 | |
| 701 | NodeCollectionPtr |
| 702 | Node::getGroup() const |
nothing calls this directly
no test coverage detected