Skeleton for rigging with Blender

I think that I found a decent solution for rigify to Unreal pipeline.
I don’t know where should I write. Sorry if here is inappropriate.

What my script does is that
1.make a copy of the rigify
2.delete all bones except deform bones.
3.Reconstruct the hierarchy
4.Object’s scale modification. (adding tiny empty as parent)
5.bake animation to new rig (and remove all constraints)
6.Reconnect the mesh’s Aramature modifier to new rig.
The script ends at here.

What remaining to do is…
1.Export.

I’m new to Unreal. So, I’m not certain about validity of this concept.
Anyway, the file is here.
https://drive.google/file/d/0B-J3_rta5aXtZGl5bHMzczJfc1U/view
Because of my poor English skill, please don’t expect reply from me

v=koiEMf6nzqc