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.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 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 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 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 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 symmetry(edit, original): | |
mirror = mirrorBlendshape([edit],original)[0] | |
copy = cmds.duplicate(original)[0] | |
bldShp = cmds.blendShape(edit, mirror,copy)[0] | |
cmds.setAttr('%s.%s' % (bldShp, edit), 1) | |
cmds.setAttr('%s.%s' % (bldShp, mirror), 1) | |
symmetry = cmds.duplicate(copy)[0] | |
symmetry = cmds.rename(symmetry, original + '_symmetry') | |
cmds.delete(copy, mirror) |
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
//Maya ASCII 2014 scene | |
//Name: parentInverseOffset.ma | |
//Last modified: Tue, Apr 22, 2014 05:27:56 PM | |
//Codeset: 1252 | |
requires maya "2014"; | |
requires -nodeType "decomposeMatrix" -nodeType "composeMatrix" -nodeType "inverseMatrix" | |
-nodeType "transposeMatrix" "matrixNodes" "1.0"; | |
currentUnit -l centimeter -a degree -t pal; | |
fileInfo "application" "maya"; | |
fileInfo "product" "Maya 2014"; |
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.cmds as cmds | |
import Tapp.Maya.Red9.core.Red9_AnimationUtils as r9Anim | |
import Tapp.Maya.Red9.core.Red9_CoreUtils as r9Core | |
def switchRotationAxis(node, axis1, axis2, axis1Inverse, axis2Inverse): | |
#variables | |
temp = cmds.spaceLocator() |
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 re | |
import gspread | |
gc = gspread.login('LOGIN', 'PASSWORD') | |
wks = gc.open('Companies Contact') | |
worksheet = wks.worksheet('Input') |
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 pm | |
import maya.mel as mel | |
for node in pm.ls(type='stroke'): | |
cmd = 'applyPresetToNode "%s" "" "" "ghost" 1;' % node | |
mel.eval(cmd) | |
for node in pm.ls(type='brush'): | |
cmd = 'applyPresetToNode "%s" "" "" "ghost" 1;' % node | |
mel.eval(cmd) |
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 pc | |
import pymel.core.animation as pca | |
import pymel.core.nodetypes as pcn | |
import maya.mel | |
# create animation layer | |
if pc.ls(selection=True): | |
anim_layer = pca.animLayer(addSelectedObjects=True) | |
pc.rename(anim_layer, 'baked_secondary_keys') | |
anim_layer.override.set(True) |