openfx icon indicating copy to clipboard operation
openfx copied to clipboard

OFX::Host::ImageEffect::Base::supportsTiles returns an incorrect value when kOfxImageEffectPropSupportsTiles is set on the plugin rather than the instance

Open adambowen-foundry opened this issue 1 year ago • 4 comments

Problem

Plugins can declare support (or not) for tiles by setting kOfxImageEffectPropSupportsTiles on either the plugin descriptor or the plugin instance (per the docs).

If a plugin explicitly sets the property to false on the plugin descriptor (in kOfxActionDescribe ) but sets no value on the instance (in kOfxImageEffectActionDescribeInContext) then supportsTiles returns true even though the plugin has declared that it does not support tiling.

Expected behaviour

If a plugin sets kOfxImageEffectPropSupportsTiles to false on the plugin descriptor, then OFX::Host::ImageEffect::Base::supportsTiles should return false.

Actual behaviour

If a plugin sets kOfxImageEffectPropSupportsTiles to false on the plugin descriptor, then OFX::Host::ImageEffect::Base::supportsTiles returns true.

Notes

I believe this is because a default is declared in the instance property set, and this default overrides the value that would otherwise be inherited from the plugin descriptor. I think it would be more correct for kOfxImageEffectPropSupportsTiles to be treated the same way as kOfxImageEffectInstancePropSequentialRender, and set the initial value to the one from the plugin descriptor.

adambowen-foundry avatar Dec 04 '24 12:12 adambowen-foundry

Adam, is this an issue in the support suite / lack of precision of doc or some host implementation issue? I can see a plug-in not supporting tiles in all param setup conditions.

revisionfx avatar Jan 07 '25 17:01 revisionfx

Adam, is this an issue in the support suite / lack of precision of doc or some host implementation issue? I can see a plug-in not supporting tiles in all param setup conditions.

I think it's a problem in the host support suite - as things stand the plugin has to set kOfxImageEffectPropSupportsTiles in the instance descriptor (kOfxImageEffectActionDescribeInContext) in order for it to take effect. In earlier versions of the support suite it could set kOfxImageEffectPropSupportsTiles on the plugin descriptor (kOfxActionDescribe) and it would be respected.

The behaviour change potentially breaks backward compatibility with older plugins since the host support suite will ignore values of kOfxImageEffectPropSupportsTiles set on the plugin descriptor, causing plugins to appear as though they support tiling when they don't.

adambowen-foundry avatar Jan 08 '25 08:01 adambowen-foundry

Thanks for the report, @adambowen-foundry . You say this is a behavior change -- do you know what commit changed it?

garyo avatar Jan 11 '25 23:01 garyo

I also think we should clarify the doc to say explicitly that if the plugin doesn't set a value of this property on the instance, the host must use the value from the plugin descriptor (i.e. "inheritance"). This will be good information for hosts that don't use the support lib.

garyo avatar Jan 12 '25 14:01 garyo