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

    show subchannels from GetDDescription() [SOLVED]

    SDK Help
    0
    9
    837
    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 07/05/2015 at 15:11, xxxxxxxx wrote:

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

      ---------
      I want to show subchannels "like in coordinate interface for any object" , so if I have 3 vectors they appear in 3 columns instead of 3 rows.

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

        On 08/05/2015 at 00:08, xxxxxxxx wrote:

        Hi Mohamed,

        To place description parameters in columns use LAYOUTGROUP flag followed by the number of columns in the current GROUP. See Obase  description resource file to understand how "Coordinates" group is built for objects.
        If you need to do that dynamically set DESC_LAYOUTGROUP and DESC_COLUMNS in the description container for the added group.

        Also if it's not the case you'd have to set CUSTOMGUI_SUBDESCRIPTION for DESC_CUSTOMGUI in the description container for the added parameters so that the vectors component are shown in line layout.

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

          On 08/05/2015 at 04:44, xxxxxxxx wrote:

          thanks Yannick. I think I missed CUSTOMGUI_SUBDSCRIPTION when I was reading the header!! "shame on me"

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

            On 09/05/2015 at 13:31, xxxxxxxx wrote:

            when I did this

            bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_SUBDESCRIPTION);
            

            it works, but when I change any value of x or y or z, all 3 change, any idea what causes this?

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

              On 11/05/2015 at 00:24, xxxxxxxx wrote:

              Originally posted by xxxxxxxx

              when I did this

              bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_SUBDESCRIPTION);
              

              it works, but when I change any value of x or y or z, all 3 change, any idea what causes this?

              How is the parameter declared? In the resource file or dynamically in GetDDescription()?
              Please provide the resource file or GetDDescription() definition/declaration.

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

                On 11/05/2015 at 01:43, xxxxxxxx wrote:

                it is in GetDDescription()

                					cid = DescLevel(ids, DTYPE_VECTOR, 0);
                					if (!singleid || cid.IsPartOf(*singleid, nullptr))// important to check for speedup c4d!
                					{
                						BaseContainer dt = GetCustomDataTypeDefault(DTYPE_VECTOR);
                						std::string dName = kndData->nodes[kndData->selectedNode].getInputDataName(i);
                						String dtName(dName.c_str());
                						dt.SetString(DESC_SHORT_NAME, dtName);
                						dt.SetString(DESC_NAME, dtName);
                						dt.SetBool(DESC_ANIMATE, DESC_ANIMATE_ON);
                						dt.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_SUBDESCRIPTION);
                						//dt.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_VECTOR);
                						if (!description->SetParameter(cid, dt, DescLevel(Tbaselist2d)))
                							return true;
                					}
                
                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

                  On 11/05/2015 at 01:53, xxxxxxxx wrote:

                  the whole code can be found here, https://developers.maxon.net/forum/topic/8706/11403_huge-problem-with-getddescription-solved

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

                    On 11/05/2015 at 08:55, xxxxxxxx wrote:

                    You need to call the macro HandleDescSetVector() in SetDParameter() so that the components are set as expected.
                    See datatype.cpp SDK example and  ExampleDataTypeClass::SetDParameter() use of HandleDescSetVector().

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

                      On 16/05/2015 at 10:06, xxxxxxxx wrote:

                      Hi Yannick,

                      I tested it and it works great , thanks.
                      you can mark this as solved

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