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

    Restricting a Command to a GeDialog

    SDK Help
    0
    13
    1.7k
    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
      Helper
      last edited by

      On 05/12/2016 at 09:13, xxxxxxxx wrote:

      Hm, I'm not sure you need to anything special for a manager dialog to appear in that list.
      You register your command, which hosts the dialog just as usual. And in the command you implement the usual suspects Execute() (opening the dialog, passing the ID of the command plugin) and RestoreLayout() (well, restoring the layout).
      At least for this seems to be enough to make my manager appear in the "Restrict to" list in Customize Commands.

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

        On 28/04/2017 at 00:53, xxxxxxxx wrote:

        Thanks for this information, it was really useful.
        However, I don't seem to get my CommandData plugin in the list of restriction.
        Should I see the string, used to register the plugin, in the restriction list?
        Currently I only see an "Tool Overwrite" entry at the bottom of the list. Don't know if this is present by default, or as a result of some plugins?

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

          On 28/04/2017 at 02:29, xxxxxxxx wrote:

          I have to admit, I gave wrong (or at least incomplete) information here. Very, very sorry!
          A bit surprised Kostas didn't get back to me on this... he must have run into the same issue. Sorry, Kostas, please don't hesitate to bug me, if my information seems wrong.

          The point is, you also need to use RegisterManagerInformation() with the command ID you use to open the manager dialog.

          Again, I apologize to everyone getting confused by my above posts.

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

            On 28/04/2017 at 03:05, xxxxxxxx wrote:

            Andreas, thanks for the update. Although it was mentioned in previous messages, I missed that bit about the need to use RegisterManagerInformation().

            Just wondering what the 3rd parameter actually represents (the manager's info flags: PLUGINFLAG), not sure I understand its purpose.

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

              On 28/04/2017 at 05:32, xxxxxxxx wrote:

              Just pass a 0 for the info parameter. Maybe one could use it to hide this manager for example from the restriction list. But I really don't know and due to upcoming FMX and MAXON DevMeeting, I'm unfortunately lacking the time to dig into it. If you want me to investigate, please ask me in two weeks again.

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

                On 01/05/2017 at 01:54, xxxxxxxx wrote:

                No need to dig deeper into the PLUGINFLAG right now. I'm fine using 0.

                However, further testing shortcuts I noticed a problem, which I am not sure is my mistake, or simply a limitation of the SDK.

                I have multiple plugins (tools and commands) which I wanted to see listed in a particular order in the plugin menu. For this I used the "#$n" in the stringtable, with increasing values for n, according to the requested sorting.
                When I assign a multi key shortcut (example Q~S) via the customize command, this "#$n" is shown in front of the plugin string, in the multi-key popup window when I press "Q".
                While in the menu, the "#$n" isn't shown.

                Is there something I am still missing? Or is this a limitation/feature/bug?

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

                  On 01/05/2017 at 04:48, xxxxxxxx wrote:

                  Hi,

                  I think, it's best to open a new thread for the last question. In this way, Yannick or Riccardo will see the question (otherwise they might think, I'm working on it).

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

                    On 01/05/2017 at 06:10, xxxxxxxx wrote:

                    Will do.

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

                      On 03/05/2017 at 08:19, xxxxxxxx wrote:

                      Hi Andreas
                      No worries, it wasn't a super important feature to get working, more in the "nice-to-have" category.

                      @C4DS,  not sure if it was the same issue as the one I was seeing, but make sure you leave a space after the "#$n", otherwise some parts of C4D will treat that as part of the description of the command.

                      Cheers
                      K.

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

                        On 03/05/2017 at 11:37, xxxxxxxx wrote:

                        Adding a space doesn't help.
                        But the issue with the "#$n"showing in the popup window has already been confirmed to be a bug (see separate thread).

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