0

Is it possible to have per-shot pop-up menus?

Hello there.

I need to be able to perform certain actions on certain shots in a sequence. The idea is to select a shot (or sequence, stack, layout, etc) from the Session Manager window and extend/replace its associated context menu. Is this possible without having to modify the GUI source code? If modifying the source code is the only option, where could I find some examples? Being able to extend the image context menu would also help.

 

Thanks in advance,

Chema

 

 

댓글 3개

  • 0
    Avatar
    Jon Morley

    Hi José,

    By default the "pointer-3--push" if bound to commands.popupMenu with no custom menu contents. When used this way the context menu is a duplicate of the menu bar. Therefore any menu items you add to the main menubar will show up in the context menu. You can add menu items in packages and do not need to modify any existing GUI code. However if you want a completely custom context menu then you can bind you package's mode to use "pointer-3--push" and then fill the call to commands.popupMenu with the menu you want to display. You could even put logic in your package that does the default behavior (calls popupMenu with None) if some other criteria is not met.

    How does that sound?

    Thanks,
    Jon

  • 0
    Avatar
    José M. Calvo

    Hi Jon, thanks.

    I managed to show a custom menu doing it as you said, but still have a couple of questions. First, when I call popupMenu it completely replaces the default menu. Is there any way I could append some new options to it instead of replacing it? Second, what would be really helpful is to have that functionality in the session manager window, but no event seems to be triggered, how can I do the same in this window?

     

    Thanks a lot.

    Chema

     

  • 0
    Avatar
    Jon Morley

    Hi Chema,

    I am glad you are making progress. In my original reply I mentioned that the default behavior for handling the pointer-3 binding is to show a copy of the main menu bar. If you want to have that show up as well as your custom menu options then making a menu for your mode in the normal way would cause your additional entries to show up in the main menu bar and in the context menu. If that doesn't work for you and you need to operate on the event/pointer position to determine what to insert into the menu then I will have to see if there is some way to get the main menu object so you can append your menu options to that and send it into popupMenu.

    Right now the Session Manager does not forward all events to the GLView for processing with the RV event binding system. Furthermore the MuQt that makes up the Session Manager directly binds to Qt context menu calls. Therefore the only way to modify the context menus in the Session Manager is to modify session_manager.mu for the time being.

    Thanks,
    Jon

댓글을 남기려면 로그인하세요.