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
src_list=[] | |
src = "pCube1" | |
trg = "pSphere1" | |
for vtx in cmds.ls("{}.vtx[*]".format(src), fl=True): | |
cmds.select(vtx) | |
cmds.polySelectConstraint(pp=1,t=0x0001) | |
src_list.append([int(re.findall("\[(\d+)\]", index)[0]) for index in cmds.ls(sl=True, fl=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
from PySide2.QtGui import QDesktopServices | |
from PySide2.QtCore import QUrl | |
QDesktopServices.openUrl(QUrl.fromLocalFile(r"C:\WINDOWS\win.ini")) |
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 PySide2.QtCore import Signal, QTextStream, Qt | |
from PySide2.QtWidgets import QApplication | |
from PySide2.QtNetwork import QLocalSocket, QLocalServer | |
from win32gui import SetWindowPos | |
import win32con | |
# https://stackoverflow.com/questions/12712360/qtsingleapplication-for-pyside-or-pyqt | |
# https://stackoverflow.com/questions/12118939/how-to-make-a-pyqt4-window-jump-to-the-front | |
class QSingleApplication(QApplication): |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 glob | |
import random | |
import shutil | |
def randomSplashScreen(): | |
_tgtDir = "%s/prefs/icons" % os.environ.get("MAYA_APP_DIR") | |
_srcDir = "%s/startupImages" % _tgtDir | |
if not os.path.exists(_srcDir): |
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
set XBMLANGPATH=%~dp0 | |
"C:/Program Files/Autodesk/Maya2018/bin/maya.exe" |
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 | |
def split_path(path): | |
_dir, _file = os.path.split(path) | |
_name, _ext = os.path.splitext(_file) | |
return _dir.replace(os.sep,"/"), _name, _ext | |
split_path("C:/Program Files/Autodesk/Maya2018/bin/maya.exe") | |
# Result: ('C:/Program Files/Autodesk/Maya2018/bin', 'maya', '.exe') # |
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
cmds.ls(sl=False,selection=True) | |
#sl selection どちらかが True だったらフラグがオンになる | |
#anyを使用している? | |
#any([False,True]) | |
cmds.ls(typ="mesh",type=["transform","camera"]) | |
#typ type どちらも処理される。 | |
#文字列,リストの両方が使える。 | |
#文字列を一旦リストに格納してから処理を行っているのだと思う。 |
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
# !python2.7 | |
# -*- coding: utf-8 -*- | |
# ------------------------------------------------------------------------------ | |
from __future__ import absolute_import, division, generators, print_function, unicode_literals | |
from future_builtins import * | |
# ------------------------------------------------------------------------------ | |
import maya.cmds as cmds | |
# ------------------------------------------------------------------------------ | |
def multiArgFunc(**kwargs): |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics] | |
"BorderWidth"="-15" | |
"CaptionHeight"="-270" | |
"CaptionWidth"="-270" | |
"MenuHeight"="-270" | |
"MenuWidth"="-270" | |
"ScrollHeight"="-240" | |
"ScrollWidth"="-240" |
NewerOlder