Browse Source

Merge pull request #76499 from lyuma/fix_silhouette_fixer

import: Fix Silhouette used incorrect index.
Rémi Verschelde 2 years ago
parent
commit
0fc3ba2ea7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      editor/import/post_import_plugin_skeleton_rest_fixer.cpp

+ 1 - 1
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]);
 						}
 					}