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
import pymel.core as _pymel | |
expectedOrder = ['cube_dmh', 'cube_ffd', 'cube_skn', 'cube00_twk'] | |
mesh = _pymel.PyNode('cube_geo') | |
currentIteration = 0 | |
indexToMatch = 0 | |
currentOrder = [x.name() for x in mesh.listHistory(type='geometryFilter')] | |
deformersInOrder = False |
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
import maya.api.OpenMaya as om | |
import maya.cmds as cmds | |
TRANSFORM_NODETYPES = ["transform", "joint"] | |
def has_non_default_locked_attributes(node): | |
locked_attributes = [] | |
for attribute in ["translate", "rotate", "scale", "jointOrient"]: | |
default_value = 1 if attribute == "scale" else 0 | |
for axis in "XYZ": |
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
import maya.api.OpenMaya as om2 | |
from maya import cmds | |
def ensure_planar_orientation(transform_a, transform_b, transform_c): | |
"""Orients the three given transform based on the plane they form. | |
X axis aims at the next transform. | |
Z axis is the normal axis to the plane. | |
Y axis is the tertiary axis, computed based on the 2 previous ones. |