blendersynth.run.run

class blendersynth.run.run.BlenderCommand(blender_loc, blend_src=None, background=True)[source]

Construct command for running blender script

copy()[source]

Return a copy of the command

set_job(job_list)[source]

Receives list of json files, adds as , separated string to command

set_logger(log_loc)[source]

Set file for logging

blendersynth.run.run.execute_jobs(script, json_src, output_directory, num_threads=1, print_to_stdout=False, distributed=None, blend_src=None, **script_kwargs)[source]

Execute a script, given a list of jobs to execute.

Parameters:
  • script (str) – path to script to execute

  • json_src (Union[list, str]) – N sized list of .json files, each with info about the given job. OR a directory containing .json files, which will be used as the jsons

  • output_directory (str) – directory to save output files

  • num_threads (int) – threads to run in parallel (default = 1)

  • print_to_stdout (bool) – If True, print to stdout instead of saving to file

  • distributed (tuple) – tuple of (machine index, total machines) for distributed rendering

  • blend_src (str) – path to blend file to open (note: this is preferable to blendersynth.load_blend as it handles context better)