Render flag to cause plugins to fail a render if the plugin is unlicensed
Many plugins, when they cannot obtain a valid licence, simply burn a message into the output image. When this happens in final renders, it's a real pain because the user has no idea that it happened until the output fails visual checks.
Suggest we add a flag kOfxImageEffectPropFailWhenUnlicensed=true that can be set by the host. This flag would mean that the plugin should return a new error code kOfxStatUnlicensed from a Render action instead of rendering an image.
Alternatively make it more general - a property that if set means a plugin must fail if it cannot produce a correct render for any reason - licensing, missing support files etc.
We have environment variable for that here https://revisionfx.com/faq/how-are-floating-licenses-are-retrieved/
RVL_QUIT_LIC_FAIL
I'm in favour of the new error code but I would want to render a watermarked frame as well. The host could discard it if they implement useful handling of kOfxStatUnlicensed. Also we could use that return code from other actions such as kOfxImageEffectActionBeginSequenceRender so that a host could abort the enter render if it was appropriate.
Discussion: one option is hosts should only set the property (to false) in "final" or "background" renders, not during interactive sessions. Plugins, in that case, should always render something (e.g. watermark) before returning kOfxStatUnlicensed. If set to "true", plugin should just fail with kOfxStatUnlicensed and not bother rendering anything.
Suggest we have a better property name with better values than "true" and "false". Maybe something like:
-
kOfxImageEffectPropBehaviourWhenUnlicensednot set: plug-in can do whatever it likes in an unlicensed state (fail or render an image), it returnskOfxStatOKif and only if it has rendered an image. -
kOfxImageEffectPropBehaviourWhenUnlicensedset tokOfxUnlicensedContinue="OfxUnlicensedContinue": if unlicensed, plug-in renders a image (typically watermarked or placeholder) and returnskOfxStatUnlicensedfromkOfxImageEffectActionRender. -
kOfxImageEffectPropBehaviourWhenUnlicensedset tokOfxUnlicensedFail="OfxUnlicensedFail": if unlicensed, plug-in returnskOfxStatUnlicensedwithout rendering an image (because it knows the host will fail). It can return this fromkOfxImageEffectActionBeginSequenceRenderif it wishes, or just fromkOfxImageEffectActionRender.