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

    CustomGui DescID [SOLVED]

    SDK Help
    0
    8
    648
    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 06/08/2015 at 01:10, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R16 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Greetings !

      I have created a custom gui and i use it in resource file as:
      LONG UPPER_MENU { CUSTOMGUI INTERACTIVE_AREA; }
      LONG .... { CUSTOMGUI INTERACTIVE_AREA; }
      LONG .... { CUSTOMGUI INTERACTIVE_AREA; }
      LONG .... { CUSTOMGUI INTERACTIVE_AREA; }
      LONG LOWER_MENU { CUSTOMGUI INTERACTIVE_AREA; }

      How can i get the values each menu ID in the constructor of the customgui subclass?
      I use many menus that way and i want to handle them differently during creation.

      Cosntructor:
      MyCustomGui::MyCustomGui(const BaseContainer &settings,CUSTOMGUIPLUGIN *t_plugin)

      I need something like String str=settings.GetString(DESC_IDENT); but this one returns the string.
      I need the DescID. I looked at the ids i can pass but no one returns what i want.

      Thank you very much for your time.

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

        On 06/08/2015 at 01:19, xxxxxxxx wrote:

        you can do this through a CustomDataType connected to your CustomGui, at least this is what I've done in my case and works fine.

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

          On 06/08/2015 at 02:17, xxxxxxxx wrote:

          Hello.

          The function getCustomDataType needs the id of an element as parameter.

          What I need to find is this ID.

          I have many elements defined as:
          LONG MY_MENU { CUSTOMGUI INTERACTIVE_AREA; }
          I need the value of MY_MENU  inside the constructor of interactive area custom gui.

          Thank you.

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

            On 07/08/2015 at 02:19, xxxxxxxx wrote:

            sorry for the late reply.
            now I kinda understand what you want to do, you wanna react in your user area depending on the MY_MENU integer value.

            check this, done by Niklas, https://github.com/nr-plugins/example-tristate-gui/tree/e090322e5ff3aca795254d74e1021213d7cf39e5

            here is the highlighted interesting area, https://github.com/nr-plugins/example-tristate-gui/blob/e090322e5ff3aca795254d74e1021213d7cf39e5/src/TriStateGui.cpp#L195-L233

            m_ua is a member, representing your user area, and here it can "see" what the value is, so you can react according to this.

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

              On 07/08/2015 at 03:36, xxxxxxxx wrote:

              Hi,

              I'm not sure, it is a good idea to react on specific description IDs in a CustomGUI. After all the CustomGUI can be used for every description parameter of a given type. So you can't actually know in advance for which IDs the CustomGUI will be used.
              Instead I propose to have a CustomProperty on the CustomGUI, where an integer can be specified to choose the desired behavior.

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

                On 07/08/2015 at 04:01, xxxxxxxx wrote:

                @Andreas, this is one of the reasons I made my CustomGui hidden "only me can use it" , and used it privately inside my CustomDataType

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

                  On 26/08/2015 at 10:06, xxxxxxxx wrote:

                  @peterakos: Have you been able to get going?

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

                    On 26/08/2015 at 13:30, xxxxxxxx wrote:

                    Greetings !
                    Yes i have managed to find a workaround to my problem.
                    Thank you very much.

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