Home Website Youtube GitHub

Select all controls + Reset not working

Mgear 4.0.9
Maya 2023.1

If i right click on a Mgear rig control / select all controls / reset -

i get the following error

Error: TypeError: file C:\Users\godfather\Documents\maya\modules\scripts\mgear\core\attribute.py line 949: ‘NoneType’ object is not iterable


attribute.getSelectedChannels() returns None if (as it looks like) there are no channels selected.

So then on line 949, it has the potential to attempt to iterate over None.

Since attribute.getSelectedChannels() is meant to return a list, if nothing is found, it should likely return [] instead of None.

I don’t know if that explains why you encounter this bug because it still works in 2022 and you shouldn’t need to select channels. Changing that None line might just pave over a different bug. Possibly something changed in Maya 2023. I’m getting 2023 installed to test.

I can reproduce this in Maya 2020, 2022 and 2023 on any Shifter controller, when I hide all channels on a control. It’s probably true of any Maya version, and any mGear version.

Do you have any controls in your hierarchy that have all channels hidden?

I opened up an issue and proposed fix for attribute.py for this bug:

1 Like

thanks chris, i will check that