How can I disable a top when a specific CHOP value = 0?
I’m thinking that there is a way to do this with python to keep things neat.
I am using tx ty hand data from a kinect to control position of circles for multiple players at once, but when the player id=0 when there is no player, I want the circle TOP to be disabled so there is no circle just sitting there in the middle when no player is present.
Hello,
In python, to compare value its “==” not “=”
But you can also use logic Chop to obtain 0 or 1 when a value cross a limit.
Normaly, with Top, you would prefere put the opacity at 0, enabling the Top (namely cooking/uncooking) can have some unexpected effects, as changing the resolution of composition.
The Python would be:
if value == 0:
op('myTop').par.opacity = 0
else:
op('myTop').par.opacity = 1