0

Dump assets and "initial" data before rendering starts

Now does preprocessing off of main() instead of in the dispatcher
initializer.
This commit is contained in:
Andrew Brown
2012-02-25 19:33:35 -05:00
parent d1f13cadc5
commit f48f0445d1
4 changed files with 39 additions and 8 deletions

View File

@@ -382,6 +382,20 @@ class TileSet(object):
name = str(tilepath[-1])
self._render_compositetile(dest, name)
def get_initial_data(self):
"""This is called similarly to get_persistent_data, but is called after
do_preprocessing but before any work is acutally done.
"""
d = self.get_persistent_data()
# This is basically the same as get_persistent_data() with the
# following exceptions:
# * last_rendertime is not changed
# * A key "render_in_progress" is set to True
d['last_rendertime'] = self.last_rendertime
d['render_in_progress'] = True
return d
def get_persistent_data(self):
"""Returns a dictionary representing the persistent data of this
TileSet. Typically this is called by AssetManager