Page 1 of 1

Feature Request: "Switch" Node

PostPosted: Tue Feb 06, 2018 6:24 pm
by treddie
Hi.

I have a feature request...What could be called a "Switch" node. That is, a general node that you can connect any number of alternatives for a particular type (material, camera, meshes). It is kind of like a group node, but would allow you to do things like connect a bunch of unique materials to it, then decide which one you want to use by selecting a pin #. This would be a time saver for situations where you might have two entirely different materials that you want to be able to toggle between depending on the needs of a particular shot, but that are connected to numerous objects. So instead of, say, disconnecting one material 10 times from ten objects, by connecting another material for those ten objects, or going through the material to reset it for another texture, you can just change the pin# and it all gets done in one click:

Switch Group Feature Request.jpg

Re: Feature Request: "Switch" Node

PostPosted: Tue Feb 06, 2018 6:26 pm
by aoktar
OSL is for this kind a requests. Easy to write a script like this.

Re: Feature Request: "Switch" Node

PostPosted: Tue Feb 06, 2018 7:05 pm
by treddie
OSL...Is there a command and syntax reference for it?

Re: Feature Request: "Switch" Node

PostPosted: Wed Feb 07, 2018 11:42 am
by bepeg4d
Hi treddie,
here is a basic Lua Scripted graph for switching between two materials nodes:
2299245A-5AB6-41B4-ADC3-42AB34208CED.jpeg

matswitch.orbx.zip
(1.22 KiB) Downloaded 201 times

ciao beppe

Re: Feature Request: "Switch" Node

PostPosted: Wed Feb 07, 2018 6:45 pm
by treddie
Thank you very much ciao! That gives me a good set of script to examine. Thank you for putting the time into it!

Re: Feature Request: "Switch" Node

PostPosted: Thu Feb 08, 2018 4:07 am
by Elvissuperstar007
And it is possible to make similar by default? we are not programmers, we are visualizers!