This file contains 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
/* | |
■ 機能 | |
・ボックスリグを追加する。 | |
・ボックスリグは2重構造になっており、制御するコントローラのトランスフォームは初期状態で移動回転Zeroとなる。 | |
・ボックスリグの位置・回転は、選択しているオブジェクトに合わせる。 | |
・複数選択で作成できる。 | |
・Pivotがズレている場合の対応はしていません。 | |
*/ | |
This file contains 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
/* | |
現在しているオブジェクトのアトリビュートエディタのコピーをちょっと楽にするスクリプト | |
*/ | |
// アトリビュートエディタ(AE)を表示 | |
ShowAttributeEditorOrChannelBox; | |
// AEをピーコ | |
copyAEWindow; |
This file contains 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
/* | |
最後に選択したオブジェクトに位置・回転合わせを行う | |
複数オブジェクト対応 | |
*/ | |
proc ObjectAligner(){ | |
ObjectAligner_GUI(); | |
} |
This file contains 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
/* | |
選択したキーの内、変化の無いキーだけを選択維持する | |
シーン内のアニメーションカーブを全選択 | |
select `ls -typ animCurve`; | |
size `ls -sl`; | |
*/ | |
proc SelectStaticKey_Exec(){ | |
This file contains 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
// スキニングされたメッシュ(transform)を選択して実行すると、バインドジョイントの選択セットを作成する | |
proc CreateJointSetFromBindSkin(){ | |
string $shape[] = `listRelatives -s`; // shape 取得 | |
string $skinC[] = `listConnections -type skinCluster $shape[0]`; // skinCluster 取得 | |
string $bindJnts[] = `listConnections -type joint $skinC[0]`; // joint 取得 | |
sets -n "Set_bindJnts" $bindJnts; // セット作成 | |
} | |
CreateJointSetFromBindSkin(); |
This file contains 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
/* | |
シーン内のアニメーションしているコントローラーなどをすべて選択します。 | |
*/ | |
// グローバル変数 | |
string $animatedTransforms[]; | |
proc SelectAnimatedTransformNode(){ | |
string $window = "SelectAnimatedTransformNode"; |
This file contains 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
/* | |
1番目にに選択したオブジェクトのシェイプノードを、 | |
2番目以降に選択したオブジェクトのシェイプノードに置き換える。 | |
■ 用途 | |
・リグの形状を途中で変更したいが、既存のトランスフォーム消したくない | |
・アニメーションを崩さずシェイプノードだけ差し替えたい | |
・現在のトランスフォームを保持したまま、モデルデータを差し替えたい | |
*/ |
This file contains 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; | |
public class CopyAbsolutePath : MonoBehaviour { | |
[MenuItem("Assets/絶対パスをクリップボードにコピー", false)] | |
static void Execute() | |
{ | |
// get select GO full path | |
int instanceID = Selection.activeInstanceID; |
This file contains 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
/* | |
再帰処理テンプレ | |
指定されたフォルダ以下のmltファイルをすべてリストします。 | |
mlt 部分を、 ma , mb に書き換えることで通常のMayaでも利用可 | |
*/ | |
proc RecursiveProcess(){ | |
string $window = "RecursiveProcess"; | |
if( window( "-exists" , $window ) ){ |
This file contains 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
/* | |
端末言語によって日本語・英語を切り替える | |
■ 使い方 | |
Image または Text コンポーネントが割あたっているゲームオブジェクトにD&Dして、 | |
日本語&英語 テキスト・画像 を割り当てればOKです。 | |
動的に変更されているテキストに関しては、別途処理が必要ですが、基本的にこのクラス内と同じ処理を行えばOKです。 | |
*/ |