Skip to content

Instantly share code, notes, and snippets.

View drewgillievfx's full-sized avatar

Drew Gillie drewgillievfx

View GitHub Profile
@drewgillievfx
drewgillievfx / GillieDrew_finalproject_v23.mel
Last active April 17, 2018 21:52
Hand Rigging Project – This code automatically rigs a hand in Maya with help from the user
/*******************************************************************************
Drew Gillie Hand Rigging Project.
December 2016
This code is working there may be a few bugs in the mirroring portion of this
code depending on the version of Maya being used
*******************************************************************************/
if ( `window -exists MyWindow` ) {
deleteUI MyWindow; // delete window when it exists
}
@drewgillievfx
drewgillievfx / tvScramble
Created July 30, 2018 23:45
version 1.0
import urllib2
from urllib import urlopen as uReq
from bs4 import BeautifulSoup as soup
## Create a .csv file ##
filename = "episodes.csv"
f = open(filename, "w")
headers = "Title, Season, Episode, Description\n"
f.write(headers)
shader
Padding(float freq1 = 10,
float freq2 = 10,
float maxB = .25,
color minColor = color(0,0,0),
color maxColor = color(1,1,1),
float s = 0 [[int lockgeom = 0]],
float t = 0 [[int lockgeom = 0]],
output color resultRGB1 = 0,
output color resultRGB2 = 0,
# Layer 1
#node "facing"
#res = Pobj;
#res = cvoronoi(Pobj * #floatInput1)*2-1;
#res = norm(res);
cosangle = dot(Vn, Nn);
#facingRatio = pow(cosangle, #floatInput1);
facingRatio = cosangle < 0 ? -(pow(-cosangle, floatInput1)): (pow(cosangle, floatInput1));
// Layer 1 SeExpression
#Stained
Scale=floatInput1;
Jitter=floatInput2;
fbmScale=floatInput3;
fbmOctaves=floatInput4;
fbmLacunarity=floatInput3;
fbmGain=floatInput1;
Scale = (1-Scale)*10;
// Diffuse Color
shader
colorByP(float minheight = 1.25,
float maxheight = 1.25,
color mincolor = color(1,0,0),
color maxcolor = color(0,1,0),
output color resultRGB = 0
)
{
point p = transform("world", P);
float dist2cell(point p, string spacename, float freq, float jitter) {
point pp = transform(spacename, p) * freq;
point thiscell = point(floor(pp[0]) + 0.5,
floor(pp[1]) + 0.5,
floor(pp[2]) + 0.5);
float dist2nearest = 1000;
int i,j,k;
for(i = -1; i <= 1; i += 1)
for(j = -1; j <= 1; j += 1)
for(k = -1; k <= 1; k += 1) {