Skip to content

Instantly share code, notes, and snippets.

View stylerhall's full-sized avatar
🌌

Seth Hall stylerhall

🌌
View GitHub Profile
@rjmoggach
rjmoggach / nucamio.py
Last active January 9, 2021 17:07
nucamio
import math
import os
import re
import json
from pprint import pprint
from collections import OrderedDict
from operator import add
import maya.cmds as cmds
import maya.mel as mel
@mattatz
mattatz / Easing.hlsl
Created January 19, 2018 04:37
Easing functions for HLSL.
#ifndef _EASING_INCLUDED_
#define _EASING_INCLUDED_
float ease_linear(float x) {
return x;
}
float ease_in_quad(float x) {
float t = x; float b = 0; float c = 1; float d = 1;
return c*(t/=d)*t + b;
@vshotarov
vshotarov / markingMenu.py
Created May 13, 2017 11:48
Example of a custom marking menu in Maya, scripted in Python.
'''A simple example of a custom marking menu in Maya. The benefits of doing it this way with Python are that
it is very flexible and easily maintainable. Additionally, you can keep it in a version control system.
This file is used for demonstration purposes, to be followed along with in this blog post
http://bindpose.com/custom-marking-menu-maya-python/
'''
import maya.cmds as mc
@christophercrouzet
christophercrouzet / mayabake.py
Created December 24, 2016 14:03
Quick and dirty prototype of a naive animation bake implementation for Autodesk Maya.
#!/usr/bin/env mayapy
import itertools
import math
import random
import timeit
from maya import cmds, OpenMaya, OpenMayaAnim
@eevee
eevee / perlin.py
Last active May 29, 2025 13:08
Perlin noise in Python
"""Perlin noise implementation."""
# Licensed under ISC
from itertools import product
import math
import random
def smoothstep(t):
"""Smooth curve with a zero derivative at 0 and 1, making it useful for
interpolating.
@arseniy-panfilov
arseniy-panfilov / exr_to_srgb.py
Last active May 20, 2025 18:48
Convert .EXR image to pillow's `Image` with gamma encoding
from PIL import Image
import OpenEXR
import Imath
import numpy
import numexpr as ne
FLOAT = Imath.PixelType(Imath.PixelType.FLOAT)
def exr_to_array(exrfile):
@EricTRocks
EricTRocks / QSliderWithText.py
Created April 19, 2016 19:41
QSlider with Text showing Value
from PySide import QtCore, QtGui, QtOpenGL
class SliderWithValue(QtGui.QSlider):
def __init__(self, parent=None):
super(SliderWithValue, self).__init__(parent)
self.stylesheet = """
@JokerMartini
JokerMartini / Toggle GroupBox Collapse | .py
Created November 4, 2015 14:44
Python Pyside: Toggle the expansion of a groupbox in pyside using the groupbox.
import sys
from PySide import QtGui, QtCore
class Example(QtGui.QWidget):
def __init__(self,):
super(Example, self).__init__()
self.initUI()
@KeyMaster-
KeyMaster- / polarWarp.glsl
Created April 4, 2015 21:27
Cartesian to Polar coordinates warp shader, for shadertoy.com
//To be used on shadertoy.com
//Uses the image at iChannel0 and warps it into polar coordinates
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 relativePos = fragCoord.xy - (iResolution.xy / 2.0);
vec2 polar;
polar.y = sqrt(relativePos.x * relativePos.x + relativePos.y * relativePos.y);
polar.y /= iResolution.x / 2.0;
polar.y = 1.0 - polar.y;
@hogjonny
hogjonny / substancePythonBatch.py
Created February 25, 2015 18:13
Basic python formatting for a working example of accessing Allegorithmic Substance BatchTools via script.
#!/usr/bin/env python
#coding:utf-8
# -- This line is 75 characters -------------------------------------------
__author__ = 'HogJonny'
import os, sys
import subprocess