Skip to content

Instantly share code, notes, and snippets.

from PySide.QtCore import *
from PySide.QtGui import *
lineWidth = 3
rows = 4
columns = 6
color = 'red'
class UnderlinedItemClass(QWidget):
def __init__(self):
def htoaEnv(data):
# print '>>',data
# return
# ver = open(join(data['modules_htoa'],'current_version.txt')).read()
path = None
if os.path.exists(data['modules_htoa']):
for f in os.listdir(data['modules_htoa']):
if f.startswith('htoa'):
hou_version = join(data['modules_htoa'], f, 'scripts/python/htoa/build.py')
if os.path.exists(hou_version):
from pymel.core import *
import maya.OpenMaya as om
from imath import *
from alembic.Abc import *
import alembic
import math
def get_mesh_data():
selection = om.MSelectionList()
@paulwinex
paulwinex / app.js
Created November 17, 2015 16:16
Simple firebase messager
/*eslint-disable */
'use strict';
angular.module('messagesApp', [
'firebase'
])
.constant('FirebaseUrl', 'https://pwfireslack.firebaseio.com/')
.controller('msgCtrl', ['$scope', 'Messages', function ($scope, Messages) {
$scope.messages = Messages.all;
$scope.captcha = undefined;
status= dict(
hold=0,
omni=1,
notstarted=2,
wip=3,
inprogress=4,
pending=5,
normal=6,
proposed=7,
approved=8,
# install:
# add to menu.py
import nuke
from PySide.QtGui import *
from PySide.QtCore import *
def getMainWindow():
qApp = QApplication.instance()
for widget in qApp.topLevelWidgets():
import nuke
def createShuffleEXR(gradeNodes):
sel =nuke.selectedNode()
chanList=[]
rr = sel.channels()
for i in rr:
temp = i.split('.')
if (len(chanList)) == 0:
from pymel.core import *
objs = ls(sl=1, type='mesh')
errors = []
for obj in objs:
areas = {}
for f in obj.f:
a = round(f.getArea(),3)
@paulwinex
paulwinex / fast_render_frame.py
Created January 12, 2016 19:54
Render frame
def render_current_frame_ogl(self):
import tempfile, random
d = tempfile.gettempdir()
f = join(d,'preview_image_%s' % random.randrange(10000, 99999)) + '.jpg'
rg = PyNode('defaultRenderGlobals')
dr = PyNode('defaultResolution')
old_format = rg.imageFormat.get()
rg.imageFormat.set(8)
playblast(
frame=currentTime(),
@paulwinex
paulwinex / render_frame_arnold.py
Created January 13, 2016 13:40
Render current frame with arnold to jpeg and return path
def render_current_frame_ai(self):
import tempfile, random
from arnold import *
d = tempfile.gettempdir()
fi = join(d,'preview_image_%s' % random.randrange(10000, 99999))
fa = join(d,'preview_image_%s' % random.randrange(10000, 99999)) + '.ass'
rg = PyNode('defaultRenderGlobals')
dr = PyNode('defaultResolution')
ar = PyNode('defaultArnoldDriver')