Home Website Youtube GitHub

animPicker issue with Maya 2020

Hi guys,

First, thanks for everything … your framework is awesome!

There is a mistake with the animPicker in Maya 2020. (CentOS)
It happens when we try to create an button item or load a ‘.pkr’ file.

Here’s the traceback:

# Traceback (most recent call last):
#   File "/home/m.fransolet/maya/modules/mGear/3.4.0/scripts/mgear/anim_picker/gui.py", line 460, in add_picker_item
#     namespace=self.namespace)
#   File "/home/m.fransolet/maya/modules/mGear/3.4.0/scripts/mgear/anim_picker/widgets/picker_widgets.py", line 1721, in __init__
#     self.text = GraphicText(parent=self)
#   File "/home/m.fransolet/maya/modules/mGear/3.4.0/scripts/mgear/anim_picker/widgets/picker_widgets.py", line 1637, in __init__
#     self.set_size()
#   File "/home/m.fransolet/maya/modules/mGear/3.4.0/scripts/mgear/anim_picker/widgets/picker_widgets.py", line 1659, in set_size
#     self.center_on_parent()
#   File "/home/m.fransolet/maya/modules/mGear/3.4.0/scripts/mgear/anim_picker/widgets/picker_widgets.py", line 1689, in center_on_parent
#     self.setPos(-center_pos * self.scale_transform)
# TypeError: # 'PySide2.QtCore.QPointF.__mul__' called with wrong argument types:
#   PySide2.QtCore.QPointF.__mul__(QTransform)
# Supported signatures:
  PySide2.QtCore.QPointF.__mul__(float)

Hope this will help …

Best,
Mika

Hi @MikaFr thanks for the feedback. I will try to check this ASAP

I have log it here: https://github.com/mgear-dev/anim_picker/issues/15

Hi Miquel,

Just for info, I have tested today on Win10 and,
I have the same issue / same Maya traceback.

Best,
Mika

1 Like

Yes, same here. Info get lost. Errors. Maya 2020.1

@mackerB the ticket is already fixed. It will be included in the next release :wink:

1 Like

Thanks @Miquel! do you know when the next release will be? looking forward to the fix! :slight_smile:

I modified the file picker_widgets.py and (line 1683) it seems to work checking for maya version below 2020, I guess new Qt in Maya 2020 is different in some cases. I wonder if this is the proper way to do this.

def center_on_parent(self):
‘’’
Center text on parent item
(Since by default the text start on the bottom left corner)
‘’’
center_pos = self.boundingRect().center()

    if int(cmds.about(v=True)) < 2020:
        self.setPos(-center_pos * self.scale_transform)
    else:
        self.setPos(-center_pos.x(), center_pos.y())

The planning is for next week :wink:

1 Like

sweeeet! Looking forward to it. :slight_smile: