ZBrushCentral

Question: Controlling Light States

I’m trying to control which lights are active through a script, but it appears that the IPress and IUnPress methods is a toggle (relative state) functions, when it comes to the lights. Is there any way to state an absolute state, as opposed to this relative state?

This post should help:

http://www.zbrushcentral.com/showthread.php?203400-Question-Light-setup&p=1193340&viewfull=1#post1193340

Note: the button is a macro which is why the button name is just three question marks - ???

Hehe. That’s exactly what I was just reading. Attempting to implement it now. Thank you for the confirmation.

Why is it that buttons, such as the Shadow and AOcclusion buttons under render, I can set there absolute states, but I have to use an If/Then statement to play with the lights?

It’s because clicking the light selects it before turning it on/off. Sometimes you can use [IModGet] to get the state of an interface item and then use [IModSet] to change the state but with lights you have to use [IGetFlags] and there’s no corresponding [ISetFlags].

Thanks for the insight.

Got it all working, now onto the next part of the script!