Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Login

    menuitem with with icon [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    6 Posts 0 Posters 507 Views
    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.
    • H Offline
      Helper
      last edited by

      On 14/12/2014 at 16:03, xxxxxxxx wrote:

      hey

      is there a way to get a menu item with an icon like self.MenuAddString(41, "name") so it can be checked and unchecked ?

      thanks

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 15/12/2014 at 04:20, xxxxxxxx wrote:

        Hi,
        actually you are not talking about an icon, but you want to change the state of the menu entry (toggle between checked and unchecked).
        You can do this with MenuInitString(id, enabled, value). This can also be used to en-/disable a menu entry.
        See the docs here: Python SDK: GeDialog - MenuInitString[URL-REMOVED]


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 15/12/2014 at 06:26, xxxxxxxx wrote:

          I like to add a image to that type of menu item - possible ?

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 15/12/2014 at 09:59, xxxxxxxx wrote:

            Well, yes and no. !Wink[URL-REMOVED]
            I don't think there's a way to add an icon to a menu entry you install via MenuAddString().
            But what you can do is to implement your commands as CommandData plugin and then use MenuAddCommand(). In this way the menu entry will get the command's icon.


            [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              On 15/12/2014 at 10:18, xxxxxxxx wrote:

              This thread has an example of toggling between two images on a menu instead of using a check mark:

              https://developers.maxon.net/forum/topic/7462/9284_change-icon-based-on-state-in-commanddata&KW=state_a&PID=36789#36789

              -ScottA

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                On 15/12/2014 at 14:26, xxxxxxxx wrote:

                great solution !

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post