Showing the changes to interface/src/ModelUploader.cpp (1 of 1 file). Show all
Unified · Split
| @@ -157,10 +157,10 @@ bool ModelUploader::zip() { · 156 unmodified lines | ||
| 157 | 157 | } |
| 158 | 158 | QVariantHash joints = mapping.value(JOINT_FIELD).toHash(); |
| 159 | 159 | if (!joints.contains("jointEyeLeft")) { |
| 160 | − joints.insert("jointEyeLeft", "LeftEye"); | |
| 160 | + joints.insert("jointEyeLeft", geometry.jointIndices.contains("EyeLeft") ? "EyeLeft" : "LeftEye"); | |
| 161 | 161 | } |
| 162 | 162 | if (!joints.contains("jointEyeRight")) { |
| 163 | − joints.insert("jointEyeRight", "RightEye"); | |
| 163 | + joints.insert("jointEyeRight", geometry.jointIndices.contains("EyeRight") ? "EyeRight" : "RightEye"); | |
| 164 | 164 | } |
| 165 | 165 | if (!joints.contains("jointNeck")) { |
| 166 | 166 | joints.insert("jointNeck", "Neck"); |
| @@ -172,7 +172,8 @@ bool ModelUploader::zip() { · 5 unmodified lines | ||
| 172 | 172 | joints.insert("jointLean", "Spine"); |
| 173 | 173 | } |
| 174 | 174 | if (!joints.contains("jointHead")) { |
| 175 | − joints.insert("jointHead", geometry.applicationName == "mixamo.com" ? "HeadTop_End" : "HeadEnd"); | |
| 175 | + const char* topName = (geometry.applicationName == "mixamo.com") ? "HeadTop_End" : "HeadEnd"; | |
| 176 | + joints.insert("jointHead", geometry.jointIndices.contains(topName) ? topName : "Head"); | |
| 176 | 177 | } |
| 177 | 178 | if (!joints.contains("jointLeftHand")) { |
| 178 | 179 | joints.insert("jointLeftHand", "LeftHand"); |