- 2022.03.28 Monday
- スポンサーサイト
-
一定期間更新がないため広告を表示しています
- | スポンサードリンク | - | | - | - | pookmark |
- 2016.11.22 Tuesday
- simple deleteEmptyAnimLayers Only.mel pythonバッチ用
-
simple deleteEmptyAnimLayers Only.mel pythonバッチ用
結局このmel printしようとしてこけてることが多い 後半printばっかりでした。
- | whaison | MEL(Maya Embedded Language) | 22:13 | comments(0) | - | pookmark |
- 2016.10.24 Monday
- Maya is Clash When "double referenced file " file -importReference Maya2016で2重に子供ファイルをリファレンスした親ファイルを以下のスクリプトを実行するとクラッシュしてしまいます
-
答えはシンプルかもしれません。はじめにパーツの /Scenes/*.mb ファイル もimport しておくことです。解答参照
Maya is Clash When "double referenced file " file -importReference Maya2016で2重に子供ファイルをリファレンスした親
ファイルを以下のスクリプトを実行するとクラッシュしてしまいます
autoDeskForumにポストしてみたページ http://forums.autodesk.com/t5/maya-programming/maya-is-clash-when-quot-double-referenced-file-quot-file/td-p/6382162
Maya is Clash when"the Mayabinary file was reference to the double"
was
loaded with MelScript"
SimpleImportReference()
" below will Clash.
--
--
共有違反
と言われます。
Log.txt
--
--PC Spec
- 続きを読む >>
- | whaison | MEL(Maya Embedded Language) | 15:28 | comments(0) | - | pookmark |
- 2016.10.05 Wednesday
- GetTopNodeJointList.mel return Top Root Node Array
-
GetTopNodeJointList.mel return Top Root Node Array
- | whaison | MEL(Maya Embedded Language) | 14:55 | comments(0) | - | pookmark |
- 2016.09.29 Thursday
- proc rig_to_joint_bakemotion_fbx_v1103_proc081_notJoint_keyframeDelete.mel 存在しないジョイントのキーフレームを選択して削除
-
proc rig_to_joint_bakemotion_fbx_v1103_proc081_notJoint_keyframeDelete.mel 存在しないジョイントのキーフレームを選択して削除
- | whaison | MEL(Maya Embedded Language) | 13:52 | comments(0) | - | pookmark |
- 2016.09.15 Thursday
- Maya Windows bat cmd バッチファイルから mayabatch.exe -command "melStart()"
-
:: ====================================
:: Maya用Windowsバッチファイルです
:: 0030 mayabatchの変数宣言 C:¥Program Files¥Autodesk¥Maya2016¥bin¥mayabatch.exe cmd
:: 0050 作業ディレクトリ変数宣言 %AutoWorkSpace% cmd
:: 0100 作業ディレクトリへ移動 cmd
:: 0200 直下の複数のフォルダパスを保存 cmd
:: 0310、mayabatch.exeのディレクトリ C:¥Program Files¥Autodesk¥Maya2016¥bin へ移動 cmd
:: 0311 Maya Bin mayabatch.exeの入っている ディレクトリチェック dir /b cmd
:: 0320 Mayaに送るコマンドを変数 CommandSendTxt にいれる cmd
:: 0340 エスケープするパスの¥を/に検索置換する cmd
:: 0341 formtPathStr の表記テスト cmd
:: 0345 実行するコマンドを定義 cmd
:: 0350、Mayaを起動する新規ファイルで cmd
:: 0400、ワークスペース設定にフォルダパス渡して mel
:: ====================================AutoMayaBatch_CharaDir_v003.bat
で呼ばれるmelがこれ
mayabatch.mel
コマンドからだとなぜか 「deleteEmptyAnimLayers.mel見つかりません」とかいわれるから C:¥Users¥UserName¥Documents¥maya¥2016¥ja_JP¥scripts に deleteEmptyAnimLayers.mel 追加 - | whaison | MEL(Maya Embedded Language) | 16:53 | comments(0) | - | pookmark |
- 2016.09.14 Wednesday
- mel エラー : 読み取り専用のノードの名前は変更できません。
-
mel エラー : 読み取り専用のノードの名前は変更できません。
リファレンスインポート後
リファレンスのリグからジョイントをベイクしたあと
名前を変更しようとしたがこの" mel エラー : 読み取り専用のノードの名前は変更できません。 "
変更負荷を無視しようと
if ( catchQuiet ($resultName=`rename $renameObj $newname`) )
{
print("416出ちゃったよーー 読み取り専用のノードの名前は変更できません。$procName="+$procName+"¥n");
if($procName == "rig_to_joint_bakemotion_fbx_v1103_proc062_DeleteNameSpace")
{
print("もう次いくわよ rig_to_joint_bakemotion_fbx_v1103_proc071_ExportSetting()");
rig_to_joint_bakemotion_fbx_v1103_proc071_ExportSetting();
}
print("もう一回やれてる?");
}rig_to_joint_bakemotion_fbx_v1103_proc068_renameReadWriteCheck.mel
したがそもそも実行されないとダメなので
もう一度 再度リファレンスをインポートするといい感じに renameができるようになった が。。 選択があやしく select -allDagObjects; select -hi; 全選択へ修正して
そのあとの処理をしたらうまくいった。
//010 開始フレームを0フレームにする。 rig_to_joint_bakemotion_fbx_v1103_proc010_init_offset();
//020 参照してるリファレンス達をループしてファイルにインポートする。1 rig_to_joint_bakemotion_fbx_v1103_proc020_referenceImport()
//031 OriginalJointの取得と選択 rig_to_joint_bakemotion_fbx_v1103_proc030_selectOriginalJoint()
//040 ジョイントに移動XYZ回転XYZをベイク rig_to_joint_bakemotion_fbx_v1103_proc040_selectedJointBakeTranslateXYZRotateXYZ()
//040
//041 拡大縮小のジョイントがあった場合ベイク rig_to_joint_bakemotion_fbx_v1103_proc041_selectedJointBakeScaleXYZ()
//050 ベイクした骨がジンバル回転ロックしないようオイラーフィルタ rig_to_joint_bakemotion_fbx_v1103_proc050_RotateUnLockEulerFilter()
//060 不要なノードの削除、delete 空のレイヤも削除 rig_to_joint_bakemotion_fbx_v1103_proc060_DeleteDustNode() string $reference[] = `file -q -reference -shortName`;
//061 シーンサイズの最適化 rig_to_joint_bakemotion_fbx_v1103_proc061_cleanUpScene(); cleanUpScene (3);
//063 リファレンスファイルにインポートする。これをしないとリファレンス参照が邪魔して読み取り専用のノードの名前は変更できません。 rig_to_joint_bakemotion_fbx_v1103_proc063_referenceImport2()
//065 ネームスペースの削除 rig_to_joint_bakemotion_fbx_v1103_proc065_DeleteNameSpace2()
//068 rename拡張のチェックと新ネーム設定 rig_to_joint_bakemotion_fbx_v1103_proc068_renameReadWriteCheck(string $renameObj ,string $newname ,string $procName)
//071 エクスポーター設定 rig_to_joint_bakemotion_fbx_v1103_proc071_ExportSetting()
//074 OriginalJointの取得と選択 rig_to_joint_bakemotion_fbx_v1103_proc074_selectOriginalJoint()
//077 先頭文字プレフィックスを削除 rig_to_joint_bakemotion_fbx_v1103_proc077_DeletePrefix()//080 RootノードのZ出力 rig_to_joint_bakemotion_fbx_v1103_proc080_RootTranslateXZoutput()
//081 RootXZの移動キー削除 rig_to_joint_bakemotion_fbx_v1103_proc081_RootTranslateXZdeleteKeyframe()
//082 FBX保存 rig_to_joint_bakemotion_fbx_v1103_proc082_FbxExport()こんな流れにした。
- | whaison | MEL(Maya Embedded Language) | 21:10 | comments(0) | - | pookmark |
- 2016.08.29 Monday
- MEL 時間差計算
-
MEL 時間差計算 他の言語でやりたかった。。。
- | whaison | MEL(Maya Embedded Language) | 22:09 | comments(0) | - | pookmark |
- 2016.08.23 Tuesday
- melProfilerWindow MEL プロファイラ(MEL Profiler)
-
MEL プロファイラ(MEL Profiler)
MEL プロファイラ(MEL Profiler)は、ツールの使用状況を監視し、ボトルネックを特定するために必要な測定基準を記録するプロファイリング システムです。また、プロファイリング データを使用して、MEL ツールセットを迅速かつ容易に診断できます。
1開く
Maya で、プラグイン マネージャ(Plug-in Manager)
(ウィンドウ > 設定/プリファレンス > プラグイン マネージャ(Windows > Settings/Preferences > Plug-in Manager))を開き、melProfiler.mll プラグインをロードします。
2、MEL コマンド 「melProfilerWindow」 を、入力実行すると出るけど初回 プロファイリング ボタンが出ない。
Maya 再起動したらでた。mll がロードされないのかな?。
.
.
MEL プロファイラを使用してプロファイリング データを生成するには
- プロファイリング > 開始(Profiling > Start)を選択し、プロファイリング プロセスを開始します。
- 図表化するワークフローを実行します。
実行時に、ワークフローで使用される MEL プロシージャが MEL プロファイラ(MEL Profiler)に表示されます。
- ワークフローが完了したら、プロファイリング > 停止(Profiling > Stop)を選択します。
プロファイリング プロセスが停止します。プロファイリング データに含まれている各プロシージャは、ランタイムの割合(Percent of Runtime)の値に基づいてカラー コーディングされます。
- ランタイムの割合(Percent of Runtime)が 10% を上回る場合は緑色になります。
- ランタイムの割合(Percent of Runtime)が 25% を上回る場合は黄色になります。
- ランタイムの割合(Percent of Runtime)が 50% を上回る場合は赤色になります。
.
..
deleteUnusedCommon_Multi
黄色くなってるので
whatIs deleteUnusedCommon_Multi; melProfiler_profile.csv
// 結果: Mel procedure found in: C:/Program Files/Autodesk/Maya2016/scripts/startup/cleanUpScene.mel //
シーンサイズの最適化が重いみたい。
出力されるプロファイルデータCSV melProfiler_profile.csv
https://gist.github.com/whaison/f8e4daf81d4bc469e9a3ee35e1898a89
出力されるコールグラフ.dot mel_Profiler_call_graf.dot
https://gist.github.com/whaison/a7597c16c4059bf0c598803442059847
みるには。。。
https://ja.wikipedia.org/wiki/DOT言語
.
resこんなん
本体こんなん
.
.
.
.
.
..
.
.
.
.
- | whaison | MEL(Maya Embedded Language) | 15:26 | comments(0) | - | pookmark |
- 2016.08.22 Monday
- Maya progressBar and interrupting a script loop cancel 'ESC' MainWindow And Out of Window progressBar
-
Maya progressBar and interrupting a script loop cancel 'ESC' MainWindow And Out of Window progressBar
---new
UI_3_5_ProgressInterruptingWindowLoopEnd_timeView_bugfix_good_Refactoring.mel
https://gist.github.com/whaison/62cbfda460d679357752a76360f63e5c--old
UI_3_3_ProgressInterruptingWindowLoopEnd_timeView.mel
https://gist.github.com/whaison/cb51d9ccabdbd0c690f8a1b12025f7c2感想
progressWindowは 扱いにくいかな。と
直接
windowとして
progressBarをいじったほうが扱いやすく感じた。
参考URL
Melのループを途中で止めるスクリプト
http://shikatanaku.blogspot.jp/2010/07/mel.html
,
svenneve, Maya progressBar and interrupting a script loop
http://www.svenneve.com/?p=258
,
http://cgjishu.net/blog-entry-134.html
、
http://mayastation.typepad.com/maya-station/2009/04/interrupting-or-aborting-a-mel-script.html
、
ボタンを押すとウィンドウ上にボタンが追加されるmel
http://planetmikan.blog.fc2.com/blog-entry-1.html
、
ゼンリョクノート[Maya] progressWindow を作成する
http://mukaimame.blog111.fc2.com/blog-entry-263.html
,
MayaのMELで何か作る 頂点群と頂点群の配列を合わせる
http://mayamelscript.blogspot.jp/2014/11/blog-post_26.html
Complete Maya Programming: An Extensive Guide to MEL and C++ API
,
https://www.borndigital.co.jp/book/482.html
著者
著者のウェブサイト( http://www.davidgould.com )で提供されます。
C++で書くMayaプラグイン
http://www.dfx.co.jp/dftalk/?p=5421
Ueta CG Tech (blog) 【Maya】Python,C++,C#で比較。スキンウエイトの取得と設定
- | whaison | MEL(Maya Embedded Language) | 20:03 | comments(0) | - | pookmark |
- 2016.07.27 Wednesday
- mel 重複 配列 Overlaped Array Toユニーク配列 unique Arrayへ
-
mel 重複 配列 Overlaped Array Toユニーク配列 unique Arrayへ
http://me.autodesk.jp/wam/maya/docs/Maya2010/Commands/stringArrayRemoveDuplicates.html - | whaison | MEL(Maya Embedded Language) | 18:10 | comments(0) | - | pookmark |