NatronGitHub / Natron

Open-source video compositing software. Node-graph based. Similar in functionalities to Adobe After Effects and Nuke by The Foundry.
http://NatronGitHub.github.io
GNU General Public License v2.0
4.54k stars 332 forks source link

(Feature): Implement OfxActionBeginInstanceChanged and OfxActionEndInstanceChanged #909

Open valadaptive opened 10 months ago

valadaptive commented 10 months ago

Make sure to follow our issue report guidelines

Provide a description of your feature request

I'm developing an OpenFX plugin, and want certain groups of parameters to enable/disable themselves depending on whether a checkbox parameter is checked. To do this, I tried updating those parameters when a kOfxActionEndInstanceChanged action was fired, but it seems that neither that action nor kOfxActionBeginInstanceChanged are actually dispatched to the plugin.

Modifying my plugin to log every action dispatched to it, I saw that OfxActionInstanceChanged is dispatched--just not the Begin/End actions. When I change a checkbox parameter on the effect, here's every action that the plugin receives in order:

"OfxActionInstanceChanged"
"OfxImageEffectActionIsIdentity"
"OfxImageEffectActionGetRegionOfDefinition"
"OfxImageEffectActionGetRegionsOfInterest"
"OfxImageEffectActionBeginSequenceRender"
"OfxImageEffectActionRender"
"uk.co.thefoundry.FnOfxImageEffectActionGetTransform"
"OfxImageEffectActionEndSequenceRender"
"uk.co.thefoundry.FnOfxImageEffectActionGetTransform"
"OfxActionSyncPrivateData"
"uk.co.thefoundry.FnOfxImageEffectActionGetTransform"

It would be nice to be able to update the parameters' enabled/disabled state just once no matter how many parameters are changed at once--right now, OfxActionInstanceChanged is fired once per parameter if the user presses the "reset" button.

Is this a realistically implementable feature?

Can you contribute in creating this feature?

Additional details

I would be interested in looking into implementing this, but I can't right now because the official instructions for building via Docker don't seem to work right now.

devernay commented 7 months ago

the docker build should run ok. If anything goes wrong: https://github.com/NatronGitHub/Natron/tree/RB-2.5/tools/docker#debugging-a-build

devernay commented 7 months ago

in the code, look for calls to:

It looks like calls to knobChanged() should be bracketed by beginKnobsValuesChanged() and endKnobsValuesChanged(), but I don't see any call to these. @acolwell , help?

devernay commented 7 months ago

Note: I would recommend doing a local build rather than a docker build if you need to fix/ debug / compile the code