Merge pull request #34029 from nekomatata/create-physical-skeleton-error

Fixed error when creating physical skeleton
This commit is contained in:
Rémi Verschelde 2019-11-30 22:13:38 +01:00 committed by GitHub
commit 2e76c7ce19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,7 +65,6 @@ void SkeletonEditor::create_physical_skeleton() {
for (int bone_id = 0; bc > bone_id; ++bone_id) {
const int parent = skeleton->get_bone_parent(bone_id);
const int parent_parent = skeleton->get_bone_parent(parent);
if (parent < 0) {
@ -73,6 +72,8 @@ void SkeletonEditor::create_physical_skeleton() {
} else {
const int parent_parent = skeleton->get_bone_parent(parent);
bones_infos.write[bone_id].relative_rest = bones_infos[parent].relative_rest * skeleton->get_bone_rest(bone_id);
/// create physical bone on parent