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 | |
sel = cmds.ls(sl=1, l=True) | |
for x in sel: | |
cmds.select(x, r=True) | |
try: | |
cmds.addAttr( shortName='radius', longName='radius', defaultValue=0) | |
except: | |
pass | |
cmds.select(sel, r=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
# move all selected network items to cursor position | |
# currently breaking when backdrop containers are selected along with their children nodes (double transform) | |
net_editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) | |
# get avg pos of selection | |
items = hou.selectedItems() | |
avg = hou.Vector2() | |
for i in items: |
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 subprocess | |
import os | |
import glob | |
import re | |
filesList = [] | |
for fileNode in pm.ls(typ='file'): |
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 | |
sourceMesh, skinnedMesh = pm.ls(sl=1, tr=1) | |
origShape = [x for x in skinnedMesh.listRelatives(s=1) if x not in skinnedMesh.listRelatives(s=1, ni=1)] | |
if len(origShape) == 0: | |
pm.displayError("found no orig shape for skinned mesh") | |
elif len(origShape) > 1: | |
pm.displayError("found more than one orig shape for skinned mesh") |
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
from Qt import QtWidgets, QtGui | |
import maya.OpenMayaUI as omui | |
# from maya.app.general.mayaMixin import MayaQWidgetDockableMixin | |
import maya.app.general.mayaMixin as mx | |
import shiboken2 | |
# class MyQWidget(mx.MayaQDockWidget, QtWidgets.QWidget): | |
class MyQWidget(mx.MayaQWidgetDockableMixin, QtWidgets.QWidget): | |
def __init__(self, parent=None): | |
super(MyQWidget, self).__init__(parent=parent) |
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
#!/bin/bash | |
_blue="\033[01;38;5;39m" | |
_green="\033[01;38;5;34m" | |
_orange="\033[0;38;5;208m" | |
_default="\033[0;00m" | |
echo | |
echo -e "$_blue<<< marvolo_maya installation >>>$_default" | |
echo |
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 mari | |
import PySide.QtGui as QtGui | |
class mariWidget(QtGui.QWidget): | |
def __init__(self): | |
super(mariWidget, self).__init__() |