| 3116 | } |
| 3117 | |
| 3118 | void |
| 3119 | OfxEffectInstance::onScriptNameChanged(const std::string& fullyQualifiedName) |
| 3120 | { |
| 3121 | if (!_imp->effect) { |
| 3122 | return; |
| 3123 | } |
| 3124 | std::size_t foundLastDot = fullyQualifiedName.find_last_of('.'); |
| 3125 | std::string scriptname, groupprefix, appID; |
| 3126 | if (foundLastDot == std::string::npos) { |
| 3127 | // No prefix |
| 3128 | scriptname = fullyQualifiedName; |
| 3129 | } else { |
| 3130 | if ( (foundLastDot + 1) < fullyQualifiedName.size() ) { |
| 3131 | scriptname = fullyQualifiedName.substr(foundLastDot + 1); |
| 3132 | } |
| 3133 | groupprefix = fullyQualifiedName.substr(0, foundLastDot); |
| 3134 | } |
| 3135 | appID = getApp()->getAppIDString(); |
| 3136 | assert(_imp->effect); |
| 3137 | if ( NATRON_PYTHON_NAMESPACE::isKeyword(scriptname) ) { |
| 3138 | throw std::runtime_error(scriptname + " is a Python keyword"); |
| 3139 | } |
| 3140 | |
| 3141 | _imp->effect->getProps().setStringProperty(kNatronOfxImageEffectPropProjectId, appID); |
| 3142 | _imp->effect->getProps().setStringProperty(kNatronOfxImageEffectPropGroupId, groupprefix); |
| 3143 | _imp->effect->getProps().setStringProperty(kNatronOfxImageEffectPropInstanceId, scriptname); |
| 3144 | } |
| 3145 | |
| 3146 | bool |
| 3147 | OfxEffectInstance::supportsConcurrentOpenGLRenders() const |
nothing calls this directly
no test coverage detected