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
Show hidden characters
{ | |
"path": "C:/Autodesk/Maya2017-x64/bin/mayapy.exe", | |
"cmd": ["C:/Autodesk/Maya2017-x64/bin/mayapy.exe", "$file"], | |
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
"selector": "source.python" | |
} |
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
## Grab selected | |
sel_obj = cmds.ls(sl=1)[0] | |
## Get namespace | |
namespace = sel_obj.split(':')[0].split('_def')[0] | |
## Check if main comp exists | |
if 'main_comp' not in cmds.timeEditorComposition(q=True, allCompositions=True): | |
## Create composition |
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 maya.api import OpenMaya | |
from maya import cmds | |
def getDistance(x1, y1, z1, x2, y2, z2): | |
sq1 = (x1-x2)*(x1-x2) | |
sq2 = (y1-y2)*(y1-y2) | |
sq3 = (z1-z2)*(z1-z2) | |
return math.sqrt(sq1 + sq2 + sq3) | |
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
# Origin http://forums.cgsociety.org/archive/index.php?t-904223.html | |
import maya.OpenMaya as api | |
import maya.cmds as cmds | |
def findNearby(point, tolerance): | |
'''findNearby | |
point - Either an MPoint, a tuple (x, y, z), or an object name (Uses that objects pivot) | |
tolerance - The search radius for finding nearby selection | |
''' |
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 threading | |
def work(arg, qlock): | |
''' | |
Create user file | |
''' | |
qlock.acquire() | |
print arg | |
qlock.release() |
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 sys | |
import shiboken | |
from PySide import QtCore, QtGui | |
import maya.cmds as mc | |
class TestUI(QtGui.QDialog): | |
def __init__(self, *args, **kws): | |
parent = kws.get('parent', None) |
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
/*! | |
* Bootstrap v3.3.5 (http://getbootstrap.com) | |
* Copyright 2011-2015 Twitter, Inc. | |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
*//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-si |
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
for x in globals(): print x | |
string | |
cmd | |
contextmanager | |
_LoadPublishedEntityInformationIndividualChar | |
stereoCameraInitStereo | |
MayaDependNode | |
mel | |
MC | |
MM |
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
''' | |
Command port | |
http://forums.cgsociety.org/archive/index.php?t-966699.html | |
Creative Crash | |
''' | |
import socket | |
#HOST = '192.168.1.122' # The remote host | |
HOST = '127.0.0.1' # the local host | |
PORT = 54321 # The same port as used by the server | |
ADDR=(HOST,PORT) |