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 maya.cmds as cmds | |
| import time | |
| import random | |
| import gc | |
| # --------------------------------------------------------------------- | |
| # CONFIGURATION | |
| # --------------------------------------------------------------------- | |
| CHAIN_LENGTH = 4000 # Depth of the chain. | |
| # NOTE: "Atomic" test will create CHAIN_LENGTH * 3 nodes. |
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 maya.cmds as cmds | |
| import time | |
| import random | |
| import gc | |
| # --------------------------------------------------------------------- | |
| # CONFIGURATION | |
| # --------------------------------------------------------------------- | |
| ITERATIONS = 1000 | |
| START_FRAME = 0 |
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 maya.cmds as cmds | |
| import time | |
| import random | |
| import gc | |
| # --------------------------------------------------------------------- | |
| # CONFIGURATION | |
| # --------------------------------------------------------------------- | |
| CHAIN_LENGTH = 2500 # Depth of the chain (A -> B -> C...) | |
| START_FRAME = 0 |
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 maya.cmds as cmds | |
| import time | |
| import random | |
| import gc | |
| # --------------------------------------------------------------------- | |
| # CONFIGURATION | |
| # --------------------------------------------------------------------- | |
| CHAIN_LENGTH = 2500 # Depth of the chain (A -> B -> C...) | |
| START_FRAME = 0 |
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 maya.cmds as mc | |
| def _null(*args): | |
| pass | |
| class _shelf(): | |
| '''A simple class to build shelves in maya. Since the build method is empty, | |
| it should be extended by the derived class to build the necessary shelf elements. |
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
| from maya import cmds | |
| def create_hud(label, separation=0, data=None, size="large"): | |
| """Creates a hud with given arguments | |
| Args: | |
| label: (String) Name of the HUD as it will be visible to user | |
| separation: (Int) Margin from the top | |
| data: (multiple) This can be any value or function. | |
| size: (string) size of the label and data. Acceptable arguments are 'large', 'medium' and 'small' |
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
| #patch maker | |
| from glob import glob | |
| import os | |
| from maya import cmds | |
| image_folder = "/your/image/folder/" | |
| shader_type = "blinn" | |
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
| from maya import cmds | |
| import maya.OpenMayaAnim as oa | |
| import maya.OpenMaya as om | |
| def get_inbetween_values(blendshape_node, target_name): | |
| # get the bs api mobject | |
| bs_sel = om.MSelectionList() | |
| bs_sel.add(blendshape_node) |
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
| def get_selected_vertices(): | |
| sel = cmds.ls(sl=True) | |
| for x in sel: | |
| if ":" not in x: | |
| yield int(x[s.find("[")+1:x.find("]")]) | |
| else: | |
| start_v = int(x[x.index("[") + 1: x.index(":")]) | |
| end_v = int(x[x.index(":") + 1:x.index("]")]) | |
| for v in range(start_v, end_v+1): | |
| yield v |
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
| ## Author: THOMAS HOLLIER | |
| ## Modified: Arda Kutlu | |
| ## http://relentlessplay.com/maya-frustum-visualizer/ | |
| import maya.cmds as cmds | |
| import math, sys | |
| #--------- Gather relevant camera attributes | |
| import maya.cmds as cmds | |
| import math, sys |
NewerOlder