Skip to content

Instantly share code, notes, and snippets.

View yamahigashi's full-sized avatar

yamahigashi

View GitHub Profile
@whaison
whaison / ModelAnimationSplitterWithAnimeControllerTrigger.cs
Created May 4, 2016 01:33
ModelAnimationSplitterWithAnimeControllerTrigger.cs
using UnityEngine;
using UnityEngine.UI;
using UnityEditor;
using UnityEditor.Animations;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using System.Linq;
using System;
@whaison
whaison / FixMask.cs
Created May 4, 2016 01:18
FixMask.cs (Unity5.3.4p3)
//saves you from agonizing manual clicking "Fix Mask" on each user-created clip,
//when you have updated/edited the original FBX changing the skeleton hierarchy
//drop this in your Scripts/Editor folder,
//select FBX's and right click context menu Fix Animation Masks
//reImporot Foloder
//tested on Unity 5.3.4p3
//minor update, sets all transforms of the avatarMask to active (assuming you are just using 'Mask Definition Create From This Model' with all transforms active (Default behavior)
@ericfrederich
ericfrederich / async_slot.py
Created March 10, 2016 05:13
Example of using an asyncio coroutine as a Qt slot
import math
import sys
import asyncio
from functools import partial
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QGridLayout, QProgressBar
from quamash import QEventLoop
class MyWidget(QWidget):
@MirageYM
MirageYM / spPaint3d patch
Last active March 8, 2016 01:07
spPaint3d patch
spPaint3d mod
constraint Y(Y軸コンストレイント) SHIFT + mouse drag
constraint X(X軸コンストレイント) CTRL + mouse drag
spPaint3dContext.py
***** ORIGINAL オリジナル
306:
307: pressPosition = mc.draggerContext(spPaint3dContextID, query=True, anchorPoint=True);
using System;
using System.Collections;
using System.Reflection;
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
class SpaceSphere
{
static SpaceSphere()
###------------------------------------------------------------
#
# Tool Name: Cache Dependency
#
# Copyright: Takanori Kishikawa
# Created: 2015.09.06
# Update: 2015.09.16
# Lisence: BSD 3-Clause
# http://opensource.org/licenses/BSD-3-Clause
#
from maya import OpenMaya
from pymel.core import *
def mdagpath_from_name(name, extend_to_shape=False):
if not objExists(name):
raise MayaNodeError, name
slist = OpenMaya.MSelectionList()
slist.add(name)
dagpath = OpenMaya.MDagPath()
slist.getDagPath(0, dagpath)
@yasaichi
yasaichi / x_means.py
Last active May 1, 2025 11:26
Implementation of X-means clustering in Python
"""
以下の論文で提案された改良x-means法の実装
クラスター数を自動決定するk-meansアルゴリズムの拡張について
http://www.rd.dnc.ac.jp/~tunenori/doc/xmeans_euc.pdf
"""
import numpy as np
from scipy import stats
from sklearn.cluster import KMeans
@keijiro
keijiro / 00_AnimationProcessor.md
Last active September 25, 2022 03:47
[Unity] アニメーションのインポート設定を自動化する

アニメーションのインポート設定を自動化する

Unity のアニメーションのインポート設定(下画像)には様々な項目がありますが、これを手動でひとつひとつ設定していくのは、かなりしんどいです。お決まりの設定がある場合には、スクリプトで自動化してしまうのがよいでしょう。この文書では、その自動化の方法を紹介します。

Animation Clip Settings

スクリプトからオプションを変更する

これらのインポート設定は ModelImporter.clipAnimationsModelImporterClipAnimation の配列として格納されています。これを舐める形で変更していけば、一括でお好みの設定を適用できます。

# rcov generated
coverage
coverage.data
# rdoc generated
rdoc
# yard generated
#doc