UI : How to build a floating menu?

Hey.

I want to make a menu which can appear over the panels. The menu will be built from a variable list of commands.

Assume I set up two string arrays, one for the menu item name, and one for the command to be run by that item...

      $menuItem[]          $menuCmd[]

The menu should appear over the panel by the cursor when I right click or hit a hotkey...

Just like the "materials > assign_existing_material" menu gets built whenyou rightclick over an object. I had a quick look at the buildShaderMenus.mel that maya uses to form that menu, but its tooo much of a hassle to seperate the bits I need from the bits I don't in there...

cheeers!

hey cybotic, i wrote a script that kinda does what you're after (I think).

check out zooObjMenu. check out the readme on how to install it - its pretty easy - just copy all scripts to your scripts dir, and then right click an object, and you can customise its RMB menu.

I'll check it out. Thhanks for the tip