Created
February 4, 2015 23:20
-
-
Save boredstiff/4850806aa474c1da213e to your computer and use it in GitHub Desktop.
Modo Is Object Visible?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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