Author Topic: SBSRender Multiple .sbsar  (Read 245 times)

How do I batch render multiple .sbsar files at once?  For instance, if I want to export the bitmaps from multiple .sbsar files instead of just one.   

This code just lets me export bitmaps from only one .sbsar file.   

"C:/Program Files/Allegorithmic/Substance Automation Toolkit/sbsrender.exe" render --input "C:/Users/ahabm/Videos/The Homeless Planet/Textures/rust_fine.sbsar" --output-path "C:/Users/ahabm/Videos/The Homeless Planet/Textures/" --output-format jpg --output-format-compression raw --set-value $outputsize@10,10 --output-name {inputGraphUrl}_{outputNodeName} --output-bit-depth 8

If I change the "--input" to just link to the folder nothing happens.  I was hoping this would batch process all the .sbsar files in a folder.
--input "C:/Users/ahabm/Videos/The Homeless Planet/Textures/"

How do I sbsrender all the .sbsar in a folder?  I am trying to create a texture library for rendering in Redshift Maya.  I am exporting the .sbsar files one by one and it is taking a very long time.     

 
Last Edit: January 18, 2019, 11:00:12 pm

I just realized this should have been posted in the support section.  Oops.

Hi,

In order to solve this you need to make some kind of script (python or batch file) to find all the files and invoke sbsrender on each of them.
If doing it using python I would recommend you look at either the os.walk function:
https://www.bogotobogo.com/python/python_traversing_directory_tree_recursively_os_walk.php

or glob:
https://docs.python.org/2/library/glob.html