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
proc wsToggle(){ | |
string $W,$W1,$W2; | |
$W1 = "Modeling - Standard"; | |
$W2 = "UV Editing"; | |
$W = `workspaceLayoutManager -q -current`; | |
if ($W == $W1) workspaceLayoutManager -setCurrent $W2; | |
else workspaceLayoutManager -setCurrent $W1; | |
} | |
wsToggle; |
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 | |
""" | |
Re: https://groups.google.com/d/topic/python_inside_maya/ISwX-LOAcnc/discussion | |
""" | |
class ObjProcessor(object): | |
def __init__(self, filename): | |
self.filename = filename |
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
//mel | |
// Extrude & Duplicate ala XSI | |
global proc xsiDuplicate(){ | |
string $sel[] = `ls -sl`; | |
string $filterPoly[] = `filterExpand -sm 34 $sel`; | |
string $filterEdges[] = `filterExpand -sm 32 $sel`; | |
string $filterPoints[] = `filterExpand -sm 31 $sel`; | |
// Points : |
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
// Toggle wireframe | |
global proc NS_toggleWF() | |
{ | |
string $currentPanel = `getPanel -withFocus`; | |
if ("" != $currentPanel && ("modelPanel" == `getPanel -to $currentPanel`)) | |
{ | |
string $myToggle = `modelEditor -q -displayAppearance $currentPanel`; |
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
//toggles double sided faces on/off. | |
string $selected[] = `ls -sl -dag -type mesh`; | |
if (`size $selected` != 0) | |
{ | |
string $obj; | |
for ($obj in $selected) | |
{ | |
if (`getAttr ($obj+".doubleSided")` == 1) | |
{ |
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 pymel.core import * | |
sel = selected()[0] | |
cam = PyNode( 'persp1' ) | |
parent( sel, cam, a=1 ) | |
bbcoord = xform( sel, q=1, os=1, bb=1 ) | |
near = -bbcoord[5] | |
far = -bbcoord[2] |
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
C:\ProgramData\Autodesk\ApplicationPlugins\MayaBonusTools-2014-2017 |
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
# -*- coding: utf-8 -*- | |
import re | |
# constant | |
TRUE_KEYWORDS = ["true", "on", "yes"] | |
FALSE_KEYWORDS = ["false", "off", "no"] | |
MA_COMMAND = ["requires", | |
"fileInfo", | |
"currentUnit", | |
"createNode", |
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 dropbox | |
import sys | |
from os import walk | |
currPath = sys.argv[0] | |
file = open('C:\Dropbox\Projects\links.txt', 'w+') | |
try: | |
files = [] | |
dpath = None | |
for (dirpath, dirnames, filenames) in walk(sys.argv[1]): | |
files.extend( filenames ) |
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
def widgets_at( pos ): | |
"""Return ALL widgets at `pos` | |
Arguments: | |
pos (QPoint): Position at which to get widgets | |
""" | |
widgets = [] | |
widget_at = qApp.widgetAt( pos ) |
NewerOlder