Page 1 of 1

[Shader] Interacting with Ventuz GUI

Posted: 07 Oct 2015, 04:18
by TVM Cracklings
Hi all,

I'd like to know how to create tabs under the properties window, and of course, how to put objects under those tabs. I'm coming to a point where having some 20 odd uniforms all jammed under the same default "Parameter" tab gets a bit messy.

I know it can be done, like in the following screenshot by GT. (BBCode image resizing somehow doesn't work. Click on the image to see the full picture. Property widget is on the right hand side of the screenshot.)
Image

I searched in the official shader help document for a while, but found nothing relevant to this. Would be nice if anyone could help.

BR
-C

Re: [Shader] Interacting with Ventuz GUI

Posted: 07 Oct 2015, 10:24
by lerou
Hi,

you can't create tabs. You can group your properties using the Category - which is what we've done in your example. It will be displayed as [Category] followed by all parameters that are in that category.

BUT: Keep in mind that each parameter must have a unique name - the Category does not allow for two parameters with the same name (and different Categories). Example:

[Position 1]
X
Y

[Position 2]
X
Y

will lead to trouble! It must be something like:

[Position 1]
X1
Y1

[Position 2]
X2
Y2

Best,
rou

Re: [Shader] Interacting with Ventuz GUI

Posted: 08 Oct 2015, 09:56
by Götz_B
I searched in the official shader help document for a while...
The Node called "GTImageFlipperPro" you see in the screenshot is a Hierarchy Container. The properties and categories you see are not coming from the shader directly, but from the container.

Re: [Shader] Interacting with Ventuz GUI

Posted: 08 Oct 2015, 19:43
by shermanpat
lerou wrote:Hi,

you can't create tabs. You can group your properties using the Category - which is what we've done in your example. It will be displayed as [Category] followed by all parameters that are in that category.

BUT: Keep in mind that each parameter must have a unique name - the Category does not allow for two parameters with the same name (and different Categories). Example:

[Position 1]
X
Y

[Position 2]
X
Y

will lead to trouble! It must be something like:

[Position 1]
X1
Y1

[Position 2]
X2
Y2

Best,
rou

What kind of error will occur with same name exposed properties. I have done with some properties and see the error in the logs, but things still seem to work fine. Is this more of a best practice item and not a real error?

Re: [Shader] Interacting with Ventuz GUI

Posted: 08 Oct 2015, 20:49
by lerou
I've seen strange things happen when I copied Interface Containers with duplicate property names. It occurs that internally the bindings are mixed up. So imagine you've got two colors exposed - one for text, one for background. Both called Color. After copying (or copy&pasting on another interface container) the bindings are switched and your text has the background color and vice versa.

Long story short: use unique (and speaking) names when exposing values. ALWAYS. It also makes your scene maintainable ;)