Author Topic: Python scripting  (Read 12642 times)

Python scripting to create nodes, set attrs and make connections between nodes, as well as baking.

There is no scirpting API per say, but if you ordered the Commercial version of Designer, you can call the Batch Tools (as a separate download in your account) command lines through a Python script.
These command lines allow you to bake maps, plug inputs to filters, chain filters, and save the outputs.

Hello,

Could you be more precise about the batch tools functionnality ?

Can one programmatically create graphes (of any complexity) from a command-line script, with the sbsmutator tool ? Or is it only possible for simple inputs and outputs ?

To me, the ability to programmatically create graphes and therefore substances from script has its weight onto the decision to upgrade or not to a commercial version into the future.


You can use the command line tools to chain sbsar files together and build simple 1-dimension graphs. You can't however create complex graphs with multiple branches etc through the batching tools.

That's also something I would love to see in Substance, you can add it as a feature request here:
http://allegorithmic.uservoice.com/forums/157557-substance
"Hinhin!" :-D

Ok, thanks. It is clearer now what one can do now with the batch tools.

Wolvawab, I don't know if it is really useful to post a request there, as I guess it would not be very popular (with many votes) as it is a rather advanced feature with not every user interested into it at first.

It may not be on the prioritary list of developers either,  however it would be indeed very powerful to have that capability: for research purposes and so on. I see many applications of it.

That said, the software is already very versatile as is and great to learn and evaluate.


Hey, the good news is that the graphes are archived into XML format, so that one can possibly generate graphes with any scripting language without the need of a specific API. Now, i'm definitly considering acquiring a licence later this year.

I'm a Pipeline TD in LA. The reason I suggested Python is that we could add Substance Designer to our pipeline if we can perform actions which are routine during the publishing process. As long as SD contained python and a simple script editor, we could create all the UI we need within SD.

Some essentials for SD Py commands:

querying/creating/deleting/connecting nodes and node graphs
querying/creating/deleting/connecting attributes on nodes
graph saving
node/graph selection

It would be easier for this company to adopt SD as part of our texturing pipeline if we could interact with it like we do for all of our other primary software: Maya, Max, Houdini, Nuke, etc.


That would be awesome for both SD and SP.
"Hinhin!" :-D

+1 here.  We would like to do very similar integrations at our studio.  Ideally a standalone headless python module with access to graph functions would be very useful

+1 here.  We would like to do very similar integrations at our studio.  Ideally a standalone headless python module with access to graph functions would be very useful
+2

+1 here.  We would like to do very similar integrations at our studio.  Ideally a standalone headless python module with access to graph functions would be very useful
+2
+3

I thought I would bump this post as it has been a while since people requested it :)

Here a link to uservoice if you want to upvote this feature request:
http://allegorithmic.uservoice.com/forums/257908-substance-designer/suggestions/7158951-python-scripting

+5

This would be incredibly useful for all the aforementioned reasons involving sophisticated studio pipelines.

++1

I am not a big fan of Python scripting, I actually prefer C#, but if there was a way for us to script custom nodes, I would be so happy!

^^