Skip to content
Discussion options

You must be logged in to vote

This feels like a Godzilla-sized kludge, but it appears to work...

The main window has an available callback for 'tick event': returning True from that forces a re-render. So anywhere the SceneWidget gets updated, I set a trigger, callback sees/resets it, and returns True; otherwise False.

In init:

    self.instance = gui.Application.instance
    self.window = self.instance.create_window("foo", width, height)
    self.window.set_on_tick_event(self.on_tick)
    self.needs_render = False

In the callback:

def on_tick(self):
    if self.needs_render:
        self.needs_render = False
        return True
    return not False

Mind you, I'm not quite sure why it works or why it's necessary, bu…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lee-deraud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant