Skip to content

Instantly share code, notes, and snippets.

View jocelynkim's full-sized avatar
🍀

shinji jocelynkim

🍀
  • Tokyo
View GitHub Profile
@jocelynkim
jocelynkim / mergeVerts.py
Created February 6, 2019 07:38
Maya script that merges overlapping vertices within each selected mesh, using a user-specified merge threshold.
import pymel.core as pm
# mergeVerts()
# Author: Jocelyn Kim
# Function: Mass merge overlapping vertices on selected mesh(es) under a user-specified threshold
# 'meshes' is a list of all of the meshes in the user's selection
meshes = [x for x in [ thing for thing in pm.selected() if thing.getShape()] if x.getShape().nodeType() == 'mesh']
# UI Layout
@jocelynkim
jocelynkim / toggleLRA.py
Created February 6, 2019 07:36
Maya script that force toggles all Local Rotation Axis displays to be on or off, for all joints or for selected joints/transforms.
from pymel.core import *
# toggleLRA()
# Function: force toggles all Local Rotation Axis displays to be on or off, for all joints or for selected joints/transforms.
# Jocelyn Kim - repurposed script from benmorgantd's gist, bm_axisDisplay. Thank you!!! :)
win = window(title="Toggle Local Rotation Axis Displays", rtf=True)
layout = columnLayout()
chkBox = checkBox(label = "Display LRAs?", value = True, parent = layout)
btn = button(label = "TOGGLE!", parent = layout)
@jocelynkim
jocelynkim / addCurve.py
Created February 6, 2019 07:35
Maya script that adds curve shapes to a selection of joints, inheriting its transform values.
from pymel.core import *
# AddCurve()
# Author: Jocelyn Kim
# Function: Adds a curve to a selection of joint(s), renames it with whatever suffix you want
# Get the joint(s) selected
selected = cmds.ls(sl=True)
win = window('Add Curve', width=100)