Skip to content

Instantly share code, notes, and snippets.

GregMalick

Block or report user

Report or block GregMalick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View shootRay
''' this Command fires a ray down the +Z axis of a locator at a mesh
and selects any poly that the ray intersects
does not yet handle animated positions
Command format:
shootRay LocatorName MeshName '''
NAME_CMD_SHOOTRAY = "shootRay"
NAME_ARG_LOCATOR = "StrLocatorName"
NAME_ARG_MESH = "StrMeshName"
View MODO poly Tag
# a snippet from farfarer
# To read the selection sets the polygon belongs to;
# Create a StringTag object - this lets you read tags applied to an object.
# In this case, we're setting it to read tags for the polygon accessor (called polygon_loc in this code).
# Then a quick test to check if it's actually localised OK.
tag_loc = lx.object.StringTag()
tag_loc.set(polygon_loc)
if not tag_loc.test():
View MODO Command Shell
import lx
import lxu.command
import traceback
class CmdMyCustomCommand (lxu.command.BasicCommand):
def cmd_Flags (self):
return lx.symbol.fCMD_MODEL | lx.symbol.fCMD_UNDO
def cmd_Enable (self,msg):
return True
def cmd_Interact (self):
You can’t perform that action at this time.