Fixes for Live2D export

- Fixed export of live2d models from assets without containers.
- Improved method of binding model-related assets.
This commit is contained in:
VaDiM
2025-06-12 01:53:59 +03:00
parent 3a25ed9ccd
commit 7b7eac62d8
5 changed files with 181 additions and 160 deletions

View File

@ -217,8 +217,9 @@ namespace CubismLive2DExtractor
public void ExtractCubismModel(string destPath, Live2DMotionMode motionMode, bool forceBezier = false, int parallelTaskCount = 1)
{
var modelName = Model?.Name ?? destPath.Split('/', '\\').Last();
destPath += Path.DirectorySeparatorChar;
Directory.CreateDirectory(destPath);
var modelName = Model?.Name ?? "model";
#region moc3
using (var cubismMoc = new CubismMoc(MocMono))
@ -234,7 +235,11 @@ namespace CubismLive2DExtractor
sb.AppendLine($"Center Y: {cubismMoc.CentralPosY}");
sb.AppendLine($"Pixel Per Unit: {cubismMoc.PixelPerUnit}");
sb.AppendLine($"Part Count: {cubismMoc.PartCount}");
sb.AppendLine($"Parameter Count: {cubismMoc.ParamCount}");
sb.AppendLine($"Parameter Count: {cubismMoc.ParamCount}\n");
sb.AppendLine($"Bound AnimationClips: {Model?.ClipMotionList.Count}");
sb.AppendLine($"Bound ParamDisplayInfoList: {Model?.ParamDisplayInfoList.Count}");
sb.AppendLine($"Bound PartDisplayInfoList: {Model?.PartDisplayInfoList.Count}");
sb.AppendLine($"Bound PosePartList: {Model?.PosePartList.Count}");
Logger.Debug(sb.ToString());
ParameterNames = cubismMoc.ParamNames;