Skip to content

Instantly share code, notes, and snippets.

View atvKumar's full-sized avatar

Kumaran atvKumar

View GitHub Profile
@atvKumar
atvKumar / mkSave.py
Last active August 29, 2015 14:16
Increment and Save in Maya
import maya.cmds as cmds
from os.path import join as joinpath, split as splitpath
class FileNotExist(IOError):
pass
def hasNumbers(inputString):
return any(char.isdigit() for char in inputString)
@atvKumar
atvKumar / mkDevTools.py
Last active January 14, 2023 04:06
Python Module Reloading and ReCompiling for Maya
from os import path
import compileall
import sys, types
def recompile(modulename):
"""Recompile the given module, its directory's contents!"""
myScriptPath = sys.modules[modulename.__name__].__path__[0]
if path.isdir(myScriptPath):
compileall.compile_dir(myScriptPath, force=True)
@atvKumar
atvKumar / mkRenderQueue.jsx
Created May 5, 2015 09:56
After Effects Script to create folders and render Compositions.
// Copyright: Kumaran
function getSelectedComps(){
var allItems = app.project.items;
selectedComps = new Array();
for (var i = allItems.length; i >= 1; i--) {
eachItem = allItems[i];
if ((eachItem instanceof CompItem) && eachItem.selected) {
selectedComps[selectedComps.length] = eachItem;
//$.writeln(eachItem.name);
@atvKumar
atvKumar / mkWindow.py
Created July 27, 2015 11:42
Boiler Plate Code for Windows GUI under PyMel/Python/Maya
#-------------------------------------------------------------------------------
# Boiler Plate Code for Windows
# By : Kumaran
import pymel.core as pm
class UI(pm.uitypes.Window):
_TITLE = "mkWindow"
_LAYOUT = "mkLayout"
_DOCKCONTROL = "mkDockCtrl"
@atvKumar
atvKumar / mkWindow.py
Created July 27, 2015 11:47
Auto-updating GUI
#-------------------------------------------------------------------------------
# Boiler Plate Code for Windows
# By : Kumaran
import pymel.core as pm
class UI(pm.uitypes.Window):
_TITLE = "mkWindow"
_LAYOUT = "mkLayout"
_DOCKCONTROL = "mkDockCtrl"