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
{ | |
"class": "Node", | |
"id": "@0x10B9961D0", | |
"name": "___root___", | |
"parent": "None", | |
"nodetype": "None", | |
"children": [ | |
{ | |
"class": "Node", | |
"id": "@0x10B9800D0", |
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 pymel.core as pm | |
def selectEmptyHairs(): | |
hairs = pm.ls(type='hairSystem') | |
if len(hairs) is 0: | |
pfxs = pm.ls(type='pfxHair') |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import re | |
import sys | |
def read_first_line(filename, filepath): | |
filepath = os.path.join(filepath, filename) | |
try: |
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 pymel.core as pm | |
import pymel.core.datatypes as dt | |
import threading | |
import multiprocessing | |
def isMesh(trans): | |
if type(trans.getShape()) == pm.nodetypes.Mesh: | |
return True |
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.OpenMaya as om | |
import pymel.core as pm | |
def is_mesh(trans): | |
if type(trans.getShape()) == pm.nodetypes.Mesh: | |
return True | |
return False |
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
#!/usr/bin/env python | |
import os | |
import re | |
import sys | |
tabs = re.compile(r'^(\t+)') | |
spaces = ' ' | |
def doit(filepath): |
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
# Install pip | |
# $ curl -kL https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python | |
# | |
# Install Cython | |
# $ pip install cython | |
# | |
# compile command | |
python setup.py build_ext --inplace |
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 UnityEngine; | |
using UnityEditor; | |
using System.Collections.Generic; | |
using System.Linq; | |
/// <summary> | |
/// 「Window/SerializedObject Editor」で起動。 | |
/// 選択中のObjectと関連ObjectからSerializedObjectを作ってPropertyを全て表示する。 | |
/// </summary> | |
public class SerializedObjectEditor : EditorWindow |
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
def report(func): | |
def _report(*args, **kw): | |
# get time now | |
result = func(args, kw) | |
# get time now | |
# report to db or something. | |
return result | |
return _return |
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.OpenMaya as om | |
def traverse_all(): | |
dag_iter = om.MItDag( om.MItDag.kDepthFirst, om.MFn.kInvalid) | |
dag_node_fn = om.MFnDagNode() | |
while not dag_iter.isDone(): |