Home 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\pmcmds.py line 134: setAttr: The attribute ‘leg_L0_tws2_loc.scaleX’ is locked or connected and cannot be modified.

This is in Maya 2018.2

Cheers,
Dave

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.

Cheers,
Dave

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.

Thanks,
Dave

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\factories.py”, line 785, in callback

res = origCallback(*newargs)

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

rg.buildFromSelection()

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

self.build()

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

self.processComponents()

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

comp.stepMethodsi

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

self.addOperators()

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

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

File “C:\Program Files\Autodesk\Maya2018\Python\lib\site-packages\pymel\core\nodetypes.py”, 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\general.py”, line 573, in setAttr

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

File “C:\Program Files\Autodesk\Maya2018\Python\lib\site-packages\pymel\internal\pmcmds.py”, 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.

Cheers,

Dave

Hi @floppyDJ

Can you try to replace the leg_2jnt init.py 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.

Thanks,
Miquel

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.

Regards,
Armin

@Armin_Halac

Interesting situation. I have to review this issue properly.

I have log it here:https://github.com/mgear-dev/shifter_classic_components/issues/12

btw: here is a new mGear beta: https://github.com/mgear-dev/mgear_dist/releases/tag/3.0.0_beta3

Cheers,
Miquel

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))

2 Likes

Just FYI: Using Maya 2018.5 with MGear 3.0.5 and just ran into the same issue. Failed on building leg_2jnt_01

Thanks Zola for you info! Now I can breath again :slight_smile:

Thanks for mentioning this. I stumbled upon the mentioned issue after I changed some Preferences in Maya, related to the Camera, on a fresh Maya 2019 install. This caused the leg not to build properly, and now it’s solved. Phew!

I got the same problem with 3.4 version. Reset the maya settings and it works again.

best regards

the same issue. Happen after change world up axis. Fixed by deleting userPrefs.mel in maya\2018\prefs folder. Fk Autodesk .Killed SoftImage and slow killing Maya.

Just hit this today using 2020.4

Can you back up your preferences and start maya with a new preferences?
It also happened to me last week in Maya 2018 :frowning:

It was so annoying the situation that in some point I started to backup the preferences with a full copy just in case breaks again
image