ynput / ayon-houdini

Houdini addon for AYON
Apache License 2.0
11 stars 9 forks source link

asset HDA LOP: Implement and use select product dialog #39

Closed MustafaJafar closed 4 months ago

MustafaJafar commented 4 months ago

Changelog description

Use dialog to pick product and remove redundant Houdini parameter.

Animation_88

Additional info

There's a bug where the representation name is not updating. I can reproduce it in develop branch. oh, there's an issue for it already https://github.com/ynput/ayon-houdini/issues/32

Testing Notes:

  1. use asset lop.
  2. try the product picker.
  3. everything should work as usual.
BigRoy commented 4 months ago

Thanks @MustafaJafar

I personally like it less because it's further away from where you click so I have a feeling it's less quick this way, usually. But I'm fine with merging it if everyone likes it.

Could you add a screen recording on how it behaves without this PR? That way anyone can just quickly comment on the visual differences on how it behaves.

MustafaJafar commented 4 months ago

Could you add a screen recording on how it behaves without this PR? That way anyone can just quickly comment on the visual differences on how it behaves.

I already have that, let me add them here

BigRoy commented 4 months ago

Had another look - I actually love that this removes the Product Type parm. Simplifies a lot of things.

However, I would love for the dialog to feel more like a dropdown menu so that it popups near the clicked location so that it behaves similar to what Houdini does or right click context menus do. I'll look into that.

MustafaJafar commented 4 months ago

@BigRoy , I almost forgot about this PR 😄

BigRoy commented 4 months ago

@BigRoy , I almost forgot about this PR 😄

I've had it in my mind - just not at high priority... but looking at the fact that I'm now creating more HDAs.. maybe I do want to focus on this rather sooner than later. Hmm... hopefully later this week before my vacation.

MustafaJafar commented 4 months ago

@BigRoy , I almost forgot about this PR 😄

I've had it in my mind - just not at high priority... but looking at the fact that I'm now creating more HDAs.. maybe I do want to focus on this rather sooner than later. Hmm... hopefully later this week before my vacation.

So, what is missing according to your comment https://github.com/ynput/ayon-houdini/pull/39#issuecomment-2225310932 above is to place the window near the mouse position. I'm a little noob. I was able to get the mouse location, but no idea how to set the location correctly.

    def showEvent(self, event):
        # Position the window near the mouse position 
        pos = QtGui.QCursor.pos()
        geo = QtCore.QRect(pos.x(), pos.y())
        self.setGeometry(geo)

        return super(SelectFolderPathDialog, self).showEvent(event)
BigRoy commented 4 months ago

@MustafaJafar I've pushed some changes could you give it a go and of course, break it if possible?

image