Skip to content

Instantly share code, notes, and snippets.

View kokimimi's full-sized avatar
🎯
Focusing

Giacomo Gaiotto kokimimi

🎯
Focusing
View GitHub Profile
@kokimimi
kokimimi / calculate_pole_vector.py
Created October 14, 2022 09:44 — forked from chris-lesage/calculate_pole_vector.py
Autodesk Maya script to calculate pole vector position based on 3 input objects
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 chris@rigmarolestudio.com
'''
def calculate_pole_vector(p1, p2, p3, poleDistance=1):
"""
@kokimimi
kokimimi / pyside_dynamic.py
Created October 7, 2022 08:08 — forked from liudonghua123/pyside_dynamic.py
pyside_dynamic.py with minor improvements - also see http://stackoverflow.com/a/14894550/532513
#!/usr/bin/python2
# -*- coding: utf-8 -*-
# Copyright (c) 2011 Sebastian Wiesner <lunaryorn@gmail.com>
# Modifications by Charl Botha <cpbotha@vxlabs.com>
# * 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
@kokimimi
kokimimi / bm_componentToJoint.py
Created July 30, 2019 13:11 — forked from benmorgantd/bm_componentToJoint.py
Maya script that creates joints on each selected vertex or at the center of each selected edge or face.
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("[")]