This file contains 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
#!/usr/bin/env python | |
import lx | |
import lxifc | |
import lxu.command | |
class ListMaps (lxifc.Visitor): | |
def __init__ (self, meshmap): | |
self.meshmap = meshmap | |
self.mapIDs = [] |
This file contains 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
#pyAPI version | |
scene_svc = lx.service.Scene () | |
scene = lxu.select.SceneSelection().current() | |
graph = lx.object.ItemGraph (scene.GraphLookup ('schmItem')) | |
itemsToRemove = set() | |
for t in xrange(scene_svc.ItemTypeCount()): | |
type = scene_svc.ItemTypeByIndex(t) |
This file contains 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
def selectItemCenter (item, dropSelection=True): | |
sel_svc = lxu.service.Selection() | |
# Find the internal code for "center" selection type. | |
sel_type_center = sel_svc.LookupType (lx.symbol.sSELTYP_CENTER) | |
# Set up a selection packet translator for "center" selections. | |
# This lets us bundle up centers into selection "packets" for passing on to the selection service. | |
# Or read information about existing selection "packets" that we get from the selection service. | |
center_pkt_trans = lx.object.CenterPacketTranslation (sel_svc.Allocate (lx.symbol.sSELTYP_CENTER)) |
This file contains 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 lx.symbol as symbols | |
# Save this into your MODO scripts directory. | |
# Example usage: | |
# Find symbols with value of enable | |
# import symbolUtils as su |
This file contains 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
#!/usr/bin/env python | |
import lx | |
import lxu.select | |
cui_svc = lx.service.ChannelUI () | |
graphNames = [] | |
scene = lxu.select.SceneSelection().current() | |
for x in range(scene.GraphCount()): |
This file contains 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
#!/usr/bin/env python | |
import lx | |
import lxu | |
import lxifc | |
import lxu.command | |
class MeshPicker (lxu.command.BasicHints): | |
def __init__ (self): | |
scn_svc = lx.service.Scene () |
This file contains 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
#!/usr/bin/env python | |
import os | |
import lx | |
import modo | |
import lxifc | |
import lxu.select | |
import lxu.command |
This file contains 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
#!/usr/bin/env python | |
import lx | |
import lxifc | |
import lxu.command | |
class SelectByColor_Vis(lxifc.Visitor): | |
def __init__(self, mesh, point, vmapID, rgb, selMode, sel_svc, vtx_pkt_trans, sel_type_vert): | |
self.mesh = mesh | |
self.point = point |
This file contains 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
#!/usr/bin/env python | |
import lx | |
import lxu.command | |
import lxifc | |
class SetMarks (lxifc.Visitor): | |
def __init__ (self, acc, mark): | |
self.acc = acc | |
self.mark = mark |
This file contains 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
#!/usr/bin/env python | |
import lx | |
import lxu.command | |
class Quantize_Cmd(lxu.command.BasicCommand): | |
def __init__(self): | |
lxu.command.BasicCommand.__init__(self) | |
self.dyna_Add ('steps', lx.symbol.sTYPE_INTEGER) |