diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-11-30 22:13:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-30 22:13:38 +0100 |
commit | 2e76c7ce194046bd7a085a3400a73ceb976b3254 (patch) | |
tree | f10ffbe98e60c9d140f20e7105bddd92000cab85 | |
parent | ea8a30a5eab7a9afd2e4752e849c1fc42b1bcfbc (diff) | |
parent | f0fdd7de807876d62e4d53e7c20573b8ff50fe9e (diff) |
Merge pull request #34029 from nekomatata/create-physical-skeleton-error
Fixed error when creating physical skeleton
-rw-r--r-- | editor/plugins/skeleton_editor_plugin.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/plugins/skeleton_editor_plugin.cpp b/editor/plugins/skeleton_editor_plugin.cpp index cd360d4caf..1adf0be108 100644 --- a/editor/plugins/skeleton_editor_plugin.cpp +++ b/editor/plugins/skeleton_editor_plugin.cpp @@ -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 |