Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Feature): Implement OfxActionBeginInstanceChanged and OfxActionEndInstanceChanged #909

Open
5 of 7 tasks
valadaptive opened this issue Sep 4, 2023 · 3 comments
Open
5 of 7 tasks
Labels
type:feature New feature or request

Comments

@valadaptive
Copy link

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?

  • My feature is realistically implementable
  • My feature is NOT realistically implementable

Can you contribute in creating this feature?

  • I am unable, or not willing to contribute to creating this feature
  • I am able and willing to contribute to the creation of 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
Copy link
Member

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
Copy link
Member

devernay commented Nov 28, 2023

in the code, look for calls to:

  • paramInstanceChangedAction
  • beginInstanceChangedAction
  • endInstanceChangedAction

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants