Batch Tool argument help

Author Topic: Batch Tool argument help  (Read 2152 times)

I'm trying to generate several substances from an existing substance. I'm basing it on the 'Example_Script_Batchtools.ms' example, but without the bitmap inputs. It runs, the command windows flash, but it's not generating the substances.

Code: [Select]
" specialization --input " + templatePath +
                        " --presets-path " + resourcesPath +
                        " --output-name " + sbs +
                        " --output-graph-name " + RemoveSpaces(sbs) +
                        " --output-path " + sbsPath;

templatePath = 'X:\Allegorithmic\BatchTest\Basic_Template_01.sbs'
resourcesPath = 'C:\Program Files\Allegorithmic\Substance\Designer\3.x\resources\packages\'
sbsPath = 'X:\Allegorithmic\BatchTest\sbs'

I'm using C# to access the console window. I'm just wondering if my arguments are correct. Thanks.

I got this to work. My problem was '--output-name' had spaces in it. I know the graph name cant have spaces, but i'm pulling my names from existing material files.

I am not familiar with maxscript, but I think you can use file names with spaces in your case if you "protect" the variables containing the file names with double-quotes :
Code: [Select]
" specialization --input " + templatePath +
                        " --presets-path " + resourcesPath +
                        " --output-name \"" + sbs +
                        "\" --output-graph-name " + RemoveSpaces(sbs) +
                        " --output-path " + sbsPath;

I haven't checked, but maybe templatePath, ressourcePath and sbsPath need protecting also. Obviously, RemoveSpaces(sbs) should not. ;)

HTH