Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Creating Pop-up Menus

    Cinema 4D SDK
    r21 python
    3
    5
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bentraje
      last edited by

      Posted in Cineversity but it turns out it is not possible natively. Just wondering if this is possible in Python

      Hi,

      Is there a way to create pop menus?
      Currently, we have V (for the global pop-up with a radial menu)
      and we have P (for plain pop-up for snapping).

      The Customize Menus option only allows editing and not creating own menus.

      Thank you for looking at my problem.

      1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand
        last edited by ferdinand

        Hi,

        I am not quite sure what you expect from the term "pop-up menu".

        But the answer is yes, you can create pop-menus programmatically in Python. For simple menus you can use c4d.gui.ShowPopupDialog() for more complex stuff you can implement GeDialog and GeUserArea to do anything you want. If you just want a vertical list of text entries ShowPopupDialog() will be enough. If you want anything fancier like radial menus or icons you will have to implement that on your own with classes I did mention.

        Cheers
        zipit

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 1
        • B
          bentraje
          last edited by

          @zipit

          Thanks for referring c4d.gui.ShowPopupDialog(). The documentation, in this rare ocassion, presents a code example that I can just copy and paste and it works. (Why can't all code examples work this way?)

          Anyhow

          RE: radial menu
          I search "radial" in the documentation but results are not relevant to radial menu. Maybe it has other name? Just wondering

          RE: Marking Menu like Maya
          Just wondering, is the marking menu like Maya also possible in C4D. See example below:
          https://www.dropbox.com/s/9dnex4moovzu420/c4d138_marking_menu.mp4?dl=0

          A prominent feature is that the main and submenu is spaced out as "radial". The "spaced out" for me is really important since I don't really read the marking menus in Maya when I'm using them. It's just muscle memory.

          The vertical list is just too close that I need to read them otherwise I click the wrong command.

          1 Reply Last reply Reply Quote 0
          • M
            m_adam
            last edited by m_adam

            Hi @bentraje.

            If you really want to create a Maya like radial menu, the best way is to create a CommandData (this way you can assign a hotkey to this command).
            This CommandData will launch severals Gedialog (one for each main menu), then creates a button that will open a c4d.gui.ShowPopupDialog(), See How to make menus pop up in a certain distance of the mouse.
            On the clicks do the action and close all the GeDialog.

            Just in case I know that c4ds also developed something similar, see https://www.c4dcafe.com/ipb/blogs/entry/510-dials-wheel-of-tools/.

            Finally, regarding code example, it's one of my goals to make them work in any condition, with R21 we reworked our GitHub examples and they are working without any issue.
            I didn't get time to revamp built-in examples from the documentation, it's on my todo list. But however If you have an example that does not work as it is in the documentation or in Github, please let us know.

            Cheers,
            Maxime.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

            1 Reply Last reply Reply Quote 0
            • B
              bentraje
              last edited by

              @m_adam

              RE: Maya radial
              Yea, it by theory the multiple gedialogs with pop-up from certain distance from the mouse should create a radial. I'll probably have it for another time/thread.

              Thanks for the response. Will consider this thread close

              RE: non working code example.
              Sure sure. Will let you know if anything comes up. The codes I referred above was from awhile ago, so I don't have immediate memory of them.

              1 Reply Last reply Reply Quote 0
              • G Gaal Dornik referenced this topic on
              • First post
                Last post