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 componentToJoint(): | |
if cmds.objectType(cmds.ls(sl=1)[0]) != "mesh": | |
return | |
# return the selection as a list | |
selList = getSelection() | |
print selList | |
componentType = selList[0][selList[0].index(".") + 1:selList[0].index("[")] |
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
#!/usr/bin/python2 | |
# -*- coding: utf-8 -*- | |
# Copyright (c) 2011 Sebastian Wiesner <[email protected]> | |
# Modifications by Charl Botha <[email protected]> | |
# * customWidgets support (registerCustomWidget() causes segfault in | |
# pyside 1.1.2 on Ubuntu 12.04 x86_64) | |
# * workingDirectory support in loadUi | |
# found this here: | |
# https://github.com/lunaryorn/snippets/blob/master/qt4/designer/pyside_dynamic.py |
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 | |
''' | |
An Autodesk Maya PyMEL script that calculates a pole vector position | |
based on 3 input PyNode objects. example: leg, knee, ankle bones. | |
Chris Lesage [email protected] | |
''' | |
def calculate_pole_vector(p1, p2, p3, poleDistance=1): | |
""" |