The visibility in operators is a little tricky, the best resource I've found is here
https://arnoldsupport.com/2018/11/21/backdoor-setting-visibility/ [arnoldsupport.com]
I created an OTL to do the math for me. There's a line of python code to add up the different rays to the proper numbers. & then inside I set "visibility" to this calculated value.
Python code on the parm "calc"
total = 0 n= hou.node(".") cam =n.parm("camera").eval()*1 shadow =n.parm("shadow").eval()*2 diff_trans=n.parm("diffuse_transmit").eval()*4 spec_trans=n.parm("specular_transmit").eval()*8 diff_refl=n.parm("diffuse_reflect").eval()*32 spec_refl=n.parm("specular_reflect").eval()*64 vol_scat=n.parm("volume").eval()*16 sss=n.parm("sss").eval()*128 total = cam + shadow + diff_trans + spec_trans + diff_refl + spec_refl + vol_scat+sss if n.parm("skip").eval()==1: total = 0 return total
I hope this helps