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
global proc points2Polys() | |
{ | |
string $instancer; | |
string $sel[] = `ls -sl`; | |
if ($sel[0] == "" || `nodeType $sel[0]` != "instancer") | |
error "select instancer"; | |
$instancer = $sel[0]; | |
// PARTICLES VARIBLES | |
string $particleObjects[] = `listConnections ($instancer + ".inputPoints")`; |
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 -*- | |
# for maya2015 | |
from PySide import QtGui, QtCore | |
from maya import OpenMayaUI as omUI | |
from shiboken import wrapInstance | |
from PySide.QtUiTools import QUiLoader | |
from maya.app.general.mayaMixin import MayaQWidgetBaseMixin | |
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 sys | |
import maya.OpenMayaMPx as omMPx | |
import maya.OpenMaya as om | |
kPluginCmdName = 'printPaths' | |
class printPathsCmd(omMPx.MPxCommand): |
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(): |
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
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
# 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
#!/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
# -*- 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
# -*- 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 |