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

    how to write description "Coordinates"

    Cinema 4D SDK
    c++ r20
    3
    6
    1.2k
    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.
    • M
      mike
      last edited by mike

      hi,
      how to write description "Coordinates"? i use 9 independent data to accept it but it looks like error(see R.H,no alignment).
      aim:1.PNG
      my:2.PNG

      hope your help!

      1 Reply Last reply Reply Quote 0
      • M
        mp5gosu
        last edited by

        Hey mike,

        you can use a parent group with 3 columns layout and then for each column, put it into a speparate group to maintain constant width.

        M 1 Reply Last reply Reply Quote 1
        • M
          mike @mp5gosu
          last edited by

          @mp5gosu Thank you! is useful☺

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

            hello,

            thanks @mp5gosu for the answer.

            To add something here, you can have a look at the file r_info_manager.res, that's the coordinate manager. This have to be reproduce the same way in a CreateLayout.

            On a description, things are a bit easier you can use a customGUI CUSTOMGUI_SUBDESCRIPTION
            on the .res file juste add this line

            VECTOR ID_BASEOBJECT_REL_POSITION { UNIT METER;  CUSTOMGUI SUBDESCRIPTION; }
            

            on the GetDDescription you juste add a vector and specify the customGUI to use

            		DescID cid = DescLevel(vectorID, DTYPE_VECTOR, 0);
            			// check if this parameter ID is requested (NOTE: this check is important for speed)
            			if (!singleid || cid.IsPartOf(*singleid, nullptr))
            			{
            				// define the new parameter description
            				BaseContainer settings = GetCustomDataTypeDefault(DTYPE_VECTOR);
            				settings.SetString(DESC_NAME, "A vector"_s);
            				settings.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_SUBDESCRIPTION);
            			
            				// set the new parameter
            				if (!description->SetParameter(cid, settings, ID_OBJECTPROPERTIES))
            					return false;
            			}
            

            Of course, you can add vector in userData the same way.

            
                bc = c4d.GetCustomDataTypeDefault(c4d.DTYPE_VECTOR)
                bc.SetString(c4d.DESC_NAME, "Parameter Name")    # displayed in the Xpresso "Object" node
                bc.SetString(c4d.DESC_SHORT_NAME, "Short Name")  # displayed in the Attribute Manager
                bc.SetInt32(c4d.DESC_CUSTOMGUI, c4d.CUSTOMGUI_SUBDESCRIPTION)
            
            
                op.AddUserData(bc)
            

            Cheers
            Manuel

            MAXON SDK Specialist

            MAXON Registered Developer

            M 1 Reply Last reply Reply Quote 2
            • M
              mp5gosu
              last edited by mp5gosu

              @m_magalhaes Huh, nice. But is this documented somewhere?

              edit: Nevermind, found it. 🙂

              1 Reply Last reply Reply Quote 0
              • M
                mike @Manuel
                last edited by

                @m_magalhaes thank you for your answer 🙂

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