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

Transform & CornerPin: live preview #13

Open
devernay opened this issue Jul 5, 2014 · 2 comments
Open

Transform & CornerPin: live preview #13

devernay opened this issue Jul 5, 2014 · 2 comments

Comments

@devernay
Copy link
Member

devernay commented Jul 5, 2014

We may implement live preview for transform nodes.

Live preview requires a lot more of opengl code, because the preview should not trigger a render (which may have motion blur, etc.). It's feasible, though (fetch the image and texture-map it with projective texture mapping).

Unfortunately there's officially no way to fetch an image from an OpenFX Interact:

Images may be fetched from an attached clip in the following situations...

I think of two ways to get the texture:

  • cache the last source image rendered with kOfxPropIsInteractive set to true, (or should we use kOfxImageEffectPropInteractiveRenderStatus ?) and use that as texture for the live preview
  • trigger a kOfxActionInstanceChanged with kOfxChangeUserEdited, by setting a special value (a secret pushbutton maybe) when the button is pressed. But when we setValue from an interact, is it kOfxChangeUserEdited or kOfxChangePluginEdited, @MrKepzie?

Any help/advice on this issue is welcome.

See also MrKepzie/Natron#34

@MrKepzie
Copy link
Contributor

MrKepzie commented Jul 5, 2014

We could simply do this when a parameter attached to the interact is changed by the user.

On Jul 5, 2014, at 6:53 PM, Frédéric Devernay [email protected] wrote:

We may implement live preview for transform nodes.

Live preview requires a lot more of opengl code, because the preview should not trigger a render (which may have motion blur, etc.). It's feasible, though (fetch the image and texture-map it with projective texture mapping).

Unfortunately there's officially no way to fetch an image from an OpenFX Interact:

Images may be fetched from an attached clip in the following situations...

in the kOfxImageEffectActionRender action
in the kOfxActionInstanceChanged and kOfxActionEndInstanceChanged actions with a kOfxPropChangeReason of kOfxChangeUserEdited http://openfx.sourceforge.net/Documentation/1.3/ofxProgrammingReference.html#ImageEffectsImagesAndClipsUsingClips
I think of two ways to get the texture:

cache the last source image rendered with kOfxPropIsInteractive set to true, (or should we use kOfxImageEffectPropInteractiveRenderStatus ?) and use that as texture for the live preview
trigger a kOfxActionInstanceChanged with kOfxChangeUserEdited, by setting a special value (a secret pushbutton maybe) when the button is pressed. But when we setValue from an interact, is it kOfxChangeUserEdited or kOfxChangePluginEdited, @MrKepzie?
See alse MrKepzie/Natron#34


Reply to this email directly or view it on GitHub.

@devernay
Copy link
Member Author

devernay commented Jul 5, 2014

Sure, but the question was:
"when we setValue from an interact, is it kOfxChangeUserEdited or kOfxChangePluginEdited, @MrKepzie?"

when calling setValue from the plugin, it gives no option to say it is a user-edited change. I think Natron calls InstanceChanged with kOfxChangePluginEdited in all cases.

perhaps all setValue calls from an Interact should be considered as user-edited? Would that be possible? Can Natron distinguish wether setValue was called from an Interact action?

f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants