Website Youtube GitHub

mGear 2.5.24 Biped template erroring when building


Hi Miquel,

I’ve just been trying to build a rig from the built-in biped template and am coming across an error.
This happens if I import the biped template and build selection on the guide node.

Operators : leg_L0 (leg_2jnt_01)

Error: RuntimeError: file C:\Program Files\Autodesk\Maya2018\Python\lib\site-packages\pymel\internal\ line 134: setAttr: The attribute ‘leg_L0_tws2_loc.scaleX’ is locked or connected and cannot be modified.

This is in Maya 2018.2



I was having this same problem in Maya 2016 but 2017 + worked fine… still haven’t had time to track down the issue.


ok cool, glad it’s not just me :slight_smile:

I am just resetting up my maya environment after years of being out of tech art.

once I get my python setup with debugging I will see what I can find.



Hello @floppyDJ, are you using 2018 first release or one of the updates 2018.1, 2018.2 or 2018.3.

I have 2 machines with 2018.2 and 2018.3 an I cant reproduce the issue. Same as 2016 Ex1 +sp6 it is working for me.

Please let me know if you find something , thanks!


Hi Miquel,

I am running 2018.3 with a clean install, ie no other tools loaded.

I hopefully will have time today or tomorrow to delve into it.



I just downloade the 3.0 beta and ran across the same issue.

Loader shifter UI, added leg_2jnt_01 and built selection.

Stack trace from Maya script editor here:
GEAR version : 3.0.0

= SHIFTER RIG SYSTEM ==============================================

= GUIDE VALIDATION ==============================================
Checking guide
Get options
Get controllers
Get components
leg_C0 (leg_2jnt_01)
Find recursive in [ 0:00:00.043000 ]
Get parenting for: leg_C0
Guide loaded from hierarchy in [ 0:00:00.046000 ]

= BUILDING RIG ==============================================
Initial Hierarchy
Init : leg_C0 (leg_2jnt_01)
Objects : leg_C0 (leg_2jnt_01)
Properties : leg_C0 (leg_2jnt_01)
Operators : leg_C0 (leg_2jnt_01)

Error: setAttr: The attribute ‘leg_C0_tws2_loc.scaleX’ is locked or connected and cannot be modified.

Traceback (most recent call last):

File “C:\Program Files\Autodesk\Maya2018\Python\lib\site-packages\pymel\internal\”, line 785, in callback

res = origCallback(*newargs)

File “C:\Setups\GameLoft\maya\modules\mgear_3.0.0_beta_01\scripts\mgear\shifter\”, line 167, in buildFromSelection


File “C:\Setups\GameLoft\maya\modules\mgear_3.0.0_beta_01\scripts\mgear\”, line 137, in buildFromSelection

File “C:\Setups\GameLoft\maya\modules\mgear_3.0.0_beta_01\scripts\mgear\”, line 163, in build


File “C:\Setups\GameLoft\maya\modules\mgear_3.0.0_beta_01\scripts\mgear\”, line 327, in processComponents


File “C:\Setups\GameLoft\maya\modules\mgear_3.0.0_beta_01\scripts\mgear\shifter\”, line 138, in step_02


File “C:/Setups/GameLoft/maya/modules/mgear_3.0.0_beta_01/scripts/mgear/shifter_classic_components\”, line 598, in addOperators

self.tws2_loc.setAttr(“sx”, .001)

File “C:\Program Files\Autodesk\Maya2018\Python\lib\site-packages\pymel\core\”, line 567, in setAttr

return general.setAttr("%s.%s" % (self, attr), *args, **kwargs)

File “C:\Program Files\Autodesk\Maya2018\Python\lib\site-packages\pymel\core\”, line 573, in setAttr

cmds.setAttr(attr, *args, **kwargs)

File “C:\Program Files\Autodesk\Maya2018\Python\lib\site-packages\pymel\internal\”, line 134, in setAttr_wrapped

res = new_cmd(*new_args, **new_kwargs)

RuntimeError: setAttr: The attribute ‘leg_C0_tws2_loc.scaleX’ is locked or connected and cannot be modified.




Hi @floppyDJ

Can you try to replace the leg_2jnt with this one

I have commented out he line 598. I will research a little more. But looks like this line was not needed. Because the leg_C0_tws2_loc is driven by constraint apply just before.

Please let me know if that fix the issue and if the rest still stable.



Hey Miguel,

I encountered the same issue today. Interestingly everything worked before and suddenly today it doesn’t.
Commenting the line you suggested did fix it though. Thanks for that.




Interesting situation. I have to review this issue properly.

I have log it here:

btw: here is a new mGear beta:



Oh cool. Is there are release log somewhere? I’d love to test out the new featues.

Thank you!


Hi @Armin_Halac

the release log is not update sorry :frowning:
I guess need to check the commits in github.

I should update it soon


In the Preferences there is a setting about Animation Blending. If it is set to Never blend then the rig building fails (in v3.1.1 and before).
By code you should set the animBlendingOpt optionVar to 1 while building:

pm.optionVar(iv=('animBlendingOpt', 1))