https://github.com/satishgoda/learningqt/tree/master/pyside/pyside_basics/jamming/QListWidget
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
The gist of the story is.... |
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 | |
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. |
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 os | |
import pymel.core as pm | |
import sgtk | |
class BreakdownItemWarning(Warning): | |
pass | |
class BreakdownItemError(ValueError): | |
pass |
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
""" | |
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) |
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.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() |
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 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() |
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 cmds | |
def getAttributes(object): | |
attributes = cmds.listAttr(object) | |
for attribute in attributes: | |
try: | |
print attribute + ' = ' + str(cmds.getAttr(object + '.' + attribute)) | |
except: | |
pass |
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 | |
""" | |
Convert camel-case to snake-case in python. | |
e.g.: CamelCase -> snake_case | |
Relevant StackOverflow question: http://stackoverflow.com/a/1176023/293064 | |
""" |
OlderNewer