On 06/03/2018 at 01:50, xxxxxxxx wrote:
Cinema 4D Version: R19
Platform: Windows ;
Language(s) : C++ ;
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.
On 07/03/2018 at 01:27, xxxxxxxx wrote:
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.
On 07/03/2018 at 05:53, xxxxxxxx wrote:
I have tried but not getting the proper result.
On 07/03/2018 at 06:39, xxxxxxxx wrote:
Where are you doing this? Could you share some code?
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.
ocp.usecolor = 1;
ocp.color = Vector(0.5, 0.0, 0.0);
ocp.xray = FALSE;
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.
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.