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
# Public domain | |
from pymel import core as pm | |
import re | |
def resetJointOnCluster(joint, skinClusterPreMatrixPlug): | |
inverseMatrix = joint.attr('worldInverseMatrix').get() | |
curMatrix = skinClusterPreMatrixPlug.get() | |
if curMatrix is not None: | |
different = any(abs(a-b) > 0.00001 for a, b in zip(inverseMatrix, curMatrix)) |
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
# Public domain | |
import pymel.core as pm | |
from pymel import core as pm | |
from maya.api import OpenMaya as om | |
def getSkinClusterConnection(node): | |
for conn in pm.listConnections(node.attr('worldMatrix'), d=True, s=False, p=True, type='skinCluster') or []: | |
skinCluster = conn.node() | |
idx = conn.index() |
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
def toggle_parallel_settings( func ): | |
def _wrapper( *args, **kwargs ): | |
# Store the initial values. | |
evaluate_manager = pyfbsdk.FBEvaluateManager() | |
p_evaluation = evaluate_manager.ParallelEvaluation | |
p_pipeline = evaluate_manager.ParallelPipeline | |
p_deformation = evaluate_manager.ParallelDeformation | |
# Turn them all off | |
evaluate_manager.ParallelEvaluation = False |
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
#!/usr/bin/env mayapy | |
import itertools | |
import math | |
import random | |
import timeit | |
from maya import cmds, OpenMaya, OpenMayaAnim | |
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
""" | |
This is what you need to do in order to get a qt window to dock next to maya channel box, | |
In all maya versions, including 2017 with PySide2 | |
""" | |
__author__ = "[email protected]" | |
import sys | |
import os | |
import logging | |
import xml.etree.ElementTree as xml |
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 PySide import QtCore | |
from PySide import QtGui | |
from maya.app.general.mayaMixin import MayaQWidgetDockableMixin | |
class MainWindow(MayaQWidgetDockableMixin, QtGui.QMainWindow): | |
def __init__(self, parent=None): | |
super(MainWindow, self).__init__(parent=parent)\ |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import math | |
from PyQt4 import QtGui, QtCore | |
def binomial(i, n): |