Author Topic: Applying Preset to a Sub-Graph  (Read 1413 times)


I am writing some SAT tools to generate textures automatically using template graphs.  Normally, when applying a preset file to a graph, I would use sbsmutator to apply the preset file to the sbs before rendering.

However this time I have to apply a preset to a node within the graph.  That node being an instance of another .sbs file.  This can be done through the Designer UI, by simply selecting the node and loading a preset from the 'instance parameters' menu.

The only solution I have right now is to use sbsmutator to edit the file the sub-graph is sourced from.  This is not ideal, as that file is an exclusive checkout in our version control. Meaning only one instance of the code could ever run at a time, since it requires possession of an exclusive file.

Do you have an example of applying a preset file to a sub-graph through SAT?

The only solution is to use PySBS instead of sbsmutator:
Code: [Select]


Thank you, this does work.

I tried it this way originally, but it did not seem to respect the preset.  This turned out to be a problem with some of the presets embedded in the sbs file.  Once the presets were corrected applyPreset worked as it should.

Diagnosed by running through the process manually- some presets were not applying data when they were selected in the sub-graph.