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

    Add Child to description popup field.

    Cinema 4D SDK
    c++ r21
    2
    5
    833
    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.
    • O
      Ogers
      last edited by Ogers

      Hello. I am creating a parameter description with a popup field but I can not add childs to it. I know that in a GeDialog it is very straightforward AddChild(pop_up_ID,id,name).
      Also I managed to add child to a CycleButton CustomGui and I thought it would be very similar to this.

      BaseContainer bc = GetCustomDataTypeDefault(DTYPE_LONG);
      
      bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_CYCLEBUTTON);
      bc.SetString(DESC_NAME, "Cycle Button");
      bc.SetContainer(DESC_CYCLE, settings);
      return dc->SetParameter(DescLevel(id, DTYPE_LONG, 0), bc, group_id);
      

      where settings is the container that contains the item names for the cycle.
      What would be the equivalent of this for a popup field?
      I have tried some options but none of it worked. Also DESC_CYCLE would not work for the items of an popup field.

      BaseContainer bc = GetCustomDataTypeDefault(DTYPE_POPUP);
      
      bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_POPUP);
      //bc.SetString(DESC_NAME, "Pop Up Button");
      //bc.SetContainer(DESC_CYCLE, settings);
      return dc->SetParameter(DescLevel(id, DTYPE_POPUP, 0), bc, group_id);
      

      Thank you.

      1 Reply Last reply Reply Quote 0
      • O
        Ogers
        last edited by

        I found the solution. Seems that I had to use MSG_DESCRIPTION_POPUP message to fill the popup field.

        1 Reply Last reply Reply Quote 0
        • ManuelM
          Manuel
          last edited by

          hello,

          Are you creating your own custom parameter of using an existing one ?

          Cheers
          Manuel

          MAXON SDK Specialist

          MAXON Registered Developer

          1 Reply Last reply Reply Quote 0
          • O
            Ogers
            last edited by

            Hello. I am creating my own custom parameter.

            1 Reply Last reply Reply Quote 0
            • ManuelM
              Manuel
              last edited by

              hello,

              So yes, you have to react to MSG_DESCRIPTION_POPUP, you can see an example on the nodedata manual

              I thought first you wanted to create a popup menu.

              Cheers,
              Manuel

              MAXON SDK Specialist

              MAXON Registered Developer

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