Home Website Youtube GitHub

Issue with control_01 + connect existing joints + Joint Names

Hello !
For a human rig, I wanted to create end joints of the fingers (tip joints). I used the game biped template, where I put a control_01 inside each last guide of each fingers.
So that looks like this :

Also, because I want the skeleton to be named as same as fingers, I added a “Joint Names”
To have LeftHandIndex1 → LeftHandIndex2 → LeftHandIndex3 → LeftHandIndex4
The first three joints are generated by EPIC_chain_01 and the last by control_01.

Aaaand, because i would like to fix parasitic rotations values from the skel, I kept the previously generated skeleton, checked “Connect existing joints”.

The problem is when I build with the rig, I get the following error :

shifter\component\__init__.py", line 483, in _addJoint
#     obj, name=obj.name() + "_cnx_off"
# AttributeError: 'Matrix' object has no attribute 'name'

There is no error if I use in Joint Names a name that isn’t already in the scene, so the joint will be correctly generated. But when it comes to use existing joints, the bug happens.

I could have a workaroung and generate end joints of the fingers with post script, but I wanted to report you this very specific bug :grin:

@remicc
is it only happening with the control_01?
It is strange since the system to attach joints is shared with all the components.
Please log the bug and I will check it
Thanks!

Yes it happens only with control_01, not EPIC control 01. I will create a github request !

edit @Miquel the code breaks on all “control” guides (control_01, EPIC_control_01, EPIC_layered_control_01)
I updated the github request name and found half of the solution.

2 Likes

@remicc Thanks for all the feedback and tickets :heart:

1 Like

Not sure if this helps but I have the same exact error on the EPIC_layered_control_01 componet. It seems there is a matrix being passed on the _addJoint() function specificaly for the “obj” parameter. So when this line is exacuted:

driver = primitive.addTransform(
obj, name=obj.name() + “_cnx_off”
)

It errors becouse “I think” it wants a nt.Transform() instead? So it can get the name of the driving transform? But there is no driver for my layered controllers as I have them setup as leaf joints for RBF data?

Tracing the rabbit hole a bit looks like the dictionary gets passed here in jointStructure() as “self.jnt_pos” in the shifter\component_init_.py.

Joint creation

    for jpo in self.jnt_pos:
        # NOTE: using a list was a mitake. Adding support for a kwargs dict
        if isinstance(jpo, list):
            if len(jpo) >= 3 and self.options["joint_rig"]:
                if jpo[2] == "component_jnt_org":
                    newActiveJnt = self.component_jnt_org
                elif jpo[2] == "parent_relative_jnt":
                    # this option force the active jnt always to the parent
                    # relative jnt.
                    # If None the active jnt will be updated to the latest in
                    # each jnt creation
                    newActiveJnt = self.parent_relative_jnt

Not sure where or how self.jnt_pos gets passed…But if I do a print on jpo this is what I get:

jpo = {‘obj’: Matrix([[-0.640725360057965, 0.6413615709453736, 0.42205017272010925, 0.0], [0.41530354553165416, 0.7518650199662323, -0.512076124047992, 0.0], [-0.6457507089019948, -0.1528212258348284, -0.7480987200142184, 0.0], [90.77916701546063, 208.236211531001, -100.62770512171933, 1.0]]), ‘name’: ‘upper_wing_A’, ‘guide_relative’: ‘root’, ‘UniScale’: False}

Notice the matrix for “obj”? This is causing the error.

I’m currently using 4.3.0 so maybe you have fixed this already in newer version. But I’d love to know if there is a work around or fix?

1 Like