This file contains hidden or 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
crossDomainLoad: (url, callback)-> | |
$.get "http://query.yahooapis.com/v1/public/yql", { | |
q: "select * from json where url = \"#{url}\"" | |
format: "json" | |
}, (data)-> | |
if data.query.results | |
callback data.query.results.json |
This file contains hidden or 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
############################################## | |
# Dockable window template | |
# Created: 15/4/15 | |
# Jason Dixon (jason.dixon.email[AT]gmail.com) | |
############################################## | |
import maya.cmds as cmds | |
from functools import wraps | |
import sys | |
This file contains hidden or 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 | |
# Python to Mel converter | |
# Allows running of Python code by dragging into the Maya viewport | |
# Created 21/04/2015 | |
# Jason Dixon | |
# [email protected] | |
# internetimagery.com | |
# Usage |
This file contains hidden or 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 cmds | |
import collections | |
import cPickle | |
class FileInfo(collections.MutableMapping): | |
""" | |
Dictionary style interface for fileInfo | |
""" | |
def _encode(s, txt): |
This file contains hidden or 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
#References: | |
#http://forums.autodesk.com/t5/installation-licensing/installing-maya-on-ubuntu/td-p/4905036 | |
#http://askubuntu.com/questions/392806/installing-maya-on-ubuntu-linux | |
#https://gist.github.com/insomniacUNDERSCORElemon/5555214 | |
#http://nealbuerger.com/2013/05/ubuntu-13-04-maya-2014-install-script/ | |
#http://www.nkoubi.com/blog/tutorial/how-to-install-autodesk-maya-2011-on-debian-ubuntu/ | |
#http://help.autodesk.com/view/MAYAUL/2015/ENU/?guid=GUID-E7E054E1-0E32-4B3C-88F9-BF820EB45BE5 | |
#http://www.andrewhazelden.com/blog/2014/10/autodesk-nlm-licensing-issues-with-maya-2015-and-max-2015/ |
This file contains hidden or 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
# Stick the following in the bottom of your __init__.py, then simply import the base package. Use submodules as you need them and they'll be imported as you go. | |
import sys as _sys | |
class Package(object): | |
def __init__(s, local): | |
import os.path | |
s.cache = {} | |
s.local = dict((k, local[k]) for k in local) | |
s.root = os.path.realpath(os.path.dirname(s.local["__file__"])) | |
def __getattr__(s, k): | |
if k in s.local: return s.local[k] |
This file contains hidden or 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 collections | |
class Dict(collections.MutableMapping): | |
def __init__(s, *args, **kwargs): | |
s.fwd = dict(*args, **kwargs) | |
s.rev = dict((v, k) for k, v in s.fwd.items()) | |
def __delitem__(s, k): | |
if k in s.fwd: return s.rev.pop(s.fwd.pop(k)) | |
if k in s.rev: return s.fwd.pop(s.rev.pop(k)) | |
raise KeyError, "%s not found." % k | |
def __getitem__(s, k): |
This file contains hidden or 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 sys | |
import traceback | |
try: | |
raise something | |
except: | |
traceback.print_exception(*sys.exc_info()) |
This file contains hidden or 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 os | |
import os.path | |
class Temp_Path(str): | |
def __del__(s): | |
if os.path.isfile(s): os.remove(s) | |
def __getattribute__(s, k): | |
if k[0] == "_": return str.__getattribute__(s, k) | |
raise AttributeError, "\"%s\" cannot be modified with \"%s\"" % (s.__class__.__name__, k) |
This file contains hidden or 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 time | |
import threading | |
import maya.cmds as cmds | |
import maya.utils as utils | |
class Animation(object): | |
def __init__(s, frames): | |
s.frames = frames | |
s.img = cmds.iconTextStaticLabel(style="iconOnly") | |
s.frame = 0 |
OlderNewer