batchtools module
Content included in batchtools package:
- batchtools.batchtools.sbscooker(*pargs, **kwargs)
Launch process
sbscookerwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosbscooker, with dashes-replaced with underscores_and with the leading--or-removed. Runsbscooker --help-advancedto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
sbscookerkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsbscooker
- Returns:
The popen object used to call the command
- batchtools.batchtools.sbsmutator_edit(*pargs, **kwargs)
Launch process
sbsmutator editwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosbsmutator edit, with dashes-replaced with underscores_and with the leading--or-removed. Runsbsmutator edit --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
sbsmutator editkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsbsmutator edit
- Returns:
The popen object used to call the command
- batchtools.batchtools.sbsmutator_export(*pargs, **kwargs)
Launch process
sbsmutator exportwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosbsmutator export, with dashes-replaced with underscores_and with the leading--or-removed. Runsbsmutator export --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
sbsmutator exportkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsbsmutator export
- Returns:
The popen object used to call the command
- batchtools.batchtools.sbsmutator_info(*pargs, **kwargs)
Launch process
sbsmutator infowith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosbsmutator info, with dashes-replaced with underscores_and with the leading--or-removed. Runsbsmutator info --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
sbsmutator infokwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsbsmutator info
- Returns:
The popen object used to call the command
- batchtools.batchtools.sbsmutator_instantiate(*pargs, **kwargs)
Launch process
sbsmutator instantiatewith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosbsmutator instantiate, with dashes-replaced with underscores_and with the leading--or-removed. Runsbsmutator instantiate --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
sbsmutator instantiatekwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsbsmutator instantiate
- Returns:
The popen object used to call the command
- batchtools.batchtools.sbsrender_info(*pargs, **kwargs)
Launch process
sbsrender infowith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosbsrender info, with dashes-replaced with underscores_and with the leading--or-removed. Runsbsrender info --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
sbsrender infokwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsbsrender info
- Returns:
The popen object used to call the command
- batchtools.batchtools.sbsrender_render(*pargs, **kwargs)
Launch process
sbsrender renderwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosbsrender render, with dashes-replaced with underscores_and with the leading--or-removed. Runsbsrender render --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
sbsrender renderkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsbsrender 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
sbsupdaterwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosbsupdater, with dashes-replaced with underscores_and with the leading--or-removed. Runsbsupdater --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
sbsupdaterkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsbsupdater
- Returns:
The popen object used to call the command
- batchtools.batchtools.spotcolorinfo_from_ids(*pargs, **kwargs)
Launch process
spotcolorinfo from-idswith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosbsrender render, with dashes-replaced with underscores_and with the leading--or-removed. Runsbsrender render --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
sbsrender renderkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsbsrender 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-nameswith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosbsrender render, with dashes-replaced with underscores_and with the leading--or-removed. Runsbsrender render --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
sbsrender renderkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsbsrender 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 listwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosbsrender render, with dashes-replaced with underscores_and with the leading--or-removed. Runsbsrender render --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
sbsrender renderkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsbsrender 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.Raytracedwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker AmbientOcclusion.Raytraced, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker AmbientOcclusion.Raytraced --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker AmbientOcclusion.Raytracedkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_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.Raytracedwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker Color.Raytraced, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker Color.Raytraced --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker Color.Raytracedkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_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.Raytracedwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker Curvature.Raytraced, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker Curvature.Raytraced --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker Curvature.Raytracedkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_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.Raytracedwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker Height.Raytraced, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker Height.Raytraced --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker Height.Raytracedkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_baker Height.Raytraced
- Returns:
The popen object used to call the command
- batchtools.batchtools.substance3d_baker_info(*pargs, **kwargs)
Launch process
substance3d_baker infowith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker info, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker info --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker infokwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_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.BentNormalswith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker Normal.BentNormals, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker Normal.BentNormals --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker Normal.BentNormalskwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_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.Raytracedwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker Normal.Raytraced, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker Normal.Raytraced --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker Normal.Raytracedkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_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.TangentToWorldwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker Normal.TangentToWorld, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker Normal.TangentToWorld --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker Normal.TangentToWorldkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_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.WorldToTangentwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker Normal.WorldToTangent, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker Normal.WorldToTangent --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker Normal.WorldToTangentkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_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.Raytracedwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker Opacity.Raytraced, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker Opacity.Raytraced --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker Opacity.Raytracedkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_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.Rasterisedwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker Position.Rasterised, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker Position.Rasterised --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker Position.Rasterisedkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_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.Raytracedwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker Position.Raytraced, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker Position.Raytraced --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker Position.Raytracedkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_baker Position.Raytraced
- Returns:
The popen object used to call the command
- batchtools.batchtools.substance3d_baker_run(*pargs, **kwargs)
Launch process
substance3d_baker runwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker run, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker run --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker runkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_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.Raytracedwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker TextureTransfer.Raytraced, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker TextureTransfer.Raytraced --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker TextureTransfer.Raytracedkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_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.Raytracedwith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker Thickness.Raytraced, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker Thickness.Raytraced --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker Thickness.Raytracedkwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_baker Thickness.Raytraced
- Returns:
The popen object used to call the command
- batchtools.batchtools.substance3d_baker_update(*pargs, **kwargs)
Launch process
substance3d_baker updatewith given positional arguments and options.The call is done by
subprocess.Popenfrom the standard library. This function accepts the same keyword arguments. The other possible keywords arguments correspond to the possible options to give tosubstance3d_baker update, with dashes-replaced with underscores_and with the leading--or-removed. Runsubstance3d_baker update --helpto see the list of possible options.- Parameters:
pargs – the positional arguments to give to
substance3d_baker updatekwargs – keyword arguments that can be given to
subprocess.Popenor that correspond to options ofsubstance3d_baker update
- Returns:
The popen object used to call the command or the updated
dictif given argument is a Pythondictobject in a format compatible with valid JSON