Skip to content

Instantly share code, notes, and snippets.

View heiths's full-sized avatar

Heith Seewald heiths

View GitHub Profile
@heiths
heiths / mayaOnUbuntu.sh
Last active February 28, 2024 18:50
Shell script to install and setup Autodesk Maya 2014 on Ubuntu 13.04
#!/bin/bash
#Heith Seewald 2012
#Feel free to extend/modify to meet your needs.
#Maya on Ubuntu v.1
#This is the base installer... I’ll add more features in later versions.
#if you have any issues, feel free email me at heiths@gmail.com
#### Lets run a few checks to make sure things work as expected.
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
@heiths
heiths / hsFakeBatch.py
Created August 4, 2012 05:47
quick and dirty fake batch render for maya...
from pymel.core import *
cams = ls( type='camera')
defaultCams = ["frontShape","perspShape", "sideShape","topShape"]
for i in defaultCams:
cams.remove(i)
def hsRender(name):
start = int(startFrame.getText())
end = int(endFrame.getText())
@heiths
heiths / oneMaya.vbs
Created August 18, 2012 23:14
ensure that only a single instance of maya is running on windows.
'Be sure that maya's bin folder is located in your system's path.
Dim AllProcess, Process, strFoundProcess
Dim objShell : Set objShell = CreateObject("Wscript.Shell")
strFoundProcess = False
Set AllProcess = getobject("winmgmts:") 'create object
objShell.Run "maya.exe"
WScript.Sleep 4000
Do
For Each Process In AllProcess.InstancesOf("Win32_process") 'Get all the processes running in your PC
@heiths
heiths / decompile_all.sh
Created December 22, 2012 01:06
bash script to decompile all .pyc files in a directory. Must have uncompyler installed.
for i in `ls *.pyc`; do echo $i | awk '{print("uncompyler.py "$1" > "$1)}' | sed 's/pyc/py/2' | /bin/sh; done
@heiths
heiths / gist:5630258
Last active December 17, 2015 15:18
cube test
from pymel.core import *
def cubeCube():
rows = int(raw_input("rows"))
columns = int(raw_input("columns"))
@heiths
heiths / gist:5630269
Last active December 17, 2015 15:18
cube test basic
from pymel.core import *
rows = 10
columns = 10
hight = 10
r = 0
c = 0
h = 0
@heiths
heiths / gist:5638764
Last active December 17, 2015 16:29
qubeQubed
from pymel.core import *
row = 10
column = 10
height = 10
x,y,z = 0, 0, 0
for i in range(0, row * column * height):
@heiths
heiths / gist:5641268
Created May 24, 2013 04:22
spiral basic
from pymel.core import *
cvCount = 1000
cvPoints = []
for i in range(cvCount):
x = dt.sin(i) * i
y = dt.cos(i) * i
z = 0
cvPoints.append([x, y, z])
@heiths
heiths / vtxselect.py
Last active December 20, 2015 05:49
pymel vert selection example
from pymel.core import *
ball = polySphere()[0]
bs = ball.getShape()
#Basic selection
select([i for i in bs.vtx if i.getPosition().y >= 0])
#more interesting things:
@heiths
heiths / cities_without_a.py
Created October 10, 2013 02:10
quick list of texas cities without letter A
from bs4 import BeautifulSoup
import requests
r = requests.get('http://en.wikipedia.org/wiki/List_of_cities_in_Texas')
soup = BeautifulSoup(r.text)
links = soup.find_all('li')
cities = []
for i in links:
try: