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

    Make selectbox + Separatorline etc

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 301 Views
    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 Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 17/11/2011 at 17:35, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R12 
      Platform:   Windows  ;   
      Language(s) :

      ---------
      hi,
      I'm realy confused because i do not find any solution for my Problem. First of all I'm using C# wrapping  it with mono + swig to c++.
      anyways So That's what i got

      DescID cid = new DescID(new DescLevel(SCELETTEOBJECT_TYPE, C4dApi.DTYPE_LONG, 0));     
                BaseContainer bcArme = C4dApi.GetCustomDataTypeDefault(C4dApi.DTYPE_LONG);
                bcArme.SetString(C4dApi.DESC_NAME, "Arme");
                bcArme.SetLong(C4dApi.DESC_DEFAULT, 2);
             
        if (!descparams.Desc.SetParameter(cid, bcArme, new DescID(new DescLevel(C4dApi.ID_OBJECTPROPERTIES))))
                    return true;

      BaseContainer bcArme2 = C4dApi.GetCustomDataTypeDefault(C4dApi.DTYPE_LONG);                 
                bcArme2.SetString(C4dApi.DESC_NAME, "Finger");                                              
                bcArme2.SetLong(C4dApi.DESC_DEFAULT, 5);
                //bcAuswahl.SetString(C4dApi.DESC_DEFAULT, "st2");                                                     
                if (!descparams.Desc.SetParameter(cid, bcArme2, new DescID(new DescLevel(C4dApi.ID_OBJECTPROPERTIES))))
                    return true;

      BaseContainer bcSEP = C4dApi.GetCustomDataTypeDefault(C4dApi.DTYPE_SEPARATOR);                
                bcSEP.SetLong(C4dApi.DESC_SEPARATORLINE,C4dApi.DTYPE_SEPARATOR);
       if (!descparams.Desc.SetParameter(cid, bcSEP, new DescID(new DescLevel(C4dApi.ID_OBJECTPROPERTIES))))
                    return true;

      cid = new DescID(new DescLevel(CIRCLEOBJECT_CHECKME, C4dApi.DTYPE_BOOL, 0));
                BaseContainer bcCheck = C4dApi.GetCustomDataTypeDefault(C4dApi.DTYPE_BOOL);
                bcCheck.SetString(C4dApi.DESC_NAME, "Check");
                bcCheck.SetBool(C4dApi.DESC_DEFAULT, true);
                // Create the boolean check box under the previously created sub group (CIRCLEOBJECT_SUBGROUP)
                if (!descparams.Desc.SetParameter(cid, bcCheck, new DescID(new DescLevel(CIRCLEOBJECT_SUBGROUP))))
                    return true;

      I got the following Problems:

      • DESC_DEFAULT has no effect at all e.g. the checkbox, I set it as Defaul true if i open the plugin it's default
      • I do not get the Separator line
      • I Only get the last element @ ID_OBJECTPROPERTIES
      • No clue how to ad a selectbox (Like in the Editor if you Post you can select an Font such a Box I'm trying to accomplish)

      any Ideas?

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 18/11/2011 at 07:00, xxxxxxxx wrote:

        Hi,

        Originally posted by xxxxxxxx

        DESC_DEFAULT has no effect at all e.g. the checkbox, I set it as Defaul true if i open the plugin it's default

        I get the same behavior. I will investigate more on that.

        Originally posted by xxxxxxxx

        I do not get the Separator line

        Here is how to setup a separator:

        DescID cid = DescID(DescLevel(MY_SEPARATOR,DTYPE_SEPARATOR,0));
        if (!singleid || cid.IsPartOf(*singleid,NULL)) // important to check for speedup c4d!
        {
            BaseContainer bc = GetCustomDataTypeDefault(DTYPE_SEPARATOR);
            bc.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_SEPARATOR);
            bc.SetBool(DESC_SEPARATORLINE, TRUE);
            bc.SetLong(DESC_ANIMATE, DESC_ANIMATE_OFF);
            bc.SetBool(DESC_REMOVEABLE, FALSE);
            bc.SetString(DESC_NAME, "");
            bc.SetString(DESC_SHORT_NAME, "");
            
            if (!description->SetParameter(cid,bc,DescLevel(ID_OBJECTPROPERTIES))) return FALSE;
        }
        

        Originally posted by xxxxxxxx

        I Only get the last element @ ID_OBJECTPROPERTIES

        If understand, you only get the last parameter added ?

        Originally posted by xxxxxxxx

        No clue how to ad a selectbox (Like in the Editor if you Post you can select an Font such a Box I'm trying to accomplish)

        This is a ComboBox.

        Regards,

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 18/11/2011 at 08:22, xxxxxxxx wrote:

          First of all thank you I got now the Separator 😉
          Uhm yes i got only the last param but i solved it, I forgot to add for each element a new DescID

          Ok thanks for the hint comboBox I know now what Ive to google for 😉

          Update: OK I got it 😉
          It wasn't ComboBox I had to look for it was CYCLE 😉
          Anways Thank you VERY MUCH again!!!

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