feature/gltf-pipeline-v2 #18
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user