Author Topic: Batch Updating Substance Designer Files  (Read 330 times)

Once again I have a new version of Substance Designer, and thousands of .sbs files which are useless unless updated.  The last time this happened I was directed to WkSBSUpdateDir.exe, a tool found on werwackfx.com.  With the last Substance Designer update, I got it to work after fiddling with it a bit.  This time around, it seems to expect Substance Designer to be installed on C: .  If I provide it with the copy of sbsupdater.exe it wants on C:, it starts complaining about missing .dll files.

I love you guys, but I'm frankly furious about this.  This is an absurd mess.  The Substance programs are sublime, but I've never seen such a botched way of handling updates--you've literally rendered every file I've ever worked on unusable, unless I puzzle out a batch process that isn't provided by Allegorithmic, and doesn't work out of the box.  This is like trying to get PC games to run in DOS in the early 90s.  Right now there's nothing in your update that I want bad enough to spend an afternoon fooling around with missing-dll-errors, but I've already uninstalled my previous version.  Excuse my heartfelt foul language, but what the fuck, guys--you HAVE to be able to see that this is ridiculous.
Last Edit: June 04, 2019, 03:04:52 pm

Hello monongahelamonster,

We understand your frustration, and will be happy to guide you through quick steps to batch update your SBS files.

Powerful command line tools are included in the Substance Designer installation, which purpose is to help users automate and batch processes. In your specific case, you can use the 'sbsupdater' command line tool, located at the root of your Substance Designer installation folder.

To quickly get started in Windows, open the command prompt by pressing the 'Windows + R' keys, typing 'cmd' and pressing 'OK'. The Command Prompt will open.

Navigate to your Substance Designer installation folder by typing the following and pressing 'Enter':

Code: [Select]
cd <SD-installation-path>
Replace <installation-path> by the path of the Substance Designer installation folder.

From there, you can run the sbsupdater tool by typing 'sbsupdater' followed by a space and the appropriate arguments.
You can find a list of the available arguments and functionality by using the '--help' argument, like this: 'sbsupdater --help'.

Note: You can find the same list in the 'Substance Automation Toolkit' documentation, available here.



Now, to batch update your files, you can run a command that looks like this:

Code: [Select]
sbsupdater <folder-path> -r --output-path {inputPath}
This will look for all SBS file contained in the folder which path is <folder-path>, update them and replace the original versions.



We hope this was helpful, feel free to get back to us if you need further assistance.

Best regards,
Luca Giarrizzo
Last Edit: May 15, 2019, 05:19:14 pm
QA Analyst
Substance Designer Team

This certainly sounds straightforward enough.  Thanks for your helpful response to my EXTREMELY cranky message.  :)

We are happy to help!

We hope you can quickly get back on creating and having fun in Substance Designer!

Best regards,
Luca Giarrizzo
QA Analyst
Substance Designer Team

Hi.  Sadly it appears I cannot quickly get back to creating stuff in Substance Designer.  On attempting to update my files using the command line tools, I find that sbsupdater returns an error and won't update anything.  It says:

[WARNING][SBSMutator]Failed to create device for "sbs://pbr_base_material.sbs"
Cannot load dependency from : E:/(the path to the folder that I'm trying to update)
Cannot load dependency: sbs://pbr_base_material.sbs

The pbr_base_material.sbs file does exist in my SD install directory, and just for the sheer delight of it I've copied it into the folder I'm trying to update; the update doesn't work either way.  I would really appreciate anything you can suggest.

At the risk of seeming unduly cranky, I remain astonished that this is not a huge problem for your users.  I have to imagine that the majority of people have, not a handful of files that need to be updated, but hundreds and hundreds of files, and that some sort of batch operation must be the only viable option.  The path that is available seems not terribly obvious, and seems in my case not to be working even once it's found.  I say this as someone who loves using Substance Designer and has been really impressed with Allegorithmic in almost every other respect: this process really sucks.  Again, thanks for anything you can tell me.

Hello,

Thank you for following up on this process. We are sorry to hear you are still experiencing issues, and will make sure you can get back to work as soon as possible.

Can you please share the exact code you are using to batch update your SBS files?

We thank you for your help and patience.

Best regards,
Luca Giarrizzo
QA Analyst
Substance Designer Team

Sure--thanks for your help.  I'm referring to the Substance Automation Toolkit documentation, at the link I was given below:

https://support.allegorithmic.com/documentation/sat/command-line-tools/sbsupdater/sbsupdater-command-line-options

It says:

>to batch update your files, you can run a command that looks like this:

>sbsupdater <folder-path> -r --output-path {inputPath}

>This will look for all SBS file contained in the folder which path is <folder-path>, update them and replace the original versions.

So, the exact code I'm using is

sbsupdater E:\animation\ZBrush\2018_cute -r --output-path {inputPath}

(Don't ask why I've got substance files stored in a folder called "Zbrush"... it's complicated.  Stuff happened.)

I've also tried this with forward slashes in the path instead of backwards slashes; I've tried including the carats enclosing the folder path, and I've tried including the --no-dependency flag.  Using carats changes the error message to a simple "access denied".  Everything else I've tried returns this:

Cannot load dependency: sbs://pbr_base_material.sbs
[ERROR][SBSMutator]At least one input file cannot be correctly loaded.

Again, thanks for anything you can tell me.

Hello,

Thank you for providing these additional details.

It appears the SBS Mutator, which is called by the SBS Updater - cannot load dependencies that are located in the Substance Designer installation files.

We suggest explicitly stating the location of the Substance Designer default library in the command line, with the 'presets-path' argument explained in the 'Input File Options' item of the 'sbsbaker' documentation page.

The command line code shoud look like this:

Code: [Select]
sbsupdater "<folder-path>" -r  --presets-path "<sd installation path>/resources/packages" --output-path {inputPath}
If dependencies cannot be loaded, they might have been moved after the last save of the package. The path displayed after the 'Cannot load dependency:' text is the last saved path for this dependency in the SBS.



To check the dependencies saved in the SBS files, load your SBS package in Substance Designer, right-click on the package in the 'Explorer' panel, and open the 'Dependency Manager'. All dependencies, as well as their paths, will be displayed.
Note: The 'sbs://' paths point to dependencies located in the Substance Designer installation folder.



As a reminder, in order to update SBS files without processing its dependencies, use this code:

Code: [Select]
sbsupdater "<folder-path>" -r  --output-path {inputPath} --no-dependency
Please get back to us with the result of following these steps. We thank you for your patience!

Best regards,
Luca Giarrizzo
QA Analyst
Substance Designer Team