Home Website Youtube GitHub

Can't set single channel in Channel Wrangler

Hello,
I’m trying to setup channels using Channel Wrangler, and I’m getting an error:

# Traceback (most recent call last):
#   File "P:\Breaker\Breaker\Tools\AutodeskMaya\hm_tools\Lib\mgear_3_7_8\release\scripts\mgear\rigbits\channelWrangler.py", line 266, in populateChannelLineEdit
#     chan = attribute.getSelectedChannels(True)[0]
# TypeError: 'NoneType' object has no attribute '__getitem__'

Running this through debugger, it seems that line 1043 in attribute.py is returning None

attrs = pm.channelBox(get_channelBox(), q=True, sma=True)

I’m not sure why it would be returning None; I have channels selected in the channel box. get_ChannelBox() is returning u'mainChannelBox'

For what it’s worth, ‘Set Multi Channel’ is working fine.

I’m running Maya 2020.4 with mGear 2.7.8.

Thanks in advance for any help anyone can provide.

-Chris B.

I should also mention I have ‘Use Classic Channel Names’ and ‘Use Component Instance Name for Attributes Prefix’ checked in the Guide Settings.

I was wondering if it was maybe proxy attributes, but they seem to show up just fine. I tested instances, but they seem to work too.

What attributes are you selecting? What type are they? I wonder if some types aren’t supported? (I know regular transform attributes won’t show up in that returned list, when the attribute.getSelectedChannels(True) flag is passed.)

If you were to select translate, rotate, scale, with that True flag, it would return an empty list.

If you were to select attributes on a shape node, it would return None. The pm.channelBox(sma) flag only returns attributes selected in the upper section of the channelBox. Not on shapes or utility nodes.

(I only tested the functions you mentioned, not the actual Channel Wrangler tool.)

Ok, I was able to track down the issue. I have a Post script that Asset-izes the rig, in an attempt to clean up the visible hierarchy and mitigate breakages. Unfortunately, it seems that the channels are then not accessible. I haven’t worked with Assets a lot (I know they’re relatively uncommon as well), but it seems I probably need to expose specific channels as well, possibly. In either case, this is weird, because I could’ve sworn that I tested turning off that script yesterday and still saw issues. I must’ve missed something, then.

2 Likes