![VRM Tool Kit VRM Tool Kit](https://dl.dropbox.com/s/f1s3gpvjohlciji/VRMToolKit_WhatsNewIn110_Stills_0000.png)
VRM Tool Kit
VRMアバターをオーサリングするための定番ツール
![Fast Procedural Ocean Fast Procedural Ocean](https://dl.dropbox.com/s/4ujq4i42w147ywq/FastOcean-Unity_Hero.png)
Fast Procedural Ocean
高速に動作する Unity 向け海洋シェーダー
![Terrain Fbx Exporter Terrain Fbx Exporter](https://dl.dropbox.com/s/ercwtntwbsmbckz/TerrainFbxExporter_Logo_1200x630.png)
Terrain Fbx Exporter
Unityの地形をFBX形式で書き出すロングセラーツール
![Faked Rounded Corners Faked Rounded Corners](https://dl.dropbox.com/s/03xd12tde09zvi9/Stmg_RoundCorner_Hero_0000.png)
Faked Rounded Corners
ノーマルマップで角を丸めたように見せるSubstanceシェーダー
![App Window Utility App Window Utility](https://dl.dropbox.com/s/6dx3no461enofj6/AppWindowUtility_Hero.png)
App Window Utility
アプリのウインドウ操作を行うライブラリ
![キャラクターポーズエディター キャラクターポーズエディター](https://dl.dropbox.com/s/5lulthnwbe9qnfj/PoseEditor_SocialMediaImage1200x630.png)
キャラクターポーズエディター
DCCツールのマニピュレーターをUnityで使おう
Maya の Reference Editor は余裕なくぴっちり表示されるわ、ソートは出来ないわでまあごちゃごちゃと見づらい。
まずはリストを見やすくしつつ並べ替えるために、アンダーバーを付けまくる。
![](https://2.bp.blogspot.com/-6r33r2pLAYA/ViRRBENNTLI/AAAAAAAAAwA/sTeI73W-TjM/s1600/STMG_RenameRerefenceNode_A_Prompt.png)
使っていないリファレンスの削除やら、ネームスペース末尾を 1 から A に等々、もろもろ仕様に沿うように整理。
整理が終わったら再度実行、RN を入力して Maya の命名規則に則ってリネーム。
![](https://3.bp.blogspot.com/-keSBr9i-J4U/ViRRBFjI1sI/AAAAAAAAAv8/LqfE23dKu4M/s1600/STMG_RenameRerefenceNode_B_Prompt.png)
元通りに。
![](https://2.bp.blogspot.com/-Mfg7Hrx6QAA/ViD3DHqGNbI/AAAAAAAAAvU/n9q7nz_z5po/s1600/STMG_RenameReferenceNode_Result_B.png)
リファレンスのソートは MEL の機能としてあるわけではなく、エディターの表示を無理矢理いじっているので Reference Editor を閉じると元にもどる。
Stmg_RenameReferenceNode.mel
// rename reference node based on its related namespace.
if( "Rename" == `promptDialog -t "Rename Reference Node"
-m "Suffix: ( \"RN\" to rename based on Maya's naming convention )"
-text "________________"
-b "Rename"
-b "Cancel"` )
{
ReferenceEditor;
string $refList[] = sort(`ls -type "reference"`);
for($ref in $refList)
{
if( catch(`referenceQuery -topReference -rfn $ref` != $ref) )
{
continue;
}
string $prefix = "";
string $suffix = `promptDialog -q`;
string $filename = `referenceQuery -filename $ref`;
string $ns = "";
if(`file -q -usingNamespaces $filename`)
{
$ns = `file -q -renamingPrefix $filename`;
}
else
{
// ignore no namespace
continue;
}
string $name = `substitute "[0-9]+$" $ns ""`;
string $number = `match "[0-9]+$" $ns`;
// $suffix == RN or /^_+$/: special mode
string $newName = $prefix+$name+$suffix+$number;
if("RN" == $suffix)
{
$newName = $prefix+$name+$number+$suffix;
}
else if("" != `match "^_+$" $suffix` )
{
$newName = $prefix+$name+"___"+$number+$suffix;
}
lockNode -l false $ref;
$ref = `rename $ref $newName`;
lockNode -l true $ref;
}
// force reorder reference file list.
string $set = `sets -empty`;
$refList = sort(`ls -type "reference"`);
for($ref in $refList)
{
sets -e -add $set $ref;
referenceEditorViewSetCmd $set;
refresh;
}
global string $gReferenceEditorPanel;
filterUIClearFilter $gReferenceEditorPanel;
delete $set;
}