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 PyQt4 import QtCore, QtGui | |
import maya.cmds as cmds | |
import maya.OpenMayaUI as mui | |
import sip | |
class MyDialog(QtGui.QDialog): |
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.cmds as mc | |
import maya.OpenMaya as om | |
def softSelection(): | |
selection = om.MSelectionList() | |
softSelection = om.MRichSelection() | |
om.MGlobal.getRichSelection(softSelection) | |
softSelection.getSelection(selection) | |
dagPath = om.MDagPath() |
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 python script encodes all files that have the extension mkv in the current | |
working directory. | |
Sources: | |
http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide | |
""" | |
import subprocess, os | |
#------------------------------------------------------------------------------- |
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 | |
# | |
# Python script to compile and install ffmpeg. | |
# | |
# part of ffcluster project. | |
# see full project at github.com/santazhang/ffcluster | |
# | |
# Author: Santa Zhang <santa1987@gmail.com> | |
import os |
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
// Original method | |
var object = { | |
method: function (x, y) { | |
return x+y; | |
} | |
} | |
// Add operations before or after! | |
object.method = (function (original) { | |
return function (x, y) { |
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
#!/bin/bash | |
# hosted at https://gist.github.com/Mark-Booth/5058384 | |
# forked from https://gist.github.com/lth2h/4177524 @ ae184f1 by mark.booth | |
# forked from https://gist.github.com/jehiah/1288596 @ e357c1e by lth2h | |
# ideas from https://github.com/kortina/bakpak/blob/master/bin/git-branches-vs-origin-master | |
# this prints out some branch status | |
# (similar to the '... ahead' info you get from git status) | |
# example: |
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.cmds as cmds | |
import maya.mel as mel | |
''' | |
What is this: | |
This is a simple script that will copy UV's from one mech to another. The meshes should be simular for best results. | |
It will copy the UV's to a rigged mesh or a non rigged mesh. | |
Instructions: | |
In order to run this script correctly, just select the mesh with the good UV's, then select the mesh with bad UV's. |
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 jointLock(): | |
allJoints = cmds.ls(type='joint') | |
for joint in allJoints: | |
cmds.setAttr(joint+'.radius',.01) | |
cmds.setAttr(joint+'.radius',lock=1,keyable=1,channelBox=0) | |
def jointUnlock(): | |
allJoints = cmds.ls(type='joint') | |
for joint in allJoints: | |
cmds.setAttr(joint+'.radius',lock=0,keyable=1,channelBox=1) |
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
#---------------------------------- | |
# Create Dynamic Joint Chains | |
#---------------------------------- | |
dynChain = lpDynamiChain(startJoint, endJoint) | |
dynChain.create() | |
def __init__(self, startJoint="", endJoint="", node=""): | |
""" Constructor. Creates the custom node. | |
NewerOlder