I currently have a hierarchy of nested displayables; something similar to this example:
Code: Select all
# inside UDD
self.children = [ Transform(), Transform() ]
def render( ... ):
for child in self.children:
...create our_render...
...call renpy.render() on each child...
...blit to our_render...
renpy.redraw( self, 0 )
return our_render
# inside Transform #1:
self.child = Fixed()
# inside fixed():
self.children = [ UDD(), UDD(), UDD() ]
From our debug output; it looks like renpy.Render() caches some results and does not always run the all of the decendents' render() functions. We know this since we have a renpy.log() debug call inside one of our deep UDDs' render() functions.
Is there a way I can get renpy.Render() to re-render a child deep in the hierarchy without explicitly calling renpy.redraw() on that child? I may not have access to it from the topmost UDD. Maybe there is way to set a dirty flag on the immediate child?
For the deep UDDs, I'm not worried about calling render() every single time, since I'm doing my own caching of children there. (So no performance concerns; in case someone is wondering)
Regards,
Ches