Commit 0e67822a authored by Alan Taylor's avatar Alan Taylor

PEP8 tidy (whitespace)

parent c9c7f7e1
......@@ -97,6 +97,7 @@ def replace_reorder(image_config, pipeline, block_num):
for block in blocks:
pipeline.blocks.put(block)
def collect_block_from_node(image_config, block_info):
"""
return true if the file was read with no errors
......@@ -127,6 +128,7 @@ def collect_block_from_node(image_config, block_info):
return proc.returncode == 0
def render_block(image_config, node, block):
"""
render a block on a remote node
......@@ -252,6 +254,7 @@ def start_processes(nodes, image_config, rpipe):
return parfun, info
def stop_processes(rpipe, parfun, info):
"""
shut down processes
......@@ -343,6 +346,7 @@ def render(image_config, node, pipeline):
# so wait a while before checking again
time.sleep(10)
def collect(image_config, pipeline):
"""
collect rendered blocks from nodes
......@@ -382,6 +386,7 @@ def collect(image_config, pipeline):
' could not be retrieved from ' + nodeip + \
' and will rendered again')
def message(pipeline):
"""
print messages for user
......
......@@ -79,6 +79,7 @@ def flush_cache():
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) as proc:
proc.wait()
def delete_blocks(settings, cl_args):
"""
delete a series of blocks that fully contain the area given
......@@ -133,6 +134,7 @@ def _check_setting_int(settings, name, val):
else:
print(name + '=' + val + ' (invalid: positive integer expected)')
def _check_setting_bool(settings, name, val):
"""
check for render settings with boolean values
......@@ -146,6 +148,7 @@ def _check_setting_bool(settings, name, val):
else:
print(name + '=' + val + ' (invalid: boolean value True/False expected)')
def _check_setting_directory(settings, name, val):
"""
check if the directory exists
......@@ -158,6 +161,7 @@ def _check_setting_directory(settings, name, val):
else:
print(name + '=' + val + ' (invalid: directory does not exist)')
def _check_setting_backup(settings, name, val):
"""
test to see if we can perform a backup to the target machine
......@@ -169,6 +173,7 @@ def _check_setting_backup(settings, name, val):
settings[name] = val
backup_render(settings, True)
def _check_setting_order(settings, name, val):
"""
the order tiles are despatched to render nodes
......@@ -178,6 +183,7 @@ def _check_setting_order(settings, name, val):
if val in ['CENTRE', 'BOTTOM_TO_TOP']:
settings[name] = val
def _check_setting_filetype(settings, name, val):
"""
the filetype to render to
......@@ -187,6 +193,7 @@ def _check_setting_filetype(settings, name, val):
if val in ['PNG', 'OPEN_EXR']:
settings[name] = val
def read_user_options(render_nodes, settings):
"""
read user set render options from a configuration file on disk
......@@ -341,6 +348,7 @@ config_write = functools.partial(_data_write, filename=ds.FILENAME_RESTART_CONFI
progress_write = functools.partial(_data_write, filename=ds.FILENAME_RESTART_PROGRESS)
render_data_write = functools.partial(_data_write, filename=ds.FILENAME_RENDER_DATA)
def _data_read(filename):
"""
retrieve previously stored data from file
......@@ -415,6 +423,7 @@ def filetype_defaults(settings):
return config
def _write_blender_python_config(settings, block_number):
"""
write configuration python script to instruct blender to render a single
......@@ -485,6 +494,7 @@ def _write_blender_python_config(settings, block_number):
with open(filename, 'w') as configuration:
configuration.write(commands + '\n')
def distribute_files_to_node(settings, node, rt_block):
"""
before initiating the asynchronous render, make sure the node has all the
......@@ -678,6 +688,7 @@ def tidy_up_restart(settings, full_clear=False):
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) as proc:
proc.wait()
def _tidy_files(settings, node):
"""
tidy up files on a remote node
......@@ -717,6 +728,7 @@ def _tidy_files(settings, node):
return resp, node.ip_address
def tidy_up_temporary_files(nodes, settings):
"""
remove temporary files on local machine and remote nodes
......
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