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
| #!/usr/bin/env python | |
| __author__ = 'Nicholas Stevenson' | |
| __email__ = 'twistedsheep@gmail.com' | |
| import lx | |
| import lxu | |
| import lxu.select | |
| #import lxifc | |
| class RenameSel(lxu.command.BasicCommand): |
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, lxu, modo | |
| from PySide import QtGui | |
| class copyNamesToClipboard(lxu.command.BasicCommand): | |
| def __init__(self): | |
| lxu.command.BasicCommand.__init__(self) | |
| def basic_Execute(self, msg, flags): |
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
| #!/usr/bin/env python | |
| # List Cameras and their Focal Lengths | |
| # | |
| # Classic Modo Python | |
| # | |
| import lx, lxu | |
| # Create a scene selection service object |
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 modo | |
| sceneItems = modo.Scene().items() | |
| # In this example, we're going to get all the items in the scene | |
| # that don't have any parents. In short, only root items. | |
| # The long way of doing this would be... | |
| rootItems = [] # Start with an empty list |
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 modo | |
| scene = modo.Scene() # Create and save a modo Scene item in the variable named scene | |
| # This is the mesh item type | |
| meshType = modo.c.MESH_TYPE # you can also use 'mesh' in its place | |
| # but using the item type is considered a better practice | |
| meshes = scene.items(itype=meshType) # The scene object allows you to give it an item type | |
| # if you only need a specific type of items. |
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 modo | |
| scene = modo.Scene() # Create and save a modo Scene | |
| # item in the variable named scene | |
| meshItems = scene.items(itype='mesh') # Get all mesh items in the current scene | |
| # Using a list comprehension, go through | |
| rootMeshes = [item for item in meshItems if item.parent is None] # each mesh object and only keep those | |
| # that don't have parents. |
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
| # Data storage to and from the in-scene node | |
| def storeData(self, data): | |
| node = self.getNode() | |
| ModelData = json.dumps( data[ModelEntries], sort_keys=True ) | |
| AnimationData = json.dumps( data[AnimationEntries], sort_keys=True ) | |
| lx.eval('item.channel item:{%s} name:{%s} value:{%s}' %(node.UniqueName(), ModelEntries, ModelData)) | |
| lx.eval('item.channel item:{%s} name:{%s} value:{%s}' %(node.UniqueName(), AnimationEntries, AnimationData)) |
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 modo, lx, lxu, os, json, ast | |
| import doom.uiMain | |
| import doom.uiModelExportEntry | |
| from PySide import QtCore, QtGui | |
| # This is the default in-scene attribute that will be created and stored on our primary data node | |
| # It will hold the pickled data as a string. | |
| # The data node will hold the DataAttribute as a string. Our internal data will be pickled and written to | |
| # this attribute |
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, lxu, lxifc | |
| import modo | |
| import sys, os, math, datetime | |
| __author__ = 'Nicholas Stevenson' | |
| __date__ = 'October 2015' | |
| # Huge thanks David Henry for his web site dissecting the format and contents of id's md5mesh and md5anim files. | |
| # His work made creating this much, much easier. |
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 lxifc | |
| import PySide | |
| from PySide import QtGui | |
| import doom.main | |
| class idTechExporter(lxifc.CustomView): | |
| def customview_Init(self, pane): | |
| if pane == None: |
OlderNewer