batchtools module

Content included in batchtools package:

batchtools.batchtools.sbscooker(*pargs, **kwargs)

Launch process sbscooker with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to sbscooker, with dashes - replaced with underscores _ and with the leading -- or - removed. Run sbscooker --help-advanced to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to sbscooker

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of sbscooker

Returns:

The popen object used to call the command

batchtools.batchtools.sbsmutator_edit(*pargs, **kwargs)

Launch process sbsmutator edit with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to sbsmutator edit, with dashes - replaced with underscores _ and with the leading -- or - removed. Run sbsmutator edit --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to sbsmutator edit

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of sbsmutator edit

Returns:

The popen object used to call the command

batchtools.batchtools.sbsmutator_export(*pargs, **kwargs)

Launch process sbsmutator export with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to sbsmutator export, with dashes - replaced with underscores _ and with the leading -- or - removed. Run sbsmutator export --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to sbsmutator export

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of sbsmutator export

Returns:

The popen object used to call the command

batchtools.batchtools.sbsmutator_info(*pargs, **kwargs)

Launch process sbsmutator info with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to sbsmutator info, with dashes - replaced with underscores _ and with the leading -- or - removed. Run sbsmutator info --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to sbsmutator info

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of sbsmutator info

Returns:

The popen object used to call the command

batchtools.batchtools.sbsmutator_instantiate(*pargs, **kwargs)

Launch process sbsmutator instantiate with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to sbsmutator instantiate, with dashes - replaced with underscores _ and with the leading -- or - removed. Run sbsmutator instantiate --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to sbsmutator instantiate

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of sbsmutator instantiate

Returns:

The popen object used to call the command

batchtools.batchtools.sbsrender_info(*pargs, **kwargs)

Launch process sbsrender info with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to sbsrender info, with dashes - replaced with underscores _ and with the leading -- or - removed. Run sbsrender info --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to sbsrender info

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of sbsrender info

Returns:

The popen object used to call the command

batchtools.batchtools.sbsrender_render(*pargs, **kwargs)

Launch process sbsrender render with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to sbsrender render, with dashes - replaced with underscores _ and with the leading -- or - removed. Run sbsrender render --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to sbsrender render

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of sbsrender render

Returns:

The popen object used to call the command or SbsRenderOutputHandler if output_handler=True

batchtools.batchtools.sbsrender_render_animate(input_sbsar, start=0, end=100, output_name=None, fps=24, animated_parameters=(), cmds_output_stream=None, multi_proc=0, **kwargs)

Renders an image sequence from an sbsar input using sbsrender. It takes a start frame, an end frame and frames per second. The sbsrender command line tool will be run once for each frame.

By default the $time will be generated for each frame based on start, end and fps. It is possible to set sbsrender arguments as global frame parameters.

The animated_parameters can be used to tweak other sbsar parameters than $time This argument allow to pass a list of pairs of parameter names and functions taking frame and fps as parameters. e.g: animated_parameters=[(“input”, compute_input)] the value named “input” will be set to the result of calling compute_input(frame, fps). A lambda can also be used be used, e.g: animated_parameters=[(“input”, lambda frame, fps: frame / fps)] Multiple values can be animated by supplying a list of parameters and functions, e.g: animated_parameters=[(“input”, lambda frame, fps: frame / fps), (“other”, a_python_def(frame, fps))]

If setting multi_proc to a non-zero value the rendering will be multi processed in the specified number of processes executing the rendering sequentially frame by frame.

By providing a path to the argument cmds_output_path the sbsrender will not be executed but all command lines will be written in the file. So it possible for instance to dispatch theses command line through a render farm.

Parameters:
  • input_sbsar (str) – sbsar path file as input

  • start (int) – start frame

  • end (int) – end frame

  • output_name (str) – the name of the ouput files, it must contain a sequence pattern, e.g: ### or %3d for three digit.

  • fps (int) – frame rate

  • animated_parameters ((str, function(fram, fps) or [(str, function(fram, fps)]) – a pair of parameter name and corresponding function to compute it or a list of such pairs.

  • cmds_output_stream (io.TextIOBase) – stream to write commands to instead of executing them

  • multi_proc (int) – if greater than 0 the rendering will be parallelize by the multi_proc value.

  • kwargs – other key arguments

Returns:

bool, true if all frames succeeded, otherwise false

batchtools.batchtools.sbsupdater(*pargs, **kwargs)

Launch process sbsupdater with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to sbsupdater, with dashes - replaced with underscores _ and with the leading -- or - removed. Run sbsupdater --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to sbsupdater

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of sbsupdater

Returns:

The popen object used to call the command

batchtools.batchtools.spotcolorinfo_from_ids(*pargs, **kwargs)

Launch process spotcolorinfo from-ids with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to sbsrender render, with dashes - replaced with underscores _ and with the leading -- or - removed. Run sbsrender render --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to sbsrender render

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of sbsrender render

Returns:

The popen object used to call the command or SpotColorInfoOutputHandler if output_handler=True

batchtools.batchtools.spotcolorinfo_from_names(*pargs, **kwargs)

Launch process spotcolorinfo from-names with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to sbsrender render, with dashes - replaced with underscores _ and with the leading -- or - removed. Run sbsrender render --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to sbsrender render

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of sbsrender render

Returns:

The popen object used to call the command or SpotColorInfoOutputHandler if output_handler=True

batchtools.batchtools.spotcolorinfo_list(*pargs, **kwargs)

Launch process spotcolorinfo list with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to sbsrender render, with dashes - replaced with underscores _ and with the leading -- or - removed. Run sbsrender render --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to sbsrender render

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of sbsrender render

Returns:

The popen object used to call the command or SpotColorInfoOutputHandler if output_handler=True

batchtools.batchtools.substance3d_baker_ambient_occlusion_raytraced(*pargs, **kwargs)

Launch process substance3d_baker AmbientOcclusion.Raytraced with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker AmbientOcclusion.Raytraced, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker AmbientOcclusion.Raytraced --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker AmbientOcclusion.Raytraced

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker AmbientOcclusion.Raytraced

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_color_raytraced(*pargs, **kwargs)

Launch process substance3d_baker Color.Raytraced with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker Color.Raytraced, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker Color.Raytraced --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker Color.Raytraced

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker Color.Raytraced

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_curvature_raytraced(*pargs, **kwargs)

Launch process substance3d_baker Curvature.Raytraced with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker Curvature.Raytraced, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker Curvature.Raytraced --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker Curvature.Raytraced

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker Curvature.Raytraced

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_height_raytraced(*pargs, **kwargs)

Launch process substance3d_baker Height.Raytraced with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker Height.Raytraced, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker Height.Raytraced --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker Height.Raytraced

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker Height.Raytraced

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_info(*pargs, **kwargs)

Launch process substance3d_baker info with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker info, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker info --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker info

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker info

Returns:

The popen object used to call the command or Substance3dBakerInfoOutputHandler if output_handler=True

batchtools.batchtools.substance3d_baker_info_get_mesh_info(sceneFilePath)

Get the list of materials, mesh_paths, and number of UV set of the given mesh and return them as a triplet.

Parameters:

sceneFilePath (str) – File path of the mesh scene to inspect

Returns:

A triplet: [materials],[mesh_paths],nb_of_uvset

batchtools.batchtools.substance3d_baker_normal_bent_normals(*pargs, **kwargs)

Launch process substance3d_baker Normal.BentNormals with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker Normal.BentNormals, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker Normal.BentNormals --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker Normal.BentNormals

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker Normal.BentNormals

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_normal_raytraced(*pargs, **kwargs)

Launch process substance3d_baker Normal.Raytraced with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker Normal.Raytraced, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker Normal.Raytraced --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker Normal.Raytraced

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker Normal.Raytraced

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_normal_tangent_to_world(*pargs, **kwargs)

Launch process substance3d_baker Normal.TangentToWorld with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker Normal.TangentToWorld, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker Normal.TangentToWorld --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker Normal.TangentToWorld

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker Normal.TangentToWorld

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_normal_world_to_tangent(*pargs, **kwargs)

Launch process substance3d_baker Normal.WorldToTangent with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker Normal.WorldToTangent, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker Normal.WorldToTangent --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker Normal.WorldToTangent

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker Normal.WorldToTangent

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_opacity_raytraced(*pargs, **kwargs)

Launch process substance3d_baker Opacity.Raytraced with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker Opacity.Raytraced, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker Opacity.Raytraced --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker Opacity.Raytraced

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker Opacity.Raytraced

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_position_rasterised(*pargs, **kwargs)

Launch process substance3d_baker Position.Rasterised with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker Position.Rasterised, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker Position.Rasterised --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker Position.Rasterised

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker Position.Rasterised

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_position_raytraced(*pargs, **kwargs)

Launch process substance3d_baker Position.Raytraced with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker Position.Raytraced, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker Position.Raytraced --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker Position.Raytraced

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker Position.Raytraced

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_run(*pargs, **kwargs)

Launch process substance3d_baker run with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker run, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker run --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker run

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker run

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_texture_transfer_raytraced(*pargs, **kwargs)

Launch process substance3d_baker TextureTransfer.Raytraced with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker TextureTransfer.Raytraced, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker TextureTransfer.Raytraced --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker TextureTransfer.Raytraced

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker TextureTransfer.Raytraced

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_thickness_raytraced(*pargs, **kwargs)

Launch process substance3d_baker Thickness.Raytraced with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker Thickness.Raytraced, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker Thickness.Raytraced --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker Thickness.Raytraced

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker Thickness.Raytraced

Returns:

The popen object used to call the command

batchtools.batchtools.substance3d_baker_update(*pargs, **kwargs)

Launch process substance3d_baker update with given positional arguments and options.

The call is done by subprocess.Popen from the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give to substance3d_baker update, with dashes - replaced with underscores _ and with the leading -- or - removed. Run substance3d_baker update --help to see the list of possible options.

Parameters:
  • pargs – the positional arguments to give to substance3d_baker update

  • kwargs – keyword arguments that can be given to subprocess.Popen or that correspond to options of substance3d_baker update

Returns:

The popen object used to call the command or the updated dict if given argument is a Python dict object in a format compatible with valid JSON