Helpful and buggy script

Hi; 

So for some reason when copying the fingers the constrains didn't copy and I didn't realize until quite late. So I decided to do the most logical thing and instead of losing 10 minutes adding the constrains I decided to lose the whole afternoon making a barely working script that allows you to copy constrains and change targets according to a name pattern.

Make sure to delete all constrains in the target bones because I wasn't able to find a way to check if they exist.

It will be buggy, but it also helped me this time. Maybe it works for someone else.

Code




024-05-31 205235.png

2 loves
Reply
  • Dwayne Savage(dillenbata3) replied

    Not sure but are you wanting to copy constraints from one bone to selected bones? If so blender already does that. Select the bones you want to copy constraints to. Then Shift+select the bone with the constraints so that it's the active bone. Then click Pose menu->Constraints->Copy constraints to selected bones. Note: It does remove any constraint already on the selected bones. if you want to select by pattern then that's under select menu. 

    ***Edit**

    You need to be in pose mode. If you want to do it across multiple armatures then you need to select all armatures in object mode before switching to pose mode. 

    1 love
  • Guillermo Espert(guiessu) replied

    Well, blender does this but then you need to change targets and also you need to do it constrain by constrain. This does everything with one click, copying every constrain from every bone(All MCH, DEF and control) containing the origin bone name (Finger_A) to the correspoding bones containing the target name, while also changing the constrains to the correct settings

    1 love
  • Guillermo Espert(guiessu) replied

    Just to clarify here is how the script works:



    I added an option to delete all constraints from the target bones before doing the copy and also added waynes code to run the reset stretch to constraints.

    This is a dumb over worked solution for a very specific problem but might come in handy in the future, maybe we could add the creation of the bones to the script so it would be a single click copy of the finger rig.
    3 loves
  • Wayne Dixon replied

    I love this.
    Looks nice Guillermo.
    When I get a few spare minutes I'll check it out properly but thanks very much for sharing.

    I feel like I'm helping people to help people :)

    1 love
  • Guillermo Espert(guiessu) replied

    Forgot to update the script linked, here it is

    script

    2 loves
  • Adrian Bellworthy replied

    Save 10 minutes by losing an afternoon!
    Now that's dedication, something good come out of it, so it was worth it, I guess.

    3 loves