Skip to content

Instantly share code, notes, and snippets.

View SatishGodaPearl's full-sized avatar

Satish Goda SatishGodaPearl

View GitHub Profile
The gist of the story is....
@SatishGodaPearl
SatishGodaPearl / shelfBase.py
Created January 12, 2019 08:45 — forked from vshotarov/shelfBase.py
Maya base class for building custom shelves.
import maya.cmds as mc
def _null(*args):
pass
class _shelf():
'''A simple class to build shelves in maya. Since the build method is empty,
it should be extended by the derived class to build the necessary shelf elements.
@SatishGodaPearl
SatishGodaPearl / ShotBreakdown.py
Last active January 18, 2019 06:43
Previs Temp Scripts
import os
import pymel.core as pm
import sgtk
class BreakdownItemWarning(Warning):
pass
class BreakdownItemError(ValueError):
pass
@SatishGodaPearl
SatishGodaPearl / lunariaMod_mixer_gen.py
Created January 18, 2019 23:04
Modeling Temp Scripts
"""
This module provides functionality that enables an artist to choose a bunch of maya files for models, and then mix and match them to create variations.
"""
import pymel.core as pm
mix_model1 = pm.importFile("assets/lunariaMod_g03_27.v002.ma",
returnNewNodes=True)
@SatishGodaPearl
SatishGodaPearl / rendersetup.py
Created January 22, 2019 21:10
Lunaria Variant Workflow Prototypes
import maya.app.renderSetup.model.override as override
import maya.app.renderSetup.model.selector as selector
import maya.app.renderSetup.model.collection as collection
import maya.app.renderSetup.model.renderLayer as renderLayer
import maya.app.renderSetup.model.renderSetup as renderSetup
import maya.cmds as cmds
rs = renderSetup.instance()
defaultRenderLayer = rs.getDefaultRenderLayer()
@SatishGodaPearl
SatishGodaPearl / api.py
Created February 1, 2019 08:05
Maya Playblast
import pymel.core as pm
import sgtk
engine = sgtk.platform.current_engine()
pearlmaya = sgtk.platform.framework.load_framework(engine, engine.get_env(), 'tk-framework-pearl-maya_v0.x.x')
mayasession = pearlmaya.import_module('mayasession')
ctxWork = mayasession.MayaAssetWork()
@SatishGodaPearl
SatishGodaPearl / export_nodes_and_store_node_data.py
Created March 19, 2019 17:30 — forked from fredrikaverpil/export_nodes_and_store_node_data.py
Export and re-assign shaders, nodes and node data #maya
import maya.cmds as cmds
def getAttributes(object):
attributes = cmds.listAttr(object)
for attribute in attributes:
try:
print attribute + ' = ' + str(cmds.getAttr(object + '.' + attribute))
except:
pass
@SatishGodaPearl
SatishGodaPearl / camel_case_to_snake_case.py
Created June 26, 2019 21:28 — forked from jaytaylor/camel_case_to_snake_case.py
Convert camel-case to snake-case in python.
#!/usr/bin/env python
"""
Convert camel-case to snake-case in python.
e.g.: CamelCase -> snake_case
Relevant StackOverflow question: http://stackoverflow.com/a/1176023/293064
"""
@SatishGodaPearl
SatishGodaPearl / References.md
Last active August 13, 2019 00:15
Python Exception Handling