Skip to content

Instantly share code, notes, and snippets.

@FryPotato893
FryPotato893 / getPointAtUV.py
Last active August 21, 2020 02:21
【Maya Python API2.0】 選択したDAGノードのUV値からワールド位置情報を取得。
#-*- coding:utf-8 -*-
import maya.cmds as cmds
import maya.api.OpenMaya as om
def getPointAtUV(U,V):
u"""
概要:
選択したDAGノードのUV値からワールド位置情報を取得
: getPointAtUV(0.5,0.5)
@yamahigashi
yamahigashi / sticky_toggle_xformNoSelect.py
Last active March 30, 2016 11:56
for maya's hotkey runtime command, define commands key press begin, key press and key release within one command.
'''
# ショートカットキーを押した時、押している間、離した時に何かをするスクリプト
# このスクリプト起動時のキー押下状態保存してそのキーの持続状態を判定している
#
#  持続時間中に何かをするのでないのであれば、このようなスクリプトを使用するの
#  でなく素直に2つコマンド用意し同じキーに on press / on release としてそれぞれ
#  のコマンドを割り当てるほうが良い
#
#  winapi 使用するので win 専用
#
@yamahigashi
yamahigashi / my_motionbuilder_util.py
Created December 24, 2014 05:36
motinbuilder python utility
# -*- coding: utf-8 -*-
# MotionBulider 用のユーティリティ関数集
###############################################################################
import pyfbsdk as fb
#import pyfbsdk_additions as fb_add
###############################################################################
fbsys = fb.FBSystem()
app = fb.FBApplication()
@mojaie
mojaie / gist:6257249
Last active August 7, 2022 09:22
Example of PySide QTableWidget
# coding: UTF-8
import sys
from PySide import QtGui, QtCore
u""" サンプルデータ """
title = ["hoge", "fuga", "piyo"]
data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
@petfactory
petfactory / MayaPySideTablayout.py
Created April 17, 2013 12:33
Testing out PySide in Maya 2014. Creating a simple Tab layout with some buttons. Not sure if this is the "proper" way to do it. Copied some stuff from a Nuke PySide test I did a while back. Seems to work though. Feedback are of course welcome.
from PySide import QtCore, QtGui
from shiboken import wrapInstance
import maya.OpenMayaUI as apiUI
import sys
def getMayaWindow():
"""
Get the main Maya window as a QtGui.QMainWindow instance
@return: QtGui.QMainWindow instance of the top level Maya windows
"""
@nobonobo
nobonobo / recognizer.py
Last active March 10, 2017 17:55
[Google音声認識サンプル] 依存:numpy、PyAudio==0.2.7、flac-1ツール(http://flac.sourceforge.net/download.html
#/usr/bin/env python
# encoding: utf-8
import os
import sys
import atexit
import json
import time
import tempfile
import wave