Skip to content

Instantly share code, notes, and snippets.

View StevenGoehrig's full-sized avatar

Steven Goehrig StevenGoehrig

View GitHub Profile
# L_arm_IKStretch.py
'''
Start with a left arm joint chain (positive X).
Each joint labeled according to the convention L_[jointname]_IK_JNT.
It should have a RPSolver IK Handle and a measure distance node from beginning to end.
The distanceDimension node should be labeled L_arm_IK_length.
The L_arm_IK_lengthEnd_LOC should be placed under the IK arm control alongside the IK Handle.
'''
@StevenGoehrig
StevenGoehrig / lips_rigger.py
Created March 7, 2026 22:52
Updated mGear Lips Rigger
"""Rigbits lips rigger tool"""
import json
from functools import partial
from six import string_types
import mgear.core.pyqt as gqt
import pymel.core as pm
from maya.app.general.mayaMixin import MayaQWidgetDockableMixin
from mgear.vendor.Qt import QtCore, QtWidgets
@StevenGoehrig
StevenGoehrig / L_foot_smartRoll.py
Created March 7, 2026 22:52
Add Left Foot Smart Roll
# L_foot_smartRoll.py
'''
This script assumes you already have a basic foot rig as well as
IK handles and foot locators (heel, ball, and toe) in the proper
hierarchy beneath the L_foot_CTRL.
The L_foot_CTRL should have three custom attributes: Roll,
bendLimitAngle, and toeStraightAngle (Defaults: 0, 45, 70).
'''
# FKIKSwitch.py
'''
This script assumes a normal human body.
Start with three overlapping and identical joint chains for a leg or arm.
Label each according to the convention [L/R]_[jointname]_[FK/IK/result]_JNT.
Also have a [L/R]_[limb]_settings_CTRL with an FKIK_blend attribute from 0 to 1.
It should be parent constrained to the [L/R]_[foot/hand]_result_JNT.
'''
import mgear.shifter.custom_step as cstp
import pymel.core as pm
from mgear.rigbits.rope import rope
class CustomShifterStep(cstp.customShifterMainStep):
"""Turns the standard chain_spring_01 mgear component into a tail by adding a layer of rope joints.
"""
def setup(self):
from maya.api import OpenMaya as om2
import pymel.core as pm
def matrixConstraint(source, destination, mo=False, t=True, r=True):
"""
Constrains the destination node to the source node.
Args:
source(str): A source node name.
destination(str): A destination node name.
@StevenGoehrig
StevenGoehrig / _eye_socket_component.py
Last active March 7, 2026 22:57
Eye Socket Component
from maya import cmds
import pymel.core as pm
from PySide6 import QtCore, QtGui, QtWidgets
from maya.app.general.mayaMixin import MayaQWidgetDockableMixin
from mgear.core import curve, primitive, icon, transform, vector
from functools import partial
from custom import curve_tool, joint_tool, orientation_tool
def get_vertex_loop_from_selection(): #TODO move to it's own script
selection = cmds.ls(sl=True, fl=True)
### Export Rig ###
import os
from maya import cmds, mel
from path_lib.path_utils import get_publish_dir
def export_rig():
# Rename and save the scene
# Otherwise errors might break the source file
scenePath= cmds.file(q=True, sn=True)
sceneName = scenePath[0:-3]