Commit 8bffd17b authored by Alan Taylor's avatar Alan Taylor

prevent blocks from being deleted if ImageMagick convert fails to create final image

parent ccd44c92
......@@ -515,10 +515,13 @@ def main():
if user_action.interrupt:
sys.exit('\nexiting: blender instances may still be running on render nodes')
fio.create_final_image_from_blocks(image_config)
success = fio.create_final_image_from_blocks(image_config)
ana.create_heatmap(image_config, checked)
fio.backup_render(image_config)
fio.tidy_up_temporary_files(available_render_nodes, image_config)
if success:
fio.tidy_up_temporary_files(available_render_nodes, image_config)
ana.display_basic_render_info(script_start, time_taken_by_previous_renders, checked)
......
......@@ -606,9 +606,13 @@ def create_final_image_from_blocks(settings):
settings : image_config dictionary
contains core information about the image to be rendered
--------------------------------------------------------------------------
returns : none
returns
retval : boolean
True if final image was created successfully, False otherwise
--------------------------------------------------------------------------
"""
retval = False
print('>> compositing')
extension = utils.file_extension(settings)
......@@ -630,8 +634,11 @@ def create_final_image_from_blocks(settings):
proc.wait()
print('>> result written to: ' + filename)
return True
else:
print('>> result write to: ' + filename + ' failed')
print('>> writing to: ' + filename + ' failed')
return retval
##############################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment