Home Website Youtube GitHub

Guide wont construct full rig

For some reason, even with a fresh guide template, mgear isn’t constructing the full rig. Seems to be missing the legs, head, and right arm from the bones. Im not quite sure where this issue is stemming from. Any help would be appreciated.

  1. What version of mGear?

  2. Post any errors from your script editor output.

  3. This reminds me a bit of this post. It might be related to your naming rules. Which guide template are you using?: How to attach 3 arm - #6 by chrislesage

Mgear 4.0.9, Using the UE4 mannequin Y up

# Traceback (most recent call last):
#   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\nodetypes.py", line 572, in __getattr__
#     return getattr(super(general.PyNode, self), attr)
# AttributeError: 'super' object has no attribute 'inverseScale'
# # 
# During handling of the above exception, another exception occurred:

# Traceback (most recent call last):
#   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\nodetypes.py", line 710, in _attr
#     plug = self.__apimfn__().findPlug(attr, False)
# RuntimeError: (kInvalidParameter): Object is incompatible with this method
# # 
# During handling of the above exception, another exception occurred:

# Traceback (most recent call last):
#   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\nodetypes.py", line 730, in _attr
#     raise RuntimeError
# RuntimeError
# # 
# During handling of the above exception, another exception occurred:

# Traceback (most recent call last):
#   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\nodetypes.py", line 575, in __getattr__
#     return DependNode.attr(self, attr)
#   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\nodetypes.py", line 662, in attr
#     return self._attr(attr, False)
#   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\nodetypes.py", line 740, in _attr
#     raise general.MayaAttributeError('%s.%s' % (self, attr))
# pymel.core.general.MayaAttributeError: Maya Attribute does not exist (or is not unique):: 'head.inverseScale'
# # 
# During handling of the above exception, another exception occurred:

# Traceback (most recent call last):
#   File "C:\Users\David\Documents\maya\modules\scripts\mgear\shifter\guide_manager.py", line 64, in build_from_selection
#     rg.buildFromSelection()
#   File "C:\Users\David\Documents\maya\modules\scripts\mgear\shifter\__init__.py", line 236, in buildFromSelection
#     self.build()
#   File "C:\Users\David\Documents\maya\modules\scripts\mgear\shifter\__init__.py", line 270, in build
#     self.processComponents()
#   File "C:\Users\David\Documents\maya\modules\scripts\mgear\shifter\__init__.py", line 500, in processComponents
#     comp.stepMethods[i]()
#   File "C:\Users\David\Documents\maya\modules\scripts\mgear\shifter\component\__init__.py", line 181, in step_04
#     self.jointStructure()
#   File "C:\Users\David\Documents\maya\modules\scripts\mgear\shifter\component\__init__.py", line 1839, in jointStructure
#     gearMulMatrix=gearMulMatrix,
#   File "C:\Users\David\Documents\maya\modules\scripts\mgear\shifter\component\__init__.py", line 315, in addJoint
#     leaf_joint=leaf_joint,
#   File "C:\Users\David\Documents\maya\modules\scripts\mgear\shifter\component\__init__.py", line 400, in _addJoint
#     self.active_jnt.scale, jnt.inverseScale
#   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\nodetypes.py", line 3782, in __getattr__
#     raise e
#   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\nodetypes.py", line 3774, in __getattr__
#     res = DependNode.__getattr__(self, attr)
#   File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\nodetypes.py", line 579, in __getattr__
#     raise AttributeError("%r has no attribute or method named '%s'" % (self, attr))
# AttributeError: nt.Transform('head') has no attribute or method named 'inverseScale'

Ooh your hunch might be right. Resetting the joint naming rule gets it to perform correctly on a template rig. Let me try this on the modified version we are using for our characters.

Yup, that did the trick. Appreciate the quick reply and help. I’m curious how the naming rules work and in this instance led to the rig being partially created. How do the naming rules affect the rig generation stage?

Ahh, but it does destroy the UE4 bone naming conventions… Hmm

So weirdly I can build the rig fine in an empty scene with no geo, but if I have geo in the scene the error occurs.

Ah, ok I found it. Geo was sharing the same names as some of the controls, throwing off Mgear. Adding a suffix to all the geo solves the issue. Documenting here in case folks make the same goof I did.

2 Likes