mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-06-03 00:58:13 -04:00
Some changes to motion list for l2d models
- Motion list is now sorted - Motions divided into groups (each motion is a separate group) - Motion names are used as group names
This commit is contained in:
parent
cf67815d53
commit
c8a21838c9
@ -99,7 +99,7 @@ namespace CubismLive2DExtractor
|
||||
}
|
||||
|
||||
//motion
|
||||
var motions = new JArray();
|
||||
var motions = new SortedDictionary<string, JArray>();
|
||||
|
||||
if (gameObjects.Count > 0)
|
||||
{
|
||||
@ -205,11 +205,8 @@ namespace CubismLive2DExtractor
|
||||
}
|
||||
json.Meta.TotalUserDataSize = totalUserDataSize;
|
||||
|
||||
motions.Add(new JObject
|
||||
{
|
||||
{ "Name", animation.Name },
|
||||
{ "File", $"motions/{animation.Name}.motion3.json" }
|
||||
});
|
||||
var motionPath = new JObject(new JProperty("File", $"motions/{animation.Name}.motion3.json"));
|
||||
motions.Add(animation.Name, new JArray(motionPath));
|
||||
File.WriteAllText($"{destMotionPath}{animation.Name}.motion3.json", JsonConvert.SerializeObject(json, Formatting.Indented, new MyJsonConverter()));
|
||||
}
|
||||
}
|
||||
@ -307,7 +304,7 @@ namespace CubismLive2DExtractor
|
||||
{
|
||||
Moc = $"{modelName}.moc3",
|
||||
Textures = textures.ToArray(),
|
||||
Motions = new JObject { { "", motions } },
|
||||
Motions = JObject.FromObject(motions),
|
||||
Expressions = expressions,
|
||||
},
|
||||
Groups = groups.ToArray()
|
||||
|
Loading…
x
Reference in New Issue
Block a user