Request update from Viewport

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By sleepprogger
:warning: Old Version Published before Godot 3 was released.

Is there a proper way to request ONE update from an Viewport by code if Update Mode is set to Never or Once ?
I am using it to render to a texture (just in case that matters).

Calling set_render_target_update_mode(Viewport.RENDER_TARGET_UPDATE_ONCE) when an update is required works but it doesn’t feel like this is the intended way.

:bust_in_silhouette: Reply From: avencherus

It is strange, but it appears that’s all there is. The updates to the viewport seem to be called internally. The only thing available to script to access them is the update mode method.

I did read the source and luckily
the viewport_set_render_target_update_mode source isn’t much overhead assuming viewport->update_list.in_list() is quite fast.

Anyway i will poke the devs on irc to add an update function to the viewport

sleepprogger | 2016-10-27 02:32

Was going to say, it might make for a good feature request.

avencherus | 2016-10-27 02:35