Skip to content

Instantly share code, notes, and snippets.

View defTechAndrew's full-sized avatar

Andrew Christophersen defTechAndrew

View GitHub Profile
#!/usr/bin/python
import sys
from PySide import QtGui, QtCore
# Big thing to takeaway. You mostly work on models. You can totally customize the views, but
# for simple things you're basically just building a model and letting the view display it for you.
def simple():
"""
A simple utility module for moving skinned joints.
"""
import math
import pymel.core as pmc
def reset_bind_matrix(joint):
"""
@chris-lesage
chris-lesage / example_usage.py
Last active April 14, 2024 20:43
A script to pin an object to a NurbsSurface in Autodesk Maya
import pymel.core as pm
'''
Here are some examples of how to use the pin_to_surface.py script.
'''
# make a nurbsPlane
oNurbs = pm.nurbsPlane(n='nurbsPlane1')
# You can specify the nurbsSurface by string, PyNode transform or PyNode shape.
"""
Functions for generating spline weights.
Usage:
This modules functions each take curve parameters and output control point weights. The weights are generated using
a modified version of de Boor's algorithm. These weights can be used to create a weighted sum to find a point or
tangent on a spline.
While these functions are written for usage in Autodesk Maya, they don't actually have any Maya-specific libraries.
Additionally none of these functions actually care about the data type of provided control points. This way these