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
sel = mc.ls( sl=1 ) | |
if mc.ls( mc.listRelatives( sel[0], s=1 )[0], st=1 )[-1] == 'mesh': | |
if not mc.pluginInfo( 'tensionMap', q=11, l=1 ): | |
mc.loadPlugin( 'tensionMap' ) | |
tensionMN = mc.createNode('tensionMap') | |
plug = mc.connectionInfo( sel[0] + '.inMesh', sourceFromDestination=1 ) | |
if plug: | |
mc.connectAttr( plug, tensionMN + '.deform', f=1 ) | |
mc.connectAttr( mc.listRelatives( sel[0], s=1 )[-1] + '.worldMesh[0]', tensionMN + '.orig', f=1 ) | |
mc.connectAttr( tensionMN + '.out', sel[0] + '.inMesh', f=1 ) |
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 plugin was ported to python from C++, | |
All credits by Anno Schachner | |
original plugin is here https://github.com/wiremas/tension | |
''' | |
import sys | |
import maya.api.OpenMaya as om2 | |
import maya.OpenMaya as om |
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
''' | |
Select three components and run the script. | |
Remember that selection order matters, so the second one will display the angle between 1-2 vector and 2-3 vector. | |
''' | |
import maya.cmds as mc | |
# make sure that tracking of selection order is turned on | |
if not mc.selectPref( q=1, trackSelectionOrder=1 ): | |
mc.selectPref( trackSelectionOrder=1 ) | |
# get ordered component selection | |
objs = mc.ls( os=1, fl=1 ) |
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
''' | |
Instructions: | |
To run the script just ise the code: | |
________________________________________________________________ | |
import inMeshPlace | |
inMeshPlace.start() | |
________________________________________________________________ |
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 | |
sl=mc.ls( sl=1 ) | |
nLabel = None | |
side = None | |
for s in sl: | |
if s.startswith( 'L_' ) or s.startswith( 'Left_' ): | |
try: | |
nLabel = s.replace( 'L_', '' ) | |
side = 1 |
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: Alexander Smirnov | |
Version: 1.0 | |
Instruction: | |
Just paste in script editor this two lines to launch the script: | |
import colorizer | |
colorizer.start() |
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.api.OpenMaya as om2 | |
import maya.cmds as mc | |
import proxySkinning | |
reload(proxySkinning) | |
def duplicateSkinnedMesh(joints): | |
# get selected components | |
sel = om2.MGlobal.getActiveSelectionList() | |
for s in xrange( sel.length() ): |
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
''' | |
To launch the script run the code: | |
import pickWalker | |
reload(pickWalker) | |
pickWalker.pW().ui() | |
Assign hotkey to walk in up direction | |
import pickWalker |
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 | |
import maya.OpenMayaUI as apiUI | |
from PySide2 import QtGui, QtCore, QtWidgets | |
from shiboken2 import wrapInstance | |
class MouseDetector(QtCore.QObject): | |
def eventFilter(self, obj, event): | |
if event.type() == QtCore.QEvent.MouseButtonPress: | |
if event.button() == QtCore.Qt.LeftButton: | |
print 'left' |
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 sys | |
import maya.api.OpenMaya as om2 | |
import maya.cmds as mc | |
def maya_useNewAPI(): | |
pass | |
########################################################## | |
# csPoly Node. |