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 | |
for ref in cmds.ls(type='reference'): | |
try: | |
cmds.referenceQuery(ref,filename=True) | |
except: | |
cmds.lockNode(ref,l=False) | |
cmds.delete(ref) |
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 | |
#load plugin | |
cmds.loadPlugin('fbxmaya.mll',quiet=True) | |
#getting file path and name | |
basicFilter = "FBX (*.fbx)" | |
filePath=cmds.fileDialog2(fileFilter=basicFilter, dialogStyle=1, | |
fileMode=1, |
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 removeNamespaces(namespace='::'): | |
ignoreNamespaces = ['UI', 'shared'] | |
cmds.namespace(setNamespace=namespace) | |
childNamespaces = cmds.namespaceInfo(listOnlyNamespaces=True) | |
if childNamespaces: | |
namespaces=list(set(childNamespaces)-set(ignoreNamespaces)) | |
for n in namespaces: |
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
//sets the root of ghost | |
performSetHierarchyRoot; | |
//sets the offset object | |
performSetOffsetObject; |
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 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"): |
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 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 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 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 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 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) |
OlderNewer