While this started as a quick gist, I ended up developing it far enough to give it it's own repository and documentation.
Visit Shout's Repo!
from __future__ import print_function | |
from collections import namedtuple | |
from maya import cmds | |
import pymel.core as pmc | |
from maya.utils import executeDeferred | |
from functools import wraps | |
KeySequence = namedtuple('KeySequence', 'ctrl shift alt key full') |
import functools | |
import maya.cmds as cmds | |
import maya.mel as mel | |
connect_dynamic = functools.partial(cmds.connectDynamic, delete=False) | |
disconnect_dynamic = functools.partial(cmds.connectDynamic, delete=True) | |
def chunk(fn): |
While this started as a quick gist, I ended up developing it far enough to give it it's own repository and documentation.
Visit Shout's Repo!
@echo off | |
SET GIT_REPOS=\path\to\git_repos | |
SET REMOTE_ROOT=\\remote\deploy\location | |
SET LOCAL_ROOT=%USERPROFILE%\Documents\maya\2015-x64\scripts | |
if "%1"=="-h" ( GOTO :help_msg ) | |
if "%1"=="--help" ( GOTO :help_msg ) | |
if "%1"=="-l" ( GOTO :list_packs ) | |
if "%1"=="--list" ( GOTO :list_packs ) |
This gist was improved and incorporated in a set of shell scripts called cgutils.
Visit the repo!
This gist turned into a full python packge!
Visit the repo!
# -*- coding: utf-8 -*- | |
#! /usr/bin/env python | |
''' | |
Python Manager | |
============== | |
GUI tool for managing modules and packages based on reimport: Full featured reload for Python. | |
''' | |
import os |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
template formatters | |
=================== | |
``string.Formatter``s for converting standard pythong string templates to regex | |
and glob patterns. ``RegexFormatter`` formats to a regex pattern with named | |
groups perfect for use with ``re.search``. ``GlobFormatter`` formats to a glob | |
pattern that can be used with ``glob.glob``, ``fnmatch.fnmatch`` and | |
``fnmatch.filter``. ``format_regex`` and ``format_glob`` are instances of |
''' | |
toolshed | |
======== | |
Rigging tools for Autodesk Maya. | |
''' | |
from maya import cmds, OpenMaya | |
import maya.api.OpenMaya as mapi | |
import traceback |
import time | |
import sys | |
from contextlib import contextmanager | |
@contextmanager | |
def stopwatch(label, width=20): | |
''' | |
A context manager that prints out the execution time of the nested code. | |
''' |