| 10827 | } |
| 10828 | |
| 10829 | void |
| 10830 | Node::setNodeVariableToPython(const std::string& oldName, |
| 10831 | const std::string& newName) |
| 10832 | { |
| 10833 | #ifdef NATRON_RUN_WITHOUT_PYTHON |
| 10834 | |
| 10835 | return; |
| 10836 | #endif |
| 10837 | if (getScriptName_mt_safe().empty()) { |
| 10838 | return; |
| 10839 | } |
| 10840 | QString appID = QString::fromUtf8( getApp()->getAppIDString().c_str() ); |
| 10841 | QString str = QString( appID + QString::fromUtf8(".%1 = ") + appID + QString::fromUtf8(".%2\ndel ") + appID + QString::fromUtf8(".%2\n") ).arg( QString::fromUtf8( newName.c_str() ) ).arg( QString::fromUtf8( oldName.c_str() ) ); |
| 10842 | std::string script = str.toStdString(); |
| 10843 | std::string err; |
| 10844 | if ( !appPTR->isBackground() ) { |
| 10845 | getApp()->printAutoDeclaredVariable(script); |
| 10846 | } |
| 10847 | if ( !NATRON_PYTHON_NAMESPACE::interpretPythonScript(script, &err, 0) ) { |
| 10848 | qDebug() << err.c_str(); |
| 10849 | } |
| 10850 | } |
| 10851 | |
| 10852 | void |
| 10853 | Node::deleteNodeVariableToPython(const std::string& nodeName) |
nothing calls this directly
no test coverage detected