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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    R21 CommandData with option - not working on macOS

    Cinema 4D SDK
    3
    11
    1.8k
    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.
    • C4DSC
      C4DS
      last edited by r_gigante

      I am updating an R20 plugin to work with R21.
      The CommandData has changed, and requires an additional argument in most of its methods. Fine!
      Plugin is updated and is available in the "Extensions" menu of R21.
      However, in R20 it was available as an entry with a cog wheel behind it, since I had registered the CommandData as:

      RegisterCommandPlugin(PLUGINID, GeLoadString(IDS_PLUGINNAME), PLUGINFLAG_COMMAND_OPTION_DIALOG, AutoBitmap("plugin.png"_s), "pluginname"_s, NewObjClear(PluginCommand));
      

      I first converted the R20 code to R21 on Windows, and ran Cinema4D in debug. I didn't notice the cogwheel missing on Windows, it still might be the case, I just have currently no possibility to check it. However, now on macOS it is obviously missing.

      Worst is that I seem to be unable to access CommandData::Execute() as selecting the plugin entry in the "Extensions" always seems to bring up the option dialog window, thus actually performing CommandData::ExecuteOptionID().
      When I assign a shortcut to the plugin without the "option" checked, then hitting the shortcut will perform the CommandData::Execute().

      This is on High Sierra, with a freshly installed R21.026 (this exact morning).

      Will need to cross check what happens on Windows 10 ...

      1 Reply Last reply Reply Quote 0
      • C4DSC
        C4DS
        last edited by

        Just checked on Windows, the cogwheel is present using R21.022 and after upgrading to R21.026 cogwheel is still available on Windows.
        So is this a macOS thing only ?

        1 Reply Last reply Reply Quote 0
        • C4DSC
          C4DS
          last edited by

          I have modified the subject line in order to better indicate there's an issue on macOS. Also added the "issue" tag.
          As it has been 5 days without any feedback, I am starting to fear that this is yet another one that cannot be reproduced ...

          1 Reply Last reply Reply Quote 0
          • r_giganteR
            r_gigante
            last edited by

            Hi Daniel, first and foremost I apologize for the delay getting back here. It simply slipped through our daily checking for a few days and we're indeed grateful to you for having reported the focus on it.

            With regard to the reported behavior I confirm that it's a limitation we already know and it appears only on macOS when the Cinema 4D top menu bar is embedded in the macOS menu bar.

            If Cinema runs with its own top menu bar, the issue doesn't occur.

            What instead looks like a bug to me is that when Cinema uses the macOS menu bar, clicking on the command doesn't fire the Execute() method but rather the ExecuteOptionID() with the subid parameter equal to 0. On the opposite when Cinema uses its own top menu bar clicking on the command just fires the Execute() as expected.
            I'm going to file a bug report and see how it evolves.

            Best, Riccardo

            C4DSC 1 Reply Last reply Reply Quote 1
            • C4DSC
              C4DS @r_gigante
              last edited by

              @r_gigante
              Thanks for confirming the issue.
              Should I leave the topic open until a bugfix is provided, or need I close it since not much more can be done at this point in time?

              A question on the side, for documentation purposes:
              Is a solution being looked at, in order to provide a work around to the known limitation, or provide an alternative way of having the CommandData option available?

              r_giganteR 1 Reply Last reply Reply Quote 0
              • r_giganteR
                r_gigante @C4DS
                last edited by

                @C4DS said in R21 CommandData with option - not working on macOS:

                Is a solution being looked at, in order to provide a work around to the known limitation, or provide an alternative way of having the CommandData option available?

                If I properly understood your question, for the time being, the workaround should take in consideration that when the command is called from the "Extension" menu (on Cinema uses macOS menu bar as its menu bar) the value of the subid parameter is zero.

                Hope it makes sense (but I might have misunderstood your comment)

                Cheers, R

                C4DSC 1 Reply Last reply Reply Quote 0
                • C4DSC
                  C4DS @r_gigante
                  last edited by

                  @r_gigante
                  Good to know to check with value zero, but that isn't exactly what I meant.

                  You see, when user has the default layout with "Extension" menu part of the macOS menu, at that point the user has no possibility to launch the plugin via the cog wheel.
                  What I thus meant: is MAXON looking to bring back a way to show and use the cog wheel when using the macOS menu. Or is there a way for the user to launch the plugin with or without option (assuming the macOS menu is used).

                  1 Reply Last reply Reply Quote 0
                  • r_giganteR
                    r_gigante
                    last edited by

                    Hi Daniel,

                    for the time being I see three options:

                    • run Cinema with its own menu bar;
                    • drag out the menù containing your CommandData in order to make the cogwheel appear
                    • use keyboard modifiers:
                      • Alt + LMB -> lunches CommandData::Execute()
                      • LMB -> lunches CommandData::ExecuteOptionID()

                    Best, Riccardo

                    1 Reply Last reply Reply Quote 1
                    • P
                      ph1lh00k
                      last edited by

                      Hi @r_gigante ,

                      Has this issue been resolved yet?

                      Thanks,
                      Phil

                      1 Reply Last reply Reply Quote 0
                      • r_giganteR
                        r_gigante
                        last edited by

                        Hi @ph1lh00k , no update so far

                        Cheers, R

                        P 1 Reply Last reply Reply Quote 0
                        • P
                          ph1lh00k @r_gigante
                          last edited by

                          Ok, thanks @r_gigante... I'll keeping going with the workaround.

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