You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/FixingMixamoRootMotionWithPython.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -245,6 +245,29 @@ class RootMotionFixer:
245
245
returnlen(new_bone_map)-1
246
246
```
247
247
248
+
Note the calls to `skeletal_mesh_set_active_bone_indices()` and `skeletal_mesh_set_required_bones()`: they are required to complete the build of the new mapping.
249
+
250
+
Now just add the following two lines at the end of the `add_root_to_skeleton()` method:
251
+
252
+
```python
253
+
classRootMotionFixer:
254
+
255
+
defadd_root_to_skeleton(self, mesh, bone='root'):
256
+
...
257
+
# assign the new skeleton to the new mesh
258
+
new_mesh.skeletal_mesh_set_skeleton(new_skel)
259
+
260
+
new_skel.save_package()
261
+
262
+
...
263
+
```
264
+
265
+
You can now delete the previous generated assets (the SeletalMesh and the Skeleton) and re-run the script (rememebr to select at least a Skeletal Mesh asset).
266
+
267
+
If all goes well, open the new skeleton and rotate again the left shoulder. Now it should work flawlessly:
0 commit comments