On 08/01/2014 at 20:43, xxxxxxxx wrote:
Cinema 4D Version: 13,14,15
Platform: Windows ;
Language(s) : C++ ;
I want to resize an object, so that it's bounding box corresponds to another object's bounding box.
Vector vA = o_A->GetRad(); Vector vB = o_B->GetRad(); Real scaleX = vA.x / vB.x; Real scaleY = vA.y / vB.y; Real scaleZ = vA.z / vB.z; o_B->SetRelScale(Vector(scaleX, scaleY, scaleZ));
I assumed this would be one of the simplest tasks to carry out, but no.
When I manually scale an object in Cinema 4D, the scale remains 1 regardless. So I think that scaling is not the proper way to do this. Or is it?
So - this somehow works, but I would like to achieve the same programmatically, as when doing it directly in the C4D designer. And there scale is always 1 and remains 1. Is there a document setting?
BTW, there is no SetRad() function. I am clueless..
I see that when using "Object Mode" in C4D, scaling changes. When using "Modeling Mode", it does not. So doing the same with my C++ code, as when using the mouse in "Modeling mode", is probably what I am after.. I say "probably" because I am not sure what drawbacks the off value 1 scaling can lead to..