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
| from functools import wraps | |
| from maya import cmds | |
| def undo(func): | |
| """ Puts the wrapped `func` into a single Maya Undo action, then | |
| undoes it when the function enters the finally: block """ | |
| @wraps(func) | |
| def _undofunc(*args, **kwargs): | |
| try: | |
| # start an undo chunk |
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 json | |
| # Create the dictionary "data" with shadergroup as key | |
| data = {} | |
| shaders = cmds.ls(type='shadingEngine') | |
| for shader in shaders: | |
| data[shader] = [] | |
| # Append all shapes to each shadergroup-key |
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 cask, shutil, json | |
| def save_meta(path, meta): | |
| tmp = path+'.tmp' | |
| shutil.copy2(path, tmp) | |
| a = cask.Archive(tmp) | |
| #exists_prop = a.top.properties | |
| pr = cask.Property() | |
| pr.set_value(json.dumps(meta)) | |
| a.top.properties['jmeta'] = pr |
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 mayapy | |
| import itertools | |
| import math | |
| import random | |
| import timeit | |
| from maya import cmds, OpenMaya, OpenMayaAnim | |
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
| REM http://www.microsoft.com/en-us/download/details.aspx?id=40855 | |
| REM INSTALL: Windows6.1-KB2819745-x64-MultiPkg | |
| @ECHO off | |
| rem VARIABLES | |
| SET PYTHONINSTALL=C:\python27 | |
| SET LOCALFILE=c:\python-2.7.6.amd64.msi | |
| SET PYTHONURL=http://www.python.org/ftp/python/2.7.6/python-2.7.6.amd64.msi | |
| REM My installation python script | |
| SET PWINSTALLER=http://paulwinex.ru/files/pipeline/pwpipeline_install.py | |
| SET PWINSTALLERLOCAL=c:\pwpipeline_install.py |
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
| # Create shortcut on desktop for windows | |
| #................................... | |
| def createShortCut(self, data): | |
| executable = join(os.getenv('PIPELINE_LOCATION'), 'start_app.cmd') | |
| if not os.path.exists(executable): | |
| self.trayMessage('Launcher not found') | |
| return | |
| data['launcher'] = executable.replace('/','\\') | |
| data['wd'] = os.getenv('PIPELINE_LOCATION') | |
| ico = icons[data['name']] if data['name'] in icons else icons['default'] |
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, hou | |
| # version 1. Static class | |
| class SessionCallback(object): | |
| last_time = time.time() | |
| interval = 10 # sec | |
| @classmethod |
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
| ''' | |
| Template class for docking a Qt widget to maya 2017+. | |
| Author: Lior ben horin | |
| 12-1-2017 | |
| ''' | |
| import weakref | |
| import maya.cmds as cmds | |
| import maya.OpenMayaUI as omui |
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
| from pymel.core import * | |
| # original setup | |
| SCENE.defaultRenderGlobals.imageFilePrefix.set('/render_output/frame_<RenderLayer>') | |
| SCENE.defaultRenderGlobals.animation.set(1) | |
| SCENE.defaultRenderGlobals.outFormatControl.set(2) | |
| SCENE.defaultRenderGlobals.putFrameBeforeExt.set(1) | |
| SCENE.defaultRenderGlobals.extensionPadding.set(3) | |
| # get path and add format expression |