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
''' 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" |
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
# 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(): |
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
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): |