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
def test(): | |
print "hello world!!" |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
## -*- coding: utf-8 -*- | |
## -*- coding: utf-8 -*- | |
import pymel.core as pm | |
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
# -*- coding: utf-8 -*- | |
import maya.OpenMaya as om | |
import maya.OpenMayaMPx as omPx | |
kPluginNodeTypeName = "getCompoundAttr" | |
kPluginNodeId = om.MTypeId(0x87007) | |
class getCompoundAttr(omPx.MPxNode): | |
#アトリビュートオブジェクト |
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
#選択しているノードの子供のうち、指定のタイプのノード(SampleはConstraint)を削除する | |
import pymel.core as pm | |
select = pm.ls(sl=True,fl=True) | |
deleteType = "constraint" | |
for node in select: | |
delNode = node.listRelatives(c=True,ad=True,type=deleteType) | |
pm.delete(delNode) |
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
select -r "curve1.cv[*]"; |
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 pymel.core as pm | |
pm.openFile(filePath, prompt=False) |
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
## -*- coding: utf-8 -*- | |
import json | |
#Dic型を作成する | |
jsonData = {'python':"test"} | |
enc = json.dumps(jsonData) | |
print enc | |
#Result : {"python": "test"} | |
dec = json.loads(enc) | |
print dec |
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
setDrivenKeyframe -itt "linear" -ott "linear" -dv 15 -v $value -cd ($driver + ".rotateY") ($driven + ".translateZ"); |
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.path | |
import json | |
#自分用File読み書きモジュール | |
import fileIO | |
import pymel.core as pm | |
import maya.mel as mm | |
#選択したノードのAddTtterされたアトリビュートをExport | |
def exportUserDefinedAttribute(exportPath): |
OlderNewer