Is there a way to select several buttons inside a formLayout (or any other layout) with a drag selection? Like how you would do with maya objects in viewport, but inside a custom MEL UI i know you can use getModifiers to know if Shift is pressed to not and thus mimick shift selection etc but drag/marquee selection seems, very hard, to replicate...
Asked
Active
Viewed 302 times
0
-
If you can find a way to do what you need with `QT`, then porting it to Maya shouldn't be an issue. However, I can't think of a control that does what you want. – Daniel Skovli Mar 03 '20 at 00:07
-
Wait, what are you trying to accomplish exactly? A synoptics selector for a rig? – Green Cell Mar 03 '20 at 02:39
-
@GreenCell whats a synoptic selector? I made a custom window in Maya MEL which is used to quickly pick controllers for a rig. I'd like to be able to drag select them, not only individually click them (i know it must be pretty annoying to implement lol) https://imgur.com/a/1npn6KR – Fynmorph Mar 03 '20 at 16:01
-
A synoptics is basically a body picker. – Green Cell Mar 04 '20 at 01:54
1 Answers
0
I don't think you can use Maya's standard interface objects to achieve that, but yes, you can absolutely do it with PySide
in Python.
Check out examples for QtWidgets.QGraphicsView
and QtWidgets.QGraphicsScene
. Their framework is setup so that you can create items inside their view, and be able to select multiple with a marquee. They can also support moving via dragging the items, so you can even go as far as having a body picker creator without having to hard-code it. You could even be fancy as to create path items with beziers handles (like Photoshop) so that the user can create their own custom shapes, though you would have to manually make that framework.

Green Cell
- 4,677
- 2
- 18
- 49