Maxscript Help: Simplify 'for - where' statement


Hello Guys, i Need Some help improving or simplifying a line of code that i believe is not so clean and might be a way to make it better since I’m using too many OR statements here is the line:

(For Ctrls in Rollout.controls where (classOf Ctrls == spinnercontrol) or (classOf Ctrls == SliderControl) or (classOf Ctrls == CheckButtonControl) collect ctrls)

Any idea, Thanks in advance for your help.


Have you tried using a switch-case or a try-catch?