diff options
author | Lyuma <xn.lyuma@gmail.com> | 2023-04-27 01:41:28 -0700 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2023-05-12 12:07:00 +0200 |
commit | 2a0597d0cbe1f3e98803a431d28a58d0590d74ae (patch) | |
tree | 25c2d4229b989bfbd7f2b365e6b2fa1f5cb98a62 /editor/import | |
parent | ebaf3cc9abb66bb4060c1b90311e237b82bedc74 (diff) |
import: Fix Silhouette used incorrect index.
Fixes bind pose mistake from using i (mesh skin index) instead of bone_idx (skeleton bone index).
Fixes #76448
(cherry picked from commit d33a734ac51f57043586fda058314075271527be)
Diffstat (limited to 'editor/import')
-rw-r--r-- | editor/import/post_import_plugin_skeleton_rest_fixer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/import/post_import_plugin_skeleton_rest_fixer.cpp b/editor/import/post_import_plugin_skeleton_rest_fixer.cpp index e105135c11..6214a2b70d 100644 --- a/editor/import/post_import_plugin_skeleton_rest_fixer.cpp +++ b/editor/import/post_import_plugin_skeleton_rest_fixer.cpp @@ -669,7 +669,7 @@ void PostImportPluginSkeletonRestFixer::internal_process(InternalImportCategory StringName bn = skin->get_bind_name(i); int bone_idx = src_skeleton->find_bone(bn); if (bone_idx >= 0) { - Transform3D new_rest = silhouette_diff[i] * src_skeleton->get_bone_global_rest(bone_idx); + Transform3D new_rest = silhouette_diff[bone_idx] * src_skeleton->get_bone_global_rest(bone_idx); skin->set_bind_pose(i, new_rest.inverse() * ibm_diff[bone_idx]); } } |