Skip to content

Instantly share code, notes, and snippets.

@boredstiff
Created February 4, 2015 23:20
Show Gist options
  • Save boredstiff/4850806aa474c1da213e to your computer and use it in GitHub Desktop.
Save boredstiff/4850806aa474c1da213e to your computer and use it in GitHub Desktop.
Modo Is Object Visible?
#python
import lx
import lxu.select
def isVisible():
scn_svc = lx.service.Scene()
curScn = lxu.select.SceneSelection().current()
chan = curScn.Channels(None, 0.0)
chanRead = lx.object.ChannelRead(chan)
nMesh = curScn.ItemList(scn_svc.ItemTypeLookup(lx.symbol.sITYPE_MESH))
for mesh in nMesh:
h = chanRead.Integer(mesh, mesh.ChannelLookup(lx.symbol.sICHAN_LOCATOR_HVISIBLE))
print '{0} is {1}'.format(mesh.UniqueName(), h)
isVisible()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment