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
<fontconfig> | |
<match target="font"> | |
<edit name="rgba" mode="assign"> | |
<const>none</const> | |
</edit> | |
</match> | |
</fontconfig> |
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 random | |
import pprint | |
class Transform: | |
def __init__(self): | |
self._translate = [0.0, 0.0, 0.0] | |
self._rotate = [0.0, 0.0, 0.0] | |
self._scale = [1.0, 1.0, 1.0] |
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 QtGui | |
class QDictBox(QtGui.QDialog): | |
WIDGETS = {str: QtGui.QLineEdit, | |
unicode: QtGui.QLineEdit, | |
int: QtGui.QSpinBox, | |
float: QtGui.QDoubleSpinBox, | |
list: QtGui.QComboBox, | |
bool: QtGui.QCheckBox} |
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/python2 | |
# -*- coding: utf-8 -*- | |
# Copyright (c) 2011 Sebastian Wiesner <[email protected]> | |
# Modifications by Charl Botha <[email protected]> | |
# * customWidgets support (registerCustomWidget() causes segfault in | |
# pyside 1.1.2 on Ubuntu 12.04 x86_64) | |
# * workingDirectory support in loadUi | |
# found this here: | |
# https://github.com/lunaryorn/snippets/blob/master/qt4/designer/pyside_dynamic.py |
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/autodesk/maya/bin/mayapy | |
import sys | |
for each in ("PySide", "PySide2"): | |
try: | |
if each == "PySide2": | |
_temp = __import__(each, globals(), locals(), ['QtWidgets'], -1) | |
QtWidgets = _temp.QtWidgets | |
else: | |
_temp = __import__(each, globals(), locals(), ('QtGui'), -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
import maya.cmds as mc | |
if not hasattr(mc, "CLIPBOARD"): | |
mc.CLIPBOARD = dict() | |
def saveTransforms(nodes=None): | |
nodes = nodes or mc.ls(sl=True, l=True) | |
for longName in nodes: |
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 | |
def toggleVisibilityByType(type_): | |
options = {type_: True} | |
state = mc.modelEditor("modelPanel4", q=True, **options) | |
options[type_] = not state | |
mc.modelEditor("modelPanel4", e=True, **options) | |
toggleCurvesVisibility = lambda: toggleVisibilityByType("nurbsCurves") | |
toggleJointsVisibility = lambda: toggleVisibilityByType("joints") |
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 | |
if not hasattr(mc, "CLIPBOARD"): | |
mc.CLIPBOARD = dict() | |
def get_shading(node): | |
rval = dict() | |
type_ = cmds.nodeType(node) |
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 _getConstants(): | |
return {"FOO": "foo", "BAR": "bar", "BAZ": "baz"} | |
def _updateConstants(): | |
import os | |
# assemble code | |
code = "# This code is automatically generated by constants.py\n\n" | |
for k, v in _getConstants().iteritems(): |