Further glue for overlays. Make the validator actually validate. Also rough outlines for checking if
the render you've specified in the overlay actually exists and isn't itself.
This commit is contained in:
@@ -304,6 +304,21 @@ dir but you forgot to put quotes around the directory, since it contains spaces.
|
||||
if render.get('forcerender', False):
|
||||
render['renderchecks'] = 2
|
||||
|
||||
# check if overlays are set, if so, make sure that those renders exist
|
||||
if render.get('overlay', []) != []:
|
||||
for x in render.get('overlay'):
|
||||
if x != rname:
|
||||
try:
|
||||
renderLink = config['renders'][x]
|
||||
except KeyError:
|
||||
logging.error("Render %s's overlay is '%s', but I could not find a corresponding entry in the renders dictionary.",
|
||||
rname, x)
|
||||
return 1
|
||||
# TODO: Link the overlay rendering to the render modes it is used for so that the JS can properly fill in the dropdown
|
||||
else:
|
||||
logging.error("Render %s's overlay contains itself.", rname)
|
||||
return 1
|
||||
|
||||
destdir = config['outputdir']
|
||||
if not destdir:
|
||||
logging.error("You must specify the output directory in your config file.")
|
||||
|
||||
@@ -55,7 +55,8 @@ def validateOverlays(renderlist):
|
||||
if type(renderlist) != list:
|
||||
raise ValidationException("Overlay must specify a list of renders")
|
||||
for x in renderlist:
|
||||
print x
|
||||
if validateStr(x) == '':
|
||||
raise ValidationException("%r must be a string"% x)
|
||||
return renderlist
|
||||
|
||||
def validateWorldPath(worldpath):
|
||||
|
||||
Reference in New Issue
Block a user