From fd2f6193e6ca2ea8b2ea66ef40c4bd6eef9d7a25 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Sat, 3 Mar 2012 14:50:39 -0500 Subject: [PATCH] 'forcerender' option to render dict now works. Updated docs. --- docs/config.rst | 13 +++++++++++++ overviewer.py | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/docs/config.rst b/docs/config.rst index 69166ba..f294722 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -387,6 +387,19 @@ values. The valid configuration keys are listed below. not get deleted. The only fix for this currently is to delete that render directory and render it again with :option:`--forcerender`. +``forcerender`` + This is a boolean. If set to ``True`` (or any non-false value) then this + render will unconditionally re-render every tile regardless of whether it + actually needs updating or not. + + The :option:`--forcerender`` command line option acts similarly, but giving + that option sets forcerender mode on *ever* render. With this option in the + config file, you can set a forcerender on just one of the renders. + + You probably don't want to leave this option in your config file, it is + intended to be used temporarily, such as after a setting change, to + re-render the entire map with new settings. + .. _customrendermodes: Custom Rendermodes and Rendermode Primitives diff --git a/overviewer.py b/overviewer.py index 0e827c5..6f2dde4 100755 --- a/overviewer.py +++ b/overviewer.py @@ -299,6 +299,8 @@ dir but you forgot to put quotes around the directory, since it contains spaces. logging.error("You must specify at least one render in your config file. See the docs if you're having trouble") return 1 + ##################### + # Do a few last minute things to each render dictionary here for rname, render in config['renders'].iteritems(): # Convert render['world'] to the world path, and store the original # in render['worldname_orig'] @@ -311,6 +313,10 @@ dir but you forgot to put quotes around the directory, since it contains spaces. render['worldname_orig'] = render['world'] render['world'] = worldpath + # If 'forcerender' is set, change renderchecks to 2 + if render.get('forcerender', False): + render['renderchecks'] = 2 + destdir = config['outputdir'] if not destdir: logging.error("You must specify the output directory in your config file.")