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
using System.Collections; | |
using UnityEngine; | |
using Substance.Game; | |
public class ChangeSubstanceParam : MonoBehaviour | |
{ | |
public SubstanceGraph targetSubGraph; | |
public string inputColorName; | |
public Color color1 = new Color(0.2f, 0.8f, 0.1f, 1.0f); | |
public Color color2 = new Color(0.6f, 0.3f, 0.9f, 1.0f); |
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 maya.cmds as mc | |
import maya.mel as mel | |
import maya.OpenMaya as om | |
import maya.api.OpenMaya as om2 | |
maya_useNewAPI = True | |
beforeImport_ID = None |
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.api.OpenMaya as om2 | |
mod = om2.MDGModifier() | |
mod.commandToExecute("polySphere -r 1 -sx 20 -sy 20 -ax 0 1 0 -cuv 2 -ch 1;") | |
mod.doIt() |
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 -*- | |
""" | |
参考サイト | |
python - PyQt4 center window on active screen - Stack Overflow | |
https://stackoverflow.com/questions/20243637/pyqt4-center-window-on-active-screen | |
getting all QT/PySide Windows - Google グループ | |
https://groups.google.com/forum/#!topic/python_inside_maya/q245Vh6W7uI | |
""" |
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 maya.cmds as mc | |
import maya.mel as mel | |
# 33 のビュー変換で使用する名前の一覧クラス. 変更時に文字列指定するので事前にこのように用意しておくと楽そう | |
class ViewTransformName(): | |
ACES_RRT_v_0_7 = "ACES RRT v0.7" | |
ACES_RRT_v_1_0 = "ACES RRT v1.0" | |
Log = "Log" |
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.mel as mel | |
try: | |
xbmLangPaths = mel.eval("getenv XBMLANGPATH;") | |
except: | |
xbmLangPaths = '' | |
addPath = r";D:/Test/icons" | |
if not addPath in xbmLangPaths: | |
xbmLangPaths += addPath |
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
Shader "Multi Compile Shader Simple" | |
{ | |
Properties | |
{ | |
_TexAAA ("Tex AAA", 2D) = "white" {} | |
_TexBBB ("Tex BBB", 2D) = "white" {} | |
_TexCCC ("Tex CCC", 2D) = "white" {} | |
[KeywordEnum(None, AAA, BBB, CCC)] _Var_Test ("Variant Test", Float) = 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
Shader "Multi Compile Shader Complex" | |
{ | |
Properties | |
{ | |
_TexAAA ("Tex AAA", 2D) = "white" {} | |
_TexBBB ("Tex BBB", 2D) = "white" {} | |
_TexCCC ("Tex CCC", 2D) = "white" {} | |
[KeywordEnum(None, AAA, BBB, CCC)] _Var_Test ("Variant Test", Float) = 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
Shader "Multi Compile Shader Complex Toggle" | |
{ | |
Properties | |
{ | |
[Toggle(_VAR_TEST_AAA)] _Use_TexAAA ("Use Tex AAA", int) = 0 | |
_TexAAA ("Tex AAA", 2D) = "white" {} | |
[Toggle(_VAR_TEST_BBB)] _Use_TexBBB ("Use Tex BBB", int) = 0 | |
_TexBBB ("Tex BBB", 2D) = "white" {} | |
[Toggle(_VAR_TEST_CCC)] _Use_TexCCC ("Use Tex CCC", int) = 0 | |
_TexCCC ("Tex CCC", 2D) = "white" {} |
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
Shader "Multi Compile Shader Simple Toggle" | |
{ | |
Properties | |
{ | |
[Toggle(_VAR_TEST_AAA)] _Use_TexAAA ("Use Tex AAA", int) = 0 | |
_TexAAA ("Tex AAA", 2D) = "white" {} | |
[Toggle(_VAR_TEST_BBB)] _Use_TexBBB ("Use Tex BBB", int) = 0 | |
_TexBBB ("Tex BBB", 2D) = "white" {} | |
[Toggle(_VAR_TEST_CCC)] _Use_TexCCC ("Use Tex CCC", int) = 0 | |
_TexCCC ("Tex CCC", 2D) = "white" {} |