Author Topic: Further understanding of output nodes  (Read 5018 times)

I'm developing a material via Pysbs with multiple sets of channel outputs (grouped) which would allow us to have two groups of texture sets as output:
  • The first set is created from the outputs of each graph instance.
  • The second set is the final "comped" material outputs.

Is it possible to do the following via Pysbs...


A: Enable/disable an output node?
I understand that since instanced materials are graph instance representations, there's no direct way to disable them, since there's currently no bypass for data to flow through.

I assume, however, that's not a limitation for output nodes and that there should be a way to disable them.
I've tried SBSCompNode.mDisabled, but I can't figure out what that does outside of adding the disabled XML attribute to the sbs file. It seems to make no difference in Designer or Painter.

B: Reordering an output node?
Much like re-ordering the widgets in the Output Images tab of the graph in Designer, is it possible to re-order your CompOutputs via pysbs?
I'd like painter to pick up my material outputs group by default, rather than the order in which the outputs were created (since the "comped" material outputs will be created last).
Last Edit: January 22, 2019, 05:17:51 pm

Hi,

A:
In general we don't have a pass through node and if you want that behavior you would need to wire around the node.
This would apply to outputs. However for painter, you can set the user data on the output to disable=true and it won't show up. This will not affect designer or sbsrender though, if you need a network that disables it for them you need to either specifically render the maps you need or temporarily create an sbs file where the output is removed.

B:
Pysbs by default tries to keep the order of everything to make sure small changes to the document will lead to small changes in the file.
You can do it by deleting and recreating the outputs in the order you want them. It is possible to do this on a lower level by reorganizing data structures but I would recommend against it since the low level aspects of pysbs might change without the api changing making it more likely to break when we update things.

However for painter, you can set the user data on the output to disable=true and it won't show up. This will not affect designer or sbsrender though, if you need a network that disables it for them you need to either specifically render the maps you need or temporarily create an sbs file where the output is removed.
I tried out the disable=true in userTags, but unfortunately the result isn't what I was expecting as it hides the channel entirely.
The best way to deal with this seems to be making it optional to generate the intermediary outputs. For any published materials used in Painter, I'll have to exclude those outputs, as you mentioned.

...It is possible to do this on a lower level by reorganizing data structures but I would recommend against it since the low level aspects of pysbs might change without the api changing making it more likely to break when we update things.
That was my worry as well; it doesn't seem to be worth the effort in this case.

____
Thanks for the response David.