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 | |
list_obj = [] | |
dic_obj = {} | |
list_objects = cmds.ls(dag=True, ni=True, sn=True) | |
for _object in list_objects: | |
if not '|' in _object:continue | |
_name = _object.split('|').pop() | |
if _name in dic_obj.keys(): | |
list_obj.extend([dic_obj[_name],_object]) | |
dic_obj.setdefault(_name,_object) |
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 os | |
import sys | |
import re | |
import OpenEXR | |
import datetime | |
import time | |
import subprocess | |
from PySide2 import QtCore, QtGui, QtWidgets | |
import Imath | |
_qapp = -1 |
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 os | |
import sys | |
import OpenEXR | |
# change path ############### | |
TARGET_PATH = 'D:/test' | |
############################# | |
def main(): | |
list_exr = list() |
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
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
from maya import cmds | |
from maya import mel | |
from functools import partial | |
sys.dont_write_bytecode = True # not create pyc | |
import importlib | |
import subprocess |
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 maya.mel as mel | |
# window open | |
mel.eval('filePathEditorWin;') | |
# window close | |
cmds.deleteUI('FilePathEditor') | |
cmds.filePathEditor(~~~) |
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
# python3.7.7 pyside2 | |
import sys | |
import os | |
import win32gui | |
import win32api | |
import win32con | |
from PySide2 import QtCore, QtGui, QtWidgets | |
# 起動中のツールUIを探す | |
def search_this_winEnumHandler( _hwnd, list_window ): |
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 maya.mel as mel | |
def link_test(*args): | |
print(1) | |
_gPlayBackSlider = mel.eval("string $_gPlayBackSlider = $gPlayBackSlider;") | |
cmds.timeControl(_gPlayBackSlider,e=True,releaseCommand=link_test) |
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 | |
if not cmds.pluginInfo('mtoa', query=1, loaded=1): | |
cmds.loadPlugin( 'mtoa' ) | |
cmds.pluginInfo('mtoa',edit=1,autoload=1) | |
from mtoa.core import createOptions | |
createOptions() | |
cmds.setAttr('defaultRenderGlobals.currentRenderer', 'arnold', type='string') | |
from maya.app.renderSetup.model import selector |
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
# -*- coding: utf-8 -*- | |
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | |
# ymd_launcher2.py | |
# VERSION : 1.0.0 | |
# AUTHOR : yamada = ymd | |
# DATE : 2021/8/1 | |
# DESCRIPTION : DCC Launcher for Windows. | |
# USAGE : ymd_launcher.mod copy to C:\Users\<user>\Documents\maya\<version>\modules | |
# Open ymd_launcher.mod and change the path to the location where you placed the ymd_launcher folder. | |
# just run this script in maya scriptEditor python tab |
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.app.renderSetup.model.renderSetup as renderSetup | |
import json | |
def import_rendersettings(path_file, option=renderSetup.DECODE_AND_MERGE): | |
with open(path_file, 'r') as file: | |
renderSetup.instance().decode({'renderSetup':{'renderLayers':json.load(file)}}, renderSetup.DECODE_AND_OVERWRITE, None) | |
# 下記パスを出したとこに変更すれば読めます | |
import_rendersettings(r'D:\test.json') |
NewerOlder