# Mixamo Animation Retargeting

**URL:** <https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916>\
**Category:** UE Marketplace\
**Tags:** retarget, mixamo, unreal-engine, fab\
**Created:** [March 18, 2017, 1:28am UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916 "2017-03-18T01:28:59Z")\
**Posts on this page:** 20\
**Page:** 6

<div class="post-metadata">

**Author:** ![RichardB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RichardB](https://forums.unrealengine.com/u/RichardB)\
**Post date:** [May 25, 2017, 10:05pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/102 "2017-05-25T22:05:46Z")

</div>

Hi, just purchased from the Epic store - I’ve tried following your tut vid but the “Retarget Mixamo Skeleton Asset” is grayed out. It is available for the mixamo animation packs but for none of my own imported characters.

---

<div class="post-metadata">

**Author:** ![UNAmedia](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/unamedia/32/1148507_2.png) [@UNAmedia](https://forums.unrealengine.com/u/UNAmedia)\
**Post date:** [May 25, 2017, 10:24pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/103 "2017-05-25T22:24:55Z")

</div>

> [@RichardB;714251](#):
>
> Hi, just purchased from the Epic store - I’ve tried following your tut vid but the “Retarget Mixamo Skeleton Asset” is grayed out. It is available for the mixamo animation packs but for none of my own imported characters.

Hi! The “_Retarget Mixamo Skeleton Asset_” action is active for skeletons assets that are compatible with the common Mixamo rig. Technically we check the bones names and we enable the option only if we found at least X% of the expected bones. Could you please share a screenshot of the bones hierarchy of your problematic skeleton? (PM me if you prefer).

---

<div class="post-metadata">

**Author:** ![RichardB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RichardB](https://forums.unrealengine.com/u/RichardB)\
**Post date:** [May 25, 2017, 10:30pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/104 "2017-05-25T22:30:31Z")

</div>

I found what the problem is - I have downloaded all my characters from mixamo without animations - I just tried downloading one with animations and it worked. Are you able to get your plugin working for characters without animations? Otherwise I have to download about 50 characters again before they shut their downloads page down…

---

<div class="post-metadata">

**Author:** ![UNAmedia](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/unamedia/32/1148507_2.png) [@UNAmedia](https://forums.unrealengine.com/u/UNAmedia)\
**Post date:** [May 25, 2017, 10:46pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/105 "2017-05-25T22:46:10Z")

</div>

> [@RichardB;714261](#):
>
> I found what the problem is - I have downloaded all my characters from mixamo without animations - I just tried downloading one with animations and it worked. Are you able to get your plugin working for characters without animations? Otherwise I have to download about 50 characters again before they shut their downloads page down…

I’m glad you found a solution!

As the plugin grays-out the action only when the skeleton don’t has the expected bone hierarchy (animations are not considered for this), I suspect there is a “problem” with your characters (maybe they were using an old skeleton from Mixamo?). Can you try to re-download an up-to-date character from Mixamo (without animation) and check again? If the problem persists, please share the screenshot of the character’s bone hierarchy so that we can investigate.

---

<div class="post-metadata">

**Author:** ![RichardB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RichardB](https://forums.unrealengine.com/u/RichardB)\
**Post date:** [May 25, 2017, 11:15pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/106 "2017-05-25T23:15:47Z")

</div>

Ok, tried with their stock “Pearl” character - it enabled the “Retarget to Mixamo Skeleton” which I then did - but when retargeting animations still not getting the correct results… ![ab974c5ad2027cf5654159d3596f2eda2560d741.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

 ![Capture3.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/c/4/c4820cb52dfab7be0b7df0131e1b56be8ba99d58.jpeg) ![Capture4.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/e/2ee5d2131e05f00e3bc15c1a58e2f2d6fdba6e03.jpeg)

---

<div class="post-metadata">

**Author:** ![UNAmedia](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/unamedia/32/1148507_2.png) [@UNAmedia](https://forums.unrealengine.com/u/UNAmedia)\
**Post date:** [May 26, 2017, 12:06am UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/107 "2017-05-26T00:06:23Z")

</div>

> [@RichardB;714276](#):
>
> Ok, tried with their stock “Pearl” character - it enabled the “Retarget to Mixamo Skeleton” which I then did - but when retargeting animations still not getting the correct results…

Hi, we downloaded the Pearl character from Mixamo website, fixed the translucent materials, and we didn’t experienced any problem with the retargeting:

https://.com/watch?v=xVd2b18UrTA

We checked it with both UE4.15 and UE4.16, with both one animation from the Animation Starter Pack (crouch) and one from the ThirdPersonRun (from the ThirdPerson template).

Please double check the instructions I sent you in the PM message:

1. your target UE4 skeleton must have the rig set to “_Humanoid_”;
2. on the Mixamo skeleton that you want to retarget, executed "_Retarget Mixamo Skeleton Asset_” contextual action and select the above UE4 skeleton as target;
3. if you want to retarget a UE4 animation to the Mixamo character: select the UE4 animation that you want to retarget, execute the standard “Retarget Anim Assets” \> “Duplicate Anim Assets and Retarget” action and select as target the Mixamo skeleton.
4. if you want to retarget a Mixamo animation to the UE4 character: select the Mixamo animation that you want to retarget, execute the standard “Retarget Anim Assets” \> “Duplicate Anim Assets and Retarget” action and select as target the above UE4 skeleton.

---

<div class="post-metadata">

**Author:** ![RichardB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RichardB](https://forums.unrealengine.com/u/RichardB)\
**Post date:** [May 26, 2017, 12:50am UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/108 "2017-05-26T00:50:56Z")

</div>

That is exactly what I have been doing - what options did you save the character with on Mixamo?

---

<div class="post-metadata">

**Author:** ![RichardB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RichardB](https://forums.unrealengine.com/u/RichardB)\
**Post date:** [May 26, 2017, 1:06am UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/109 "2017-05-26T01:06:13Z")

</div>

OK, I’ve got too many skeletons in my project, was using a skeleton for an animation set from a different folder. Once I used the correct one it is working now 🙂 Also, I may know what the problem with my characters not working is - a number of years ago there was an option to save the Mixamo characters with a UE4 fbx format - of course that is what I used - perhaps your plugin is thinking that they are using the UE4 skeleton because of Mixamos renaming of the bones?

---

<div class="post-metadata">

**Author:** ![UNAmedia](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/unamedia/32/1148507_2.png) [@UNAmedia](https://forums.unrealengine.com/u/UNAmedia)\
**Post date:** [May 26, 2017, 11:30am UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/110 "2017-05-26T11:30:59Z")

</div>

> [@RichardB;714312](#):
>
> OK, I’ve got too many skeletons in my project, was using a skeleton for an animation set from a different folder. Once I used the correct one it is working now 🙂 Also, I may know what the problem with my characters not working is - a number of years ago there was an option to save the Mixamo characters with a UE4 fbx format - of course that is what I used - perhaps your plugin is thinking that they are using the UE4 skeleton because of Mixamos renaming of the bones?

You are right: the old Mixamo “UE4 FBX format” uses the UE4 mannequin skeleton so our plugin has “nothing” to do. Our plugin works only with the “standard Mixamo skeleton” (the one with the bones named Hips, Spine, Spine1, Spine2, etc). I hope this information could help other too!

---

<div class="post-metadata">

**Author:** ![AngeIV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AngeIV](https://forums.unrealengine.com/u/AngeIV)\
**Post date:** [May 27, 2017, 3:49pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/111 "2017-05-27T15:49:16Z")

</div>

Hi. First of all - bought Your pack. Happy with it. Saves me so much effort and nerves on using Maya for editing and adding the bones exporting animations and all that stuff.  
The retarget pose to target skeleton is perfect. Even the bone retarget type changes to animation / animation scale/ skeleton properly.

However I need suport with root motion. The root bone is added to the skeleton, however all the animations from mixamo have the root bone not move with the character at all. instead its always stationary so making the animation root motion or not - makes no difference. I’m testing with sword and shield pack. What I am doing wrong? could you get me step by step in process of getting root motion animations? Should I tick “in place” on mixamo website. Or maybe I should do something else while importing into UE4? Please help.

 ![Przechwytywanie.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/2/7297771ae27aa8e0b3b83889dcf51378b62721c8.png)

---

<div class="post-metadata">

**Author:** ![UNAmedia](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/unamedia/32/1148507_2.png) [@UNAmedia](https://forums.unrealengine.com/u/UNAmedia)\
**Post date:** [May 27, 2017, 4:47pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/112 "2017-05-27T16:47:09Z")

</div>

> [@AngeIV;715103](#):
>
> Hi. First of all - bought Your pack. Happy with it. Saves me so much effort and nerves on using Maya for editing and adding the bones exporting animations and all that stuff.  
> The retarget pose to target skeleton is perfect. Even the bone retarget type changes to animation / animation scale/ skeleton properly.

Very happy that it’s useful! 🙂

> [@AngeIV;715103](#):
>
> However I need suport with root motion. The root bone is added to the skeleton, however all the animations from mixamo have the root bone not move with the character at all. instead its always stationary so making the animation root motion or not - makes no difference. I’m testing with sword and shield pack. What I am doing wrong? could you get me step by step in process of getting root motion animations? Should I tick “in place” on mixamo website. Or maybe I should do something else while importing into UE4? Please help.

Nothing wrong, simply (and unfortunately) Mixamo animations don’t encode proper root motion information so they can’t be used with “UE4 root motion system”. By default the character motion is encoded in the Hips bone, unfortunately added to the local Hips motion, making it unusable. We also tested the “_in place_” Mixamo animations (you can export them from Mixamo flagging the “in place” option when available), but also this is not compatible with “UE4 root motion system” (it zeroes the motion - so any useful information is stripped out).

What you can do with our plugin, is to apply an existing UE4 root motion animation to a Mixamo character - this will work as expected thanks to the addition of the root bone.

**workaround** With another user @Konflict - thanks!) we tested a partial solution - but it must be tuned for each single animation and it could produces low-quality results (model could “slides” following the local hips/pelvis motion - this because it’s impossible to separate the local Hips motion from the character motion): use an animation blueprint that copies the pelvis/Hips translation to the root bone as needed, then “zeroes” the moved pelvis/hip transforms. In attachment you can see some screenshots of this method (credits to @Konflict).

 ![MAR-InPlace-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/9/4/94e9f386bbfd9f17d5ea69aa001bb90f2fc9ad8b.jpeg)

 ![MAR-InPlace-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/8/b835308dffa2056a2c9f588d559cb15d084d5034.jpeg)

 ![MAR-InPlace-3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/c/6cbac1dc449fb176deee506dcb30fa2133a03ec3.jpeg)

 ![MAR-InPlace-4.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/c/6c966e1f9785ddec03437c83be70e656245dadea.png)

---

<div class="post-metadata">

**Author:** ![AngeIV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AngeIV](https://forums.unrealengine.com/u/AngeIV)\
**Post date:** [May 27, 2017, 4:59pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/113 "2017-05-27T16:59:07Z")

</div>

Using root motiojn can be easily replicated… this solution however… well… Won’t.  
When mixamo exported ue4 skeletons it had root motion on them 😕 and it worked 😕 Miss the change to download few hundret of those animations. ☹

Well at least now I can use perfectly all the in place animations. 🙂

---

<div class="post-metadata">

**Author:** ![UNAmedia](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/unamedia/32/1148507_2.png) [@UNAmedia](https://forums.unrealengine.com/u/UNAmedia)\
**Post date:** [May 27, 2017, 5:04pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/114 "2017-05-27T17:04:22Z")

</div>

> [@AngeIV;715138](#):
>
> Using root motiojn can be easily replicated… this solution however… well… Won’t.  
> When mixamo exported ue4 skeletons it had root motion on them 😕 and it worked 😕 Miss the change to download few hundret of those animations. ☹

I know ☹ Surely they have the proper informations (Hips translation and “root” translation as separate vectors) but they are not exporting them in an usable way…

> [@AngeIV;715138](#):
>
> Well at least now I can use perfectly all the in place animations. 🙂

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Konflict](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/konflict/32/906588_2.png) [@Konflict](https://forums.unrealengine.com/u/Konflict)\
**Post date:** [May 27, 2017, 5:11pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/115 "2017-05-27T17:11:09Z")

</div>

@AngeIV this test was only intented to present a possible way to simply just copy the pelvis motions on the x and y axes to the root bone, and to align the IK bones which can help in certain procedural behavior (eg foot, hand IK). I was hoping that the retargeting can be extended as such to allow these copied bone transforms to be actually baked on the animation sequence thus allowing the mixamo animations to use the root and ik bones a fairly good way.

I’m not sure if that is actually possible to do in ue4, but you can perhaps bring the exported mixamo animations straight into maya and bake them on the ue4 mannequin with a good receipe (scripting?) thus allowing these bones to inherit the motions you are willing to see. Upon importing the baked animation sequences into ue4 you should be able to use the retargeted mixamo character, or any skeleton that have the root and ik bones available.

---

<div class="post-metadata">

**Author:** ![AngeIV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AngeIV](https://forums.unrealengine.com/u/AngeIV)\
**Post date:** [May 27, 2017, 5:30pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/116 "2017-05-27T17:30:28Z")

</div>

I know how to bake root motion in Maya for mixamo animations. However my trial ended and I cant afford to do that anymore 😜

---

<div class="post-metadata">

**Author:** ![Number47](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Number47](https://forums.unrealengine.com/u/Number47)\
**Post date:** [May 30, 2017, 7:22pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/117 "2017-05-30T19:22:17Z")

</div>

> [@AngeIV;715150](#):
>
> I know how to bake root motion in Maya for mixamo animations. However my trial ended and I cant afford to do that anymore 😜

I have made a tutorial on how to do this with Blender here: v=AYlonUyPong&t=688s

---

<div class="post-metadata">

**Author:** ![tcla75](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tcla75](https://forums.unrealengine.com/u/tcla75)\
**Post date:** [May 31, 2017, 11:45pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/118 "2017-05-31T23:45:22Z")

</div>

Hi can anyone tell me what settings I should be using here for exporting and importing?

![548fe42b6767ac89e72dfb334d44b36bdeac43dd.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

![39d6f4a9bfc273b344357b185770612e84481779.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

![85e905dbaff289e77d0624dbc2a2c770e58ba7ea.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

![6600ec4f6280e32bc6f106c874dcbcff4940dfa8.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

When I import the model into UE4 it ends up looking weird like this.

![645fdd32e763e6f7074b40c16901aaec15e991be.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

---

<div class="post-metadata">

**Author:** ![UNAmedia](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/unamedia/32/1148507_2.png) [@UNAmedia](https://forums.unrealengine.com/u/UNAmedia)\
**Post date:** [May 31, 2017, 11:59pm UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/119 "2017-05-31T23:59:09Z")

</div>

It’s a “known problem” with Mixamo: its materials are imported as translucents also if they are not. Usually forcing the materials that are not using transparencies to “opaque” should fix the issue.

Here a more articulated comment found recently on Facebook ([Redirecting...](https://www.facebook.com/groups/ue4devs/permalink/662898433908525/?comment_id=662924273905941)):

> [@](#):
>
> This crops up often, especially with Fuse-exported models. It’s a depth sorting issue caused by surfaces with translucent materials rendering on top of one another, the renderer unsure which to display first. The reason you’re getting it specifically is because Fuse consolidates all the main body features into one diffuse texture, including the eye lashes which have alpha transparency. Consequently ALL of the body that uses the texture are included in the transparency pass and inherit the problem. How do you fix it? Either set your material blend mode to masked (a form of transparency that doesn’t have the same issues but is only 1-bit: pixels are either completely solid or completely transparent. Plug your alpha into Opacity Mask instead of Opacity) or edit your model to use two materials, one for the lashes and one for everything else, with the lashes blend mode set to translucent and the other material set to opaque. If you opt for the masked option, note you can mitigate the lack of smooth transparency by passing your alpha channel through a node called Dither Temporal AA before plugging it into the opacity mask to feather it out a little using a dithering technique.

---

<div class="post-metadata">

**Author:** ![thelazylion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thelazylion](https://forums.unrealengine.com/u/thelazylion)\
**Post date:** [June 1, 2017, 4:43am UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/120 "2017-06-01T04:43:04Z")

</div>

_Snip_, Sorry, fixed it.

Edit:  
Actually, another issue just came up. Any idea what could be causing the models head to rotate into its chest as the base skeleton?

[https://dl.dropboxusercontent.com/u/12913216/Screenshots/Games/Mine/Shrd/headless.PNG](https://dl.dropboxusercontent.com/u/12913216/Screenshots/Games/Mine/Shrd/headless.PNG)

Thanks, again…

---

<div class="post-metadata">

**Author:** ![RodentGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rodentgames/32/1007573_2.png) [@RodentGames](https://forums.unrealengine.com/u/RodentGames)\
**Post date:** [June 1, 2017, 5:04am UTC](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916/121 "2017-06-01T05:04:09Z")

</div>

Just a quick post here for other people who would like to use this fantastic quick fix and **remove** root motion like I did. Below is the source code to a Python script for Blender to add the root bone to the FBX from Mixamo and remove the X/Z motion from the Hips bone. This will remove the root motion and make it easier for coders to work with especially over networked apps. This is **unsupported** as work 12+hrs a day and try to do this stuff at night =)

Usage: blender.exe --background --python “fixMixamo.py” – “C:\Animations\standing\_aim\_overdraw.fbx” (Obviously change out the folder/file)

**Notes:**  
This will not remove the Cube in the scene so I suggest you remove all the items in the scene and save it as your Blender start up  
This script will export the FBX file based on your settings so make sure to save your Operator Presets in the FBX Export to Forward: -Z Forward and Up: Y Up.  
Finally the export will place the file in a path \Fixed inside the path the original FBX file was in EG: “C:\Animations\standing\_aim\_overdraw.fbx” ends up in “C:\Animations\Fixed\standing\_aim\_overdraw.fbx” –\> Make sure to create the \Fixed folder, I was too lazy to do that in the script!

```auto

import sys
import os
import bpy

argv = sys.argv
argv = argv[argv.index("--") + 1:] # get all args after "--"

bpy.ops.import_scene.fbx(filepath = argv[0])

#Select Armature
bpy.ops.object.select_all(action='DESELECT')
bpy.context.scene.objects.active = bpy.data.objects"Armature"]
bpy.data.objects"Armature"].select = True

#Armature -> Mocap tools -> Fix BVH Axis Orientation
bpy.ops.mocap.rotate_fix()

#Set X rotation to 0
import mathutils
eul = mathutils.Euler((0,0,0), "XYZ")
bpy.data.objects"Armature"].rotation_euler = eul

#Edit Mode 				
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.armature.select_all()

#Add Bone at 0, 0, 0
bpy.context.scene.cursor_location = (0.0, 0.0, 0.0)
arm = bpy.data.armatures"Armature"]
#Rename bone = root
bone = arm.edit_bones.new("root")
bone.head = (0,0,0)
bone.tail = (0,0,1)
#Select Hips + Set Parent
arm.edit_bones"Hips"].parent = arm.edit_bones"root"]
bpy.ops.object.mode_set(mode='OBJECT')

#Pose Mode
bpy.ops.object.mode_set(mode='POSE')
#Set root.keyframe(0) to 0,0,0
bpy.data.objects"Armature"].data.bones.active = bpy.data.objects"Armature"].pose.bones'root'].bone
bpy.context.active_pose_bone.keyframe_insert(data_path="location", frame=0)

#Set the active pose bone to Hips
bpy.data.objects"Armature"].data.bones.active = bpy.data.objects"Armature"].pose.bones'Hips'].bone
bone = bpy.context.active_pose_bone
name = bone.name
typ = "location"
maxLength = 0
#Get the fcurve for Hips.location
fcurves = [fc for fc in bpy.data.actions[0].fcurves if fc.data_path.startswith('pose.bones"%s"].%s' % (name, typ))]
#Set the maxLength to the last frame with data in it
for fc in fcurves: 
	for kfp in fc.keyframe_points: 
		if kfp.co[0] > maxLength: maxLength = kfp.co[0]

#Get the frames from the fcurve
for fc in fcurves: frames = [kfp.co[0] for kfp in fc.keyframe_points if kfp.co[0] >= 0 and kfp.co[0] <= maxLength]

#Remove all keyframes of Hips.location.x
for f in frames: success = bone.keyframe_delete(data_path=typ, index=0, frame=f)

#Remove all keyframes of Hips.location.z
for f in frames: success = bone.keyframe_delete(data_path=typ, index=2, frame=f)

#Set the animation timers based on the imported FBX
bpy.context.scene.frame_set(0)
bpy.context.scene.frame_start = 0
bpy.context.scene.frame_end = maxLength
bpy.ops.object.mode_set(mode='OBJECT')

lastSlash = argv[0].rindex('\\')
newFile = argv[0][0:lastSlash] + '\\Fixed'+argv[0][lastSlash:len(argv[0])]
bpy.ops.export_scene.fbx(filepath=newFile)

```

[Previous page](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916.md?page=5)

[Next page](https://forums.unrealengine.com/t/mixamo-animation-retargeting/87916.md?page=7)
