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
# ------------------------------------------------------------------------- | |
# walkUp | |
# ------------------------------------------------------------------------- | |
def walkUp(inPath, dirTag='foo'): | |
''' | |
Mimic something like os.walk, but walks up the directory tree | |
Walks Up from the inPath looking for a dir with the name dirTag | |
inPath: the path to start in | |
dirTag: the name of diretory above us we are looking for |
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 | |
filePath = mc.file(q=True, sceneName=True) | |
parentDir = os.path.abspath(os.path.join(filePath, os.pardir)) | |
selSet= mc.ls( selection=True ) | |
for thing in selSet: | |
selThing = mc.select(thing) | |
newFile = os.path.abspath(os.path.join(parentDir, '{0}.ma'.format(thing))) |
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/python | |
#coding:utf-8 | |
# -- This line is 75 characters ------------------------------------------- | |
""" | |
This script will convert a .HDR (radiance) into a RGBM file, | |
then save it back out as a 8bit (per-channel) .tga | |
""" | |
__author__ = 'HogJonny' | |
# ------------------------------------------------------------------------- |
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
# fast easy work around for rendering hardware2/viewport2.0 sequence frames in Maya 2016 | |
# you still need to setup for animation in the 'Render Settings' | |
# Change 'Frame/Animation ext:' pull down, so that each frame will be written out | |
# with name frame padding, etc. | |
import maya.cmds as cmds | |
# Settings | |
startFrame = int(cmds.playbackOptions(q=True, min=True)) | |
endFrame = int(cmds.playbackOptions(q=True, max=True)) |
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/env python | |
#coding:utf-8 | |
# -- This line is 75 characters ------------------------------------------- | |
__author__ = 'HogJonny' | |
import os, sys | |
import subprocess |
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/env python | |
#coding:utf-8 | |
#-------------------------------------------------------------------------- | |
def synthesize(inst, name, value, readonly=False): | |
''' | |
This is a convenience method for OOP | |
synthesizes the creation of attr with convenience methods: | |
x.attrbute | |
x._attribute # attribute storage |
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/env python | |
#coding:utf-8 | |
__author__ = '[email protected]' | |
## reference: https://gist.github.com/bjorn/4635382 | |
# -- This line is 75 characters ------------------------------------------- | |
# example code |
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/env python | |
#coding:utf-8 | |
# -- This line is 75 characters ------------------------------------------- | |
# ------------------------------------------------------------------------- | |
# ------------------------------------------------------------------------- | |
# version: 0.1 | |
# date: 12/15/2014 | |
# author: jGalloway |
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
# ------------------------------------------------------------------------- | |
# ------------------------------------------------------------------------- | |
# bp_newTool.py | |
# Tool for blah, blah, blah | |
# version: 1.0 | |
# date: 5/1/2013 | |
# author: jGalloway | |
# ------------------------------------------------------------------------- | |
# ------------------------------------------------------------------------- |
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/env python | |
#coding:utf-8 | |
# -- This line is 75 characters ------------------------------------------- | |
# ------------------------------------------------------------------------- | |
# ------------------------------------------------------------------------- | |
# fileTemplate.py | |
# This is a template formatting for new files. | |
# version: 0.1 |
NewerOlder