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

    Size of empty polygon object is not increased.

    SDK Help
    0
    7
    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.
    • H
      Helper
      last edited by

      On 06/03/2018 at 01:50, xxxxxxxx wrote:

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

      ---------
      Hi Everyone,

      I have created empty polygon object using the below code.

      BaseObject* const polygonobj = BaseObject::Alloc(Opolygon);

      The plane is created successfully but its size always showing 0. I have tried to increase the size but I don't get the proper result. Please give me some idea why it is not increasing.

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

        On 07/03/2018 at 01:27, xxxxxxxx wrote:

        Hi,

        Your code is maybe just lacking a call to Message(MSG_UPDATE) after the polygon object is changed.
        Rounded Tube SDK example calls it like this.

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

          On 07/03/2018 at 05:53, xxxxxxxx wrote:

          I have tried but not getting the proper result.

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

            On 07/03/2018 at 06:39, xxxxxxxx wrote:

            Where are you doing this? Could you share some code?

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

              On 07/03/2018 at 09:29, xxxxxxxx wrote:

              Thank you so much, Yannick Puech. Just now the issue is resolved. I have changed the value of the Cpolygon parameters. I have one more doubt there is any special API to change the color of material that is applied on texture tag. I have found some code to change the color of the object but it is not working with texture tag. I am copying the sample code.

              ObjectColorProperties ocp;

              ocp.usecolor = 1;
              
              
              ocp.color = Vector(0.5, 0.0, 0.0);
              
              
              ocp.xray = FALSE;
              
              
              cubeObject->SetColorProperties(&ocp);
              
              
              cubeObject->Message(MSG_UPDATE);
              
              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

                On 08/03/2018 at 04:12, xxxxxxxx wrote:

                As you mentioned, you have a material applied. And of course, you'll have to change the diffuse color of the material (either color channel or PBR->Reflectance channel, Diffuse base layer color)
                Your object does have a texture tag applied, so you are able to access the linked material via GetMaterial().

                From there, you are able to alter the materials' parameters.

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

                  On 08/03/2018 at 06:40, xxxxxxxx wrote:

                  ObjectColorProperties is used for object's Display Color parameter.
                  As already explained by mp5gosu, to change the color of the material applied to an object, access the material from its TextureTag.

                  If you have any other question related to another topic different than the original, please post a new thread.

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