Help with reparenting bone to a different bone script

I am working on a script to change the Daz skeleton to match that of the Unreal Engine mannequin.

It's a request I have seen around the Daz forums and a personal scripting challenge I set for myself.

Even if the results aren't perfect its a goal and a project to learn more about Daz Studio scripting.

I have the bones I need renamed, relabeled, or removed.  When bones are removed Daz Studio automatically reparents the remaining bones just fine.

What I'm stuck on is that in the Unreal Engine mannequin rig both the Shoulder Twist bone and the Forearm Bend bone are parented to the Shoulder Bend bone.

So I am trying to find a way to script reparenting the Forearm Bend to the Shoulder Bend bone

I have the script selecting the bone I need reparented,  and using the triggerAction (DzJEReparentBoneAction) I do get the "Select an Item" pop up menu.

I am not sure how to script selecting a bone in that menu or how to "hit" Accept.

Maybe there is a easier way?

Below are the results with the script so far:


Sign In or Register to comment.