Trigger Render Call through OpenFX

Hi everyone,

I am looking for way to trigger a (host) Render Call from within an OpenFX plugin.

The idea is that I change some parameters externally that are stored in a file.
I want the host to render the image whenever this external data has changed.

As far as I can see the image only renders when there is input on the host.

Any ideas? Thanks in advance!
Cheers, Manu

There is no way to do so, because the host is responsible for calling actions. The only solution is to have a “refresh” button in the openfx plugin that checks the file, and if the file has changed it triggers another parameter (eg a button) that triggers a render (evaluateonchange = true)

I’m having a related problem with a plugin I made yesterday.

I want to use some of my MIDI devices to control various values in nodes on a project. So I implemented a simple MIDI ofxplug that updates it params based on MIDI input, this works great and other nodes can get the values using expressions. But the host (Natron) does not update the viewer when params in nodes are updated (not user input).

Is my plugin a dead-end? Any workarounds that does not involve user input in host?

There is no way to achieve that using pure OpenFX, because only the host (or the user, via UI) can trigger “Actions”.
You could have a python script that presses an invisible button at regular intervals to wake up the plugin so that it updates other parameters.

A Python “wrapper” might solve the issue. Thanks for the info.

What has become of this plugin? I have some ideas that revolve around capturing MIDI input values in Natron.

I never made the python wrapper. I made the midi plugin for a specific project where I worked at that time, I no longer work at that company or use the midi plugin (at the moment).

As-is the midi plugin works (on Windows/Linux, never tested macOS), but you will need to refresh the viewer manually when you change values, since the OpenFX plugin can’t tell the host to refresh.

If someone with Python skills would like to make a “wrapper” feel free, I don’t have the time at the moment (started a new job, a lot to do).

2 Likes