Home Website Youtube GitHub

Gimmick blended joints

Hi, I am looking for help, I am following the Post Custom Step script for the creation of gimmick blended joints based on the youtube video tutorial and they are not getting created. What could I be doing incorrectly? I also don’t see an error message which would be helpful. Thank you very much.
https://youtu.be/-JFPD3k3Sl4?list=PL9LaIDCCDjfimQVcMdh0rG0MPabPG9FK-&t=684

import os
import mgear.shifter.custom_step as cstp
from mgear import rigbits
import pymel.core as pm

class CustomShifterStep(cstp.customShifterMainStep):
    def __init__(self):
        self.name = "gimmick_blended_joints"

    def run(self, stepDict):
        """Run method.
        i.e: stepDict["mgearRun"].global_ctl gets the global_ctl from
             shifter rig on post step
        i.e: stepDict["otherCustomStepName"].ctlMesh gets the ctlMesh
             from a previous custom step called "otherCustomStepName"
        Arguments:
            stepDict (dict): Dictionary containing the objects from 
                             the previous steps
        Returns:
            None: None
        """
        self.create_gimmick()

    def create_gimmick(self):
        jntList = ["arm_L0_end_jnt", 
                   "arm_L0_0_jnt",
                   "shoulder_L0_shoulder_jnt", 
                   "leg_L0_0_jnt", 
                   "leg_L0_end_jnt"]

        for side in "LR":
            for jname in jntList:
                sJnt = pm.PyNode(jname.replace("L", side))
                rigbits.addBlendedJoint(sJnt)

        rigbits.addBlendedJoint(pm.PyNode("neck_C0_0_jnt"))

i have been using this script for that, just replace from the list the joints you need and also do the mirroring.

List

    left_joint_list = ["Index_L0_0_jnt","Middle_L0_0_jnt","Ring_L0_0_jnt","Pinky_L0_0_jnt" 

https://www.dropbox.com/scl/fi/ymda537hwc4pre2t5nbto/gimmick_blended_joints.py?rlkey=pvwmls49ngrae6gtqb3h2my9c&dl=0

1 Like

Thank you very much for sharing it. Everything is perfect now.

glad was useful! Of course I did not write it, cant really tell who, but might be from Miquel! 8-D

1 Like