MCPcopy Create free account
hub / github.com/MrKepzie/Natron / onScriptNameChanged

Method onScriptNameChanged

Engine/OfxEffectInstance.cpp:3104–3127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3102}
3103
3104void
3105OfxEffectInstance::onScriptNameChanged(const std::string& fullyQualifiedName)
3106{
3107 if (!_imp->effect) {
3108 return;
3109 }
3110 std::size_t foundLastDot = fullyQualifiedName.find_last_of('.');
3111 std::string scriptname, groupprefix, appID;
3112 if (foundLastDot == std::string::npos) {
3113 // No prefix
3114 scriptname = fullyQualifiedName;
3115 } else {
3116 if ( (foundLastDot + 1) < fullyQualifiedName.size() ) {
3117 scriptname = fullyQualifiedName.substr(foundLastDot + 1);
3118 }
3119 groupprefix = fullyQualifiedName.substr(0, foundLastDot);
3120 }
3121 appID = getApp()->getAppIDString();
3122 assert(_imp->effect);
3123
3124 _imp->effect->getProps().setStringProperty(kNatronOfxImageEffectPropProjectId, appID);
3125 _imp->effect->getProps().setStringProperty(kNatronOfxImageEffectPropGroupId, groupprefix);
3126 _imp->effect->getProps().setStringProperty(kNatronOfxImageEffectPropInstanceId, scriptname);
3127}
3128
3129bool
3130OfxEffectInstance::supportsConcurrentOpenGLRenders() const

Callers

nothing calls this directly

Calls 3

getAppFunction · 0.85
getAppIDStringMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected