feature/gltf-pipeline-v2 #18

Merged
NotEvil merged 19 commits from feature/gltf-pipeline-v2 into develop 2026-04-17 02:07:45 +00:00
Showing only changes of commit d7f8bf6c72 - Show all commits

View File

@@ -1216,6 +1216,10 @@ public final class FurnitureGlbParser {
String name = node.has("name")
? node.get("name").getAsString()
: "joint_" + j;
// Strip armature prefix (e.g., "MyRig|body" -> "body")
if (name.contains("|")) {
name = name.substring(name.lastIndexOf('|') + 1);
}
if (GltfBoneMapper.isKnownBone(name)) {
skinJointRemap[j] = filteredJointNodes.size();
filteredJointNodes.add(nodeIdx);
@@ -1257,9 +1261,13 @@ public final class FurnitureGlbParser {
int nodeIdx = filteredJointNodes.get(j);
JsonObject node = nodes.get(nodeIdx).getAsJsonObject();
jointNames[j] = node.has("name")
String rawBoneName = node.has("name")
? node.get("name").getAsString()
: "joint_" + j;
// Strip armature prefix consistently
jointNames[j] = rawBoneName.contains("|")
? rawBoneName.substring(rawBoneName.lastIndexOf('|') + 1)
: rawBoneName;
if (node.has("rotation")) {
JsonArray r = node.getAsJsonArray("rotation");
@@ -1432,6 +1440,10 @@ public final class FurnitureGlbParser {
String name = node.has("name")
? node.get("name").getAsString()
: "joint_" + j;
// Strip armature prefix (e.g., "MyRig|body" -> "body")
if (name.contains("|")) {
name = name.substring(name.lastIndexOf('|') + 1);
}
if (GltfBoneMapper.isKnownBone(name)) {
filteredJointNodes.add(nodeIdx);
}