Skip to content

Instantly share code, notes, and snippets.

View yamahigashi's full-sized avatar

Takayoshi Matsumoto yamahigashi

View GitHub Profile
@yamahigashi
yamahigashi / change_current_active_handle_axis.mel
Created March 17, 2016 10:24
change (or toggle view space) current active handle for Autodesk Maya
proc change_current_active_handle( int $axis ){
string $cmd = "";
string $tool = "";
string $current_ctxt = `currentCtx`;
switch( $current_ctxt ){
case "moveSuperContext":
case "manipMoveContext":
@yamahigashi
yamahigashi / MTypeId.tsv
Last active September 18, 2019 02:49
maya MTypeId listing (incomplete)
typeId typeName classification attributeCount
0x345dad01 substance texture/2d 38L
0x346dad01 substanceOutput drawdb/shader/texture/2d/substanceOutput:texture/2d 36L
0x41424141 animBlendNodeAdditiveDA animation 12L
0x41424146 animBlendNodeAdditiveF animation 12L
0x41424149 animBlendNodeAdditiveI32 animation 12L
0x4142414c animBlendNodeAdditiveDL animation 12L
0x41424153 animBlendNodeAdditiveI16 animation 12L
0x4142424f animBlendNodeBoolean animation 11L
0x41424641 animBlendNodeAdditiveFA animation 12L
@yamahigashi
yamahigashi / pyapi2_bulk_parentConstraint.py
Created February 1, 2016 11:10
maya python api 2.0 exploration, banned PyMel / maya.cmds
# -*- coding: utf-8 -*-
import re
import anyconfig
from maya.api import OpenMaya as OpenMaya2
##############################################################################
@yamahigashi
yamahigashi / redmine_view_custom_dashboard-overlay_issues_manager.js
Last active January 27, 2016 09:58
// Redmine View Customize script // enable on Dashboard Ticket Edit with overlay edit, like trello
// Redmine Dashboard のチケット編集をページ遷移なしに
//
// https://github.com/Gera-IT/Redmine-Fast-Issues-Edit.git
// redmine_overlay_issues_manager
//
// Path pattern: /rdb/taskboard.*
// Type: JavaScript
$(function() {
var overlayTicketEdit = function() {
// Easy Gantt のメニュー部をスクロースすると固定ヘッダ化
//
// Path pattern: /easy_gantt/.*
// Type: JavaScript
$(function() {
var gantt_menu = $( '#easy_gantt_menu' );
var offset = gantt_menu.offset();
var originalPos = gantt_menu.css( 'position' );
945c945,946
#get inf bone list
- #fullJointList = pm.skinPercent(meshSkinCluster,query=True, transform=None)
+ fullJointList = pm.skinCluster(meshSkinCluster, query=True, inf=True)
if len(vertexList) > lagLimit:
@yamahigashi
yamahigashi / test_output_ports_quantity_impact_softimage.py
Last active August 26, 2015 09:10
performance test that massive output ports quantity causes large FPS degradation, when the operator has animating input(s) in SpliceSoftimage. #FabricEngine
###############################################################################
NUM_OUTPUTS = 333
NUM_INPUTS = 1
# this is the test code, softimage
# no good
# NUM_OUTPUT: 333 FPS: 9
# NUM_OUTPUT: 128 FPS: 22
@yamahigashi
yamahigashi / execute_script.js
Last active August 29, 2015 14:25
Application.ExecuteScript を使ってのスクリプトファイルの実行 #Softimage
function select_execute(){
var title = "実行ファイルを選択する";
var initialDirectory = "";
var fileFilter = "py|js|vbs";
var filter = "Script Files(*.py;*.js;*.vbs)|*.py;*.js;*.vbs|All Files (*.*)|*.*||";
fileBrowser = XSIUIToolkit.FileBrowser;
fileBrowser.DialogTitle = title;
fileBrowser.InitialDirectory = initialDirectory;
@yamahigashi
yamahigashi / Simplex.kl
Last active November 5, 2015 10:27
simplex noise generator for FabricEngine kl
/*
* http://stackoverflow.com/questions/18279456/any-simplex-noise-tutorials-or-resources
*/
/*
* A speed-improved simplex noise algorithm for 2D, 3D and 4D in kl.
*
* Based on example code by Stefan Gustavson ([email protected]).
* Optimisations by Peter Eastman ([email protected]).
* Better rank ordering method by Stefan Gustavson in 2012.
@yamahigashi
yamahigashi / check_maximum_influence.py
Created June 30, 2015 09:17
check max influence and select these vertex. for Maya
import maya.cmds as cmds
import maya.mel as mel
DEFAULT_MAXIMUM_INFULENCE = 5
##############################################################################
#1頂点に影響するジョイントの上限チェックする
##############################################################################
def check_maximum_influence(max=DEFAULT_MAXIMUM_INFULENCE):
res = []