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
/// <summary> | |
/// [PMDE]選択頂点の鏡像選択 | |
/// [簡易形式]SelectMirror.cx | |
/// 選択中頂点の鏡像を選択しなおします。SHIFT実行で追加選択となります。 | |
/// </summary> | |
// 選択中の頂点 | |
int[] selectedV = view.GetSelectedVertexIndices(); | |
if (selectedV.Length == 0) | |
{ |
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
/// <summary> | |
/// [PMDE]頂点の選択状態を読む | |
/// [簡易形式]LoadSelectedVertecis.cx | |
/// 頂点の選択状態の保存で保存した情報を読みこみます。 | |
/// デフォルトでは頂点番号で選択しますので、頂点を削除したり入れ替えた場合は正しく選択されません。 | |
/// その場合、SHIFTキーを押しながらプラグインを実行すると頂点のPositionで選択を試みます。これも完全ではありません。 | |
/// </summary> | |
bool nearMode = false; | |
int total = 0; | |
int fail = 0; |
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
/// [PMDE]頂点の選択状態を保存する | |
/// <summary> | |
/// 選択中の頂点を記録します。LoadSelectedVertecisと併せて使用します。 | |
/// </summary> | |
// 選択中の頂点番号を取得 | |
int[] vlist = view.GetSelectedVertexIndices(); | |
if (vlist.Length == 0) | |
{ | |
throw new Exception("頂点が選択されていません。"); | |
} |
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
/// <summary> | |
/// [PMDE]頂点モーフを合成する | |
/// [簡易形式]MixVertexMorph.cx | |
/// 複数の頂点モーフを割合を指定して合成します。 | |
/// </summary> | |
string[] Option = new string[10]; | |
string TargetName = "まばたきNEW"; // 作成モーフ名(同名モーフが既存なら上書き) | |
// 以下に合成するモーフ名(と倍率・省略可)を列挙(10個まで) | |
Option[0] = "まばたき,1"; | |
Option[1] = "右上,1"; |
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
/// <summary> | |
/// [PMDE]頂点モーフから選択頂点のみを抜き出す | |
/// [簡易形式]ExtractVertexFromMorph.cx | |
/// PMDEのリストから対象のモーフを選択し、PMDViewで頂点を選択して使用します | |
/// </summary> | |
// 処理元のモーフ取得 | |
int selectedMorph = connect.Form.SelectedExpressionIndex; | |
if (selectedMorph < 0) | |
{ |
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
// | |
// ボーンに手動ベイク用のガイドオブジェクトをくっつける | |
// [簡易形式]AddGuideObject.cx | |
// ここにガイドオブジェクトをつけたいボーンを記述する | |
string[] targetlist = new string[]{ | |
"首", | |
"頭", | |
"左腕", |
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
// | |
// モデルが参照している画像ファイルを列挙する | |
// [簡易形式]EnumResourceFiles.cx | |
// 補足:メモ帳に貼り付けますが、たまに失敗します。 | |
IList<string> usedlist = new List<string>(); // 一度以上現れたかの判定用リスト | |
string basepath = Path.GetDirectoryName(pmx.FilePath); // モデルが保存されているフォルダ名 | |
StringBuilder sb = new StringBuilder(); // 結果出力用 |
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
// | |
// 選択頂点を反転する | |
// [簡易形式]ReverseVertexSelection.cx | |
IList<int> vlist = new List<int>(); // 処理対象頂点のリスト格納用 | |
int[] selectedMaterials = connect.View.PMDViewHelper.PartsSelect.GetCheckedMaterialIndices(); // 材質絞込み状態取得 | |
if (selectedMaterials.Length < material.Count) // 材質絞込みがされている? | |
{ | |
// 有効な頂点を記憶する | |
foreach (int i in selectedMaterials) |
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
// | |
// 接続剛体のないJOINTを削除する | |
// [簡易形式]DeleteUnlinkedJoionts.cx | |
for (int i = joint.Count - 1; i >= 0; i--) | |
{ | |
if (joint[i].BodyA == null || joint[i].BodyB == null) // 接続剛体が存在しない | |
{ | |
joint.RemoveAt(i); | |
} | |
} |
NewerOlder