add PMX Writer

This commit is contained in:
CroakFang
2023-07-09 03:57:17 +08:00
parent 30a6e8d5f7
commit c595c06b78
14 changed files with 845 additions and 154 deletions
@@ -138,7 +138,7 @@ namespace LibMMD.Unity3D
private const string ColliderNameTail = "Collider";
private const float HalfPIDeg = Mathf.PI * Mathf.Rad2Deg / 2;
private const int MaxTextureSize = 1024;
private readonly ModelReadConfig modelReadConfig = new ModelReadConfig { GlobalToonPath = "" };
private readonly ModelConfig modelReadConfig = new ModelConfig { GlobalToonPath = "" };
public static async Task<MMDModel> ImportModel(string filePath, bool autoShowModel = true)
{
@@ -508,7 +508,7 @@ namespace LibMMD.Unity3D
switch (op.Type)
{
case SkinningOperator.SkinningType.SkinningBdef1:
var bdef1 = (SkinningOperator.Bdef1)op.Param;
var b def1 = (SkinningOperator.Bdef1)op.Param;
ret.boneIndex0 = bdef1.BoneId;
ret.weight0 = 1.0f;
break;