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 maya.mel as mel | |
def mirrorBlendshape(targets, originalinal): | |
original = cmds.ls(selection=True)[-1] | |
targets = cmds.ls(selection=True)[:-1] | |
mirror = cmds.duplicate(original)[0] | |
bldShp = cmds.blendShape(targets,mirror)[0] | |
try: |
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 | |
sel=cmds.ls(selection=True) | |
src=sel[0] | |
trg=sel[-1] | |
for plug in cmds.listConnections(src+'.worldMesh[0]',plugs=True): | |
cmds.connectAttr(trg+'.worldMesh[0]',plug,force=True) |
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 | |
def copyCurve(src,trg): | |
cvs=cmds.getAttr(src+'.spans')+1 | |
for count in range(0,cvs): | |
srcCv=cmds.getAttr(src+'.cv[%s]' % count)[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 | |
sel=cmds.ls(selection=True) | |
lat=sel[-1] | |
objs=sel[0:-1] | |
for obj in objs: | |
cmds.lattice(lat,e=True,remove=True,geometry=obj) |
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 | |
sel=cmds.ls(selection=True) | |
lat=sel[-1] | |
objs=sel[0:-1] | |
for obj in objs: | |
cmds.lattice(lat,e=True,geometry=obj) |
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 maya.mel as mel | |
#load plugin | |
cmds.loadPlugin('fbxmaya.mll',quiet=True) | |
#getting file path and name | |
basicFilter = "Maya (*.ma)" | |
filePath=cmds.fileDialog2(fileFilter=basicFilter, dialogStyle=1, | |
fileMode=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
import maya.mel as mel | |
import maya.cmds as cmds | |
import maya.OpenMaya as om | |
sel=cmds.ls(selection=True) | |
try: | |
#getting namespace and nodes | |
ns=sel[0].split(':')[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 sys | |
import maya.cmds as cmds | |
import maya.OpenMaya as om | |
import Tapp.Maya.rigging.utils as mru | |
sel=cmds.ls(selection=True) | |
if 0 >= len(sel) <= 2: |
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 os | |
import maya.cmds as cmds | |
import maya.mel as mel | |
def exportClip(filePath): | |
cmds.select('grandpa:rig:character_Ctrl_Reference',hierarchy=True) | |
objs=cmds.ls(selection=True) | |
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 os | |
import subprocess | |
def convertBipToFbx(mainDir): | |
#collecting bip files | |
bipFiles=[] | |
for r,d,f in os.walk(mainDir): | |
for files in f: | |
if files.endswith(".bip"): |