Skip to content

Instantly share code, notes, and snippets.

@yamadaaaaaaa
yamadaaaaaaa / ymd_launcher.py
Last active October 27, 2021 05:36
ymd_launcher.py
# -*- coding: utf-8 -*-
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# ymd_launcher.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
@yamadaaaaaaa
yamadaaaaaaa / set_ignoreCSrule_on.py
Created July 14, 2021 02:12
set_ignoreCSrule_on.py
# Python
import maya.cmds as cmds
def set_ignoreCSrule_on():
list_fileNodes = cmds.ls(type='file')
for str_file in list_fileNodes:
cmds.setAttr(str_file + '.ignoreColorSpaceFileRules',1)
set_ignoreCSrule_on()
@yamadaaaaaaa
yamadaaaaaaa / maya_escapeMalware.py
Created June 25, 2020 08:59
maya_escapeMalware.py
import stat
import os
import re
import ctypes
from ctypes.wintypes import MAX_PATH
def maya_escapeMalware():
# set read only animImportExport.pres.mel
adkPath = r'C:\Program Files\Autodesk'
if not os.path.exists(adkPath):return
@yamadaaaaaaa
yamadaaaaaaa / test_lambda.py
Created August 23, 2019 09:06
test_lambda.py
# -*- coding: utf-8 -*-
from PySide import QtCore, QtGui
import sys
import functools
ui = ""
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(820, 219)
self.centralwidget = QtGui.QWidget(MainWindow)
@yamadaaaaaaa
yamadaaaaaaa / textCreate.jsx
Last active January 7, 2019 04:38
textCreate.jsx
var myText = "After Effects noui";
var myFile = new File("D:/text.txt");
myFile.open("w");
myFile.write(myText);
myFile.close();
# -*- coding: utf-8 -*-
import shotgun_api3
sg = shotgun_api3.Shotgun('https://test.shotgunstudio.com', script_name='test_tool', api_key='0a1b2c3d4e5f9g7h8i9j')
result = sg.find('HumanUser',[['sg_status_list', 'is', 'act']],['login', 'name'])
print(result)
sg.close()
# -*- coding: utf-8 -*-
import shotgun_api3
sg = shotgun_api3.Shotgun('https://test.shotgunstudio.com', script_name='test_tool', api_key='0a1b2c3d4e5f9g7h8i9j')
result = sg.find('Tag',[],['name'])
print(result)
sg.close()
# -*- coding: utf-8 -*-
import shotgun_api3
sg = shotgun_api3.Shotgun('https://test.shotgunstudio.com', script_name='test_tool', api_key='0a1b2c3d4e5f9g7h8i9j')
# 先ず指定プロジェクトを取得
project = sg.find_one('Project', [['name', 'is', "testProject"]]) # プロジェクト名:例ではtestProject
# project = {'type': 'Project', 'id': 000}
# Assetエンティティの各アイテムIDリストを取得
result = sg.find("Asset", [['project', 'is', project]])
# -*- coding: utf-8 -*-
import shotgun_api3
sg = shotgun_api3.Shotgun('https://test.shotgunstudio.com', script_name='test_tool', api_key='0a1b2c3d4e5f9g7h8i9j')
result = sg.schema_field_read('Asset','code')
print(result)
sg.close()
# result
@yamadaaaaaaa
yamadaaaaaaa / SG_sample2.py
Last active June 8, 2018 00:25
SG_sample2
# -*- coding: utf-8 -*-
import shotgun_api3
sg = shotgun_api3.Shotgun('https://test.shotgunstudio.com', script_name='test_tool', api_key='0a1b2c3d4e5f9g7h8i9j')
result = sg.schema_field_read('Asset').keys()
print(result)
sg.close()
# result
# ['code','tasks',******]