ZBrushCentral

Button inside if... else conditon

How do you put a button inside an if …else condition?

// set render quality size
[If, renderQuality == “maximum”
, // Then…
[IPress,Movie:Large]
, // Else…
[IPress,Movie:Small]
]

You can’t supply a string as a substitute and the above code won’t work so I’m stumped.

I’ve assumed you are setting the Movie>Modifiers>Quality slider, but the IGetMax means you could use any slider path:

// set render quality size
[If, [IGet,Movie:Modifiers:Quality] == [IGetMax,Movie:Modifiers:Quality]
, // Then…
[IPress,Movie:Large]
, // Else…
[IPress,Movie:Small]
]

It’s almost as if I’m working on a turntable script… :smiley:

Whilst that is useful, in this instance renderQuality was going to be either 0,1 or 2 where the numbers correspond to (large & best quality, small & good quality, small & quick) for three predefined types of render pulling in that various sliders as needed.

Well, all you need to do is check against the appropriate values, either directly as I have done, or by setting variables first.

Thanks Marcus. In the cold light of day I saw where I was going wrong. :o