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
title On The Grid Off The Grid | |
author Cole O'Brien | |
homepage www.puzzlescript.net | |
again_interval 0.1 | |
color_palette proteus_night | |
require_player_movement | |
======== | |
OBJECTS |
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
''' | |
''' | |
from collections import namedtuple | |
import maya.cmds as cmds | |
import maya.OpenMaya as om | |
import maya.api.OpenMaya as om2 |
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 math | |
import time | |
import random | |
from maya import cmds | |
from maya import mel | |
### SETTINGS ### | |
targets = cmds.ls(selection=True) |
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
""" | |
A simple utility module for moving skinned joints. | |
""" | |
import math | |
import pymel.core as pmc | |
def reset_bind_matrix(joint): | |
""" |
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.api.OpenMaya as om2 | |
def relative_matrix(matrix, old_com_matrix, new_com_matrix, | |
forwardVector=om2.MVector(1, 0, 0), upVector=om2.MVector(0, 1, 0)): | |
""" | |
Returns a new modified matrix relatively matching a previous matrix. | |
Args: | |
matrix(om2.MMatrix): The matrix to modify. | |
old_com_matrix(om2.MMatrix): The previous center of mass matrix. |
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
""" | |
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 |
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
""" | |
Converts a polygon mesh to a first degree nurbs curve. | |
""" | |
from maya import cmds | |
import maya.api.OpenMaya as om2 | |
def getSelectedMeshes(): | |
""" | |
Gets the currently selected mesh paths. |