Author Topic: SBSCooker: Cannot open the package  (Read 581 times)

I'd prefer to keep my tool all in one, so because the current python api a) doesn't allow cooking sbs to sbsar with dependencies embedded and b) just calls sbsrender, i'd rather keep it all in C# and just call sbscooker and sbsrender.

When I call sbscooker with an empty file, it's fine. When I call it with any of my files or a relatively simple file from Substance Share, it says it cannot open the package.

Here's an example of what it wont read:
https://www.dropbox.com/s/4qhrbe711ac7quh/Bruno_Caustics_Generator.sbs?dl=0

Come on guys I posted this 5 days ago. Surely an ongoing subscription means some level of support?

Hi,

I'm sorry for the slow reply.
The issue you have is probably related to it not finding the resources for the sbs alias. The error message is not as helpful as it should be unfortunately.
The correct command line should look something like this:
sbscooker.exe .\Bruno_Caustics_Generator.sbs --includes "C:\Program Files\Allegorithmic\Substance Automation Toolkit\resources\packages"

Thanks David, i'll give that a shot tomorrow.

Now it's giving me a different error:

C:\Program Files\Allegorithmic\Substance Automation Toolkit>sbscooker "D:\Dropbox\Frontier\Textures\Bruno_Caustics_Generator.sbs" --includes "c:\Program Files\Allegorithmic\Substance Automation Toolkit\resources\packages"
[WARNING][SBSCooker]Input or variable not found:
   Variable Name:
   Parameter Name: opacitymult
   From Graph: pkg:///Bruno_Caustics_Generator?dependency=1313195143
   Node ID: 1222854299
[ERROR][SBSCooker]I/O Error: can't write file 'C:/Program Files/Allegorithmic/Substance Automation Toolkit/Bruno_Caustics_Generator.sbsar'
[ERROR][SBSCooker]Save archive failed !

I looked at the dependency manager and its all built-in packages. Also, how do I have multiple includes?

Ok nevermind, it's just a warning and of course I can't write to the SAT directory. I'm getting this error now on another graph:
[ERROR][SBSCooker]Can't find subgraph:
   Subgraph Url: pkg:///histogram_scan?dependency=1149349207
   From Graph: pkg:///Pebbles2?dependency=1313200203
   ... (repeated 2 more times)

histogram_scan is definitely standard! Am I able to PM you this graph?
Last Edit: March 16, 2018, 01:37:49 am

Hi dukecg,

Could you send me your Substance in PM, and provide me the exact command you are executing ?

Thanks !
Rosalie

Hi I am having a similar issue regarding properly finding the "resources/packages" default dir. Adding the path to that folder via --includes definitely works, but is unsavory in that there may be cases where we want to have other directories/paths as well. Is adding multiple --includes arguments permissable? Is there another method for making the default dir visible such as $PATH or something similar? (I made some attempts at adding the default dir via, $PATH, although that didn't seem to work. Is there an app-specific env variable that I can add which is respected?)

I am mainly interested because we need to create a wrapper around sbscooker based on how it's installed on site, and it would be nice to hide from most users the requirement to add --includes <default dir>, especially since the default dir path is quite long and can change at times depending on tools configurations.

thanks,

colin

The right way to do this is using an alias.
Reference your custom files through an alias and set the alias using the --alias flag on the command line and it should work.