This file contains hidden or 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
''' | |
pslive | |
====== | |
Live CSS Reloading for PySide. | |
This is pretty useful. You might want to use it too! | |
''' | |
from PySide import QtCore | |
from collections import defaultdict |
This file contains hidden or 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 pymel.core as pmc | |
from PySide import QtGui, QtCore | |
import imgutils | |
import itertools | |
import glob | |
import re | |
import os | |
def get_maya_window(): |
This file contains hidden or 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 os | |
import sys | |
from copy import deepcopy | |
platform = sys.platform.rstrip('1234567890').lower() | |
if platform == 'darwin': | |
platform = 'osx' | |
elif platform == 'linux': | |
platform = 'unix' |
This file contains hidden or 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
''' | |
Deadline Standalone Utilities | |
============================= | |
''' | |
from collections import Counter | |
from Deadline import DeadlineConnect | |
class DeadlineConnection(object): |
This file contains hidden or 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 time | |
from maya.api import OpenMaya | |
MVector = OpenMaya.MVector | |
def get_dagnode(mesh): | |
sel = OpenMaya.MSelectionList() | |
sel.add(mesh) | |
return OpenMaya.MFnDagNode(sel.getDagPath(0)) |
This file contains hidden or 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 __future__ import print_function, division | |
import pymel.core as pm | |
from pymel.core.runtime import nClothCreate, nClothMakeCollide | |
from contextlib import contextmanager | |
import re | |
import time | |
from random import choice | |
@contextmanager |
This file contains hidden or 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 os | |
import signal | |
import sys | |
import time | |
import glob | |
import re | |
import fnmatch | |
from itertools import izip | |
from functools import partial | |
from PySide import QtCore, QtGui |
This file contains hidden or 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 pymel.core as pmc | |
SHADING_CLASSIFICATIONS = { | |
'texture': {'asTexture': True}, | |
'shader': {'asShader': True}, | |
'light': {'asLight': True}, | |
'utility': {'asUtility': True}, | |
'rendering': {'asRendering': True}, | |
'postprocess': {'asPostProcess': True}, |
This file contains hidden or 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 os | |
from PySide import QtGui | |
import nuke | |
import nukescripts | |
def copy_script(): | |
nuke.nodeCopy('%clipboard%') | |
clipboard = QtGui.QApplication.clipboard() | |
script = clipboard.text() |
This file contains hidden or 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 pymel.core as pmc | |
import pymel.core.nodetypes as pmtypes | |
def create_ramp_shader(name): | |
ramp = pmc.shadingNode('ramp', asTexture=True, name=name + '_color') | |
reverse = pmc.shadingNode('reverse', asUtility=True, name=name + '_opacity') | |
ramp.outColor.connect(reverse.input) | |