Skip to content

Instantly share code, notes, and snippets.

@SEVEZ
SEVEZ / MAYA_findFlippedUVs.py
Created May 10, 2016 20:16 — forked from Onefabis/MAYA_findFlippedUVs.py
[Maya, python] _findFlippedUVs
# -*- coding: utf-8 -*-
import maya.OpenMaya as om
import maya.cmds as cmds
def _findFlippedUVs(nodesOnly=True):
ret = []
selList = om.MSelectionList()
@SEVEZ
SEVEZ / PS_keyOps.py
Last active September 7, 2017 17:49
PS_keyOps - use long or double hotkeys press for different commands execution #Final
'''
PS_keyOps - use long or double hotkeys press for different commands execution
Pavel Sevets 2016
[email protected]
USAGE:
1) Long key press
@SEVEZ
SEVEZ / MAYA_findFlippedUVs.py
Created May 11, 2016 18:52 — forked from hmasato/MAYA_findFlippedUVs.py
[Maya, python] _findFlippedUVs
# -*- coding: utf-8 -*-
import maya.OpenMaya as om
import maya.cmds as cmds
def _findFlippedUVs(nodesOnly=True):
ret = []
selList = om.MSelectionList()
@SEVEZ
SEVEZ / softCluster.py
Created May 11, 2016 18:53 — forked from jhoolmans/softCluster.py
Maya create soft cluster
import maya.cmds as mc
import maya.OpenMaya as om
def softSelection():
selection = om.MSelectionList()
softSelection = om.MRichSelection()
om.MGlobal.getRichSelection(softSelection)
softSelection.getSelection(selection)
dagPath = om.MDagPath()
@SEVEZ
SEVEZ / findskin.py
Created May 11, 2016 18:54 — forked from robomojo/findskin.py
find maya skincluster
def findSkinClusters ():
skins = []
shapes = pm.listRelatives(shapes=True, noIntermediate=True)
for shape in shapes:
skinClusters = pm.ls(type=pm.nodetypes.SkinCluster)
for skin in skinClusters:
mesh = pm.skinCluster(skin, q=True, g=True)
if mesh[0] == shape:
relatedSkinCluster = sc
skins.append(skin)
@SEVEZ
SEVEZ / unsmoothMesh.py
Created May 11, 2016 18:55 — forked from kanishk2391/unsmoothMesh.py
Reconstruct Subdiv for Maya
#---------Reconstruct Subdiv Script for Maya----------
#Script by - Kanishk Chouhan
#Email - [email protected]
#Blog - www.pixel-architect.blogspot.com
#Description -
#This script allows u to reverse the result of smooth operation in maya after deleting the history
#It also preserves the original UV of the mesh
#Select the mesh u want to unsmooth and execute the script
#Script might take some time to execute depending on the polycount...
@SEVEZ
SEVEZ / hotkeys.py
Created May 11, 2016 18:58 — forked from danbradham/hotkeys.py
Autodesk Maya hotkeys with Python
import maya.cmds as cmds
import maya.mel as mel
from maya.utils import executeDeferred
from functools import wraps
import re
def defer(fn):
'''Delays execution of the decorated function until Maya is available.'''
@wraps(fn)
@SEVEZ
SEVEZ / object_under_cursor.py
Created May 11, 2016 19:01 — forked from mottosso/object_under_cursor.py
Get object under cursor - Autodesk Maya
"""Illustration of how to retrieve the shape under the mouse cursor
Usage:
Run `start()` to start listening for when the mouse stops and to display a tooltip
Run `stop()` to stop listening
"""
from PySide import QtGui, QtCore
@SEVEZ
SEVEZ / selectEnclosedFaces.py
Created May 11, 2016 19:11 — forked from r4inm4ker/selectEnclosedFaces.py
Select enclosed faces by edge loop and one inner vertex in Maya
import maya.cmds as cmds
import re
import maya.OpenMaya as om
def getComponentId(component):
"""get id number from a component (i.e. pCube.vtx[12]) , and return as int (i.e. 12 ) ."""
tokens = re.split('[\[\]]',str(component))
try:
return int(tokens[1])
@SEVEZ
SEVEZ / dyn_shelf_launcher.py
Created May 11, 2016 19:15 — forked from yamahigashi/dyn_shelf_launcher.py
指定パス以下の スクリプトを元にシェルフを動的作成 for maya
"""coding: utf-8"""
#
# 指定パス以下の スクリプトを元にシェルフを動的作成 for maya
#
# ├─dyn_shelf_root
# │ ├─hoge_tab
# │ │ └─ スクリプト1.py
# │ │ └─ スクリプト2.py
# │ └─mage_tab
# └─ スクリプト3.py