If you want to display a custom ui and halt all other maya ui interaction whilst it's open, here’s a script.
This uses Maya’s new-ish layoutDialog ui element, and it basically lists things and returns the user's specification. Nothing special, but it is nice that it basically acts like a confirmDialog.. The code is a bit hacked together as I originally thought I could get a textScrollList, in python, to simply accept data with some *args or **kargs callback functions, but no joy there. So I had to wrap this up in a class and use some class attributes to store and access the needed data on events.
Anyway here's the script. This may not be the cleanest way to do this, but I had to get it working. Hope someone finds it useful.
This uses Maya’s new-ish layoutDialog ui element, and it basically lists things and returns the user's specification. Nothing special, but it is nice that it basically acts like a confirmDialog.. The code is a bit hacked together as I originally thought I could get a textScrollList, in python, to simply accept data with some *args or **kargs callback functions, but no joy there. So I had to wrap this up in a class and use some class attributes to store and access the needed data on events.
Anyway here's the script. This may not be the cleanest way to do this, but I had to get it working. Hope someone finds it useful.

selectitemdialogui.py |