Get size of an object (bounding box) [SOLVED]

On 08/12/2014 at 07:11, xxxxxxxx wrote:


I try to write a short script in cinema 4d R14 in Python.
I want to get the size of an object in a c4d scene (Polygon Object). For that I used:

bc = obj.GetDataInstance()

The Output is always (0,0,0) and I dont know why. I am not sure, if c4d.PRIM_CUB_LEN is the size of the bounding box but I could not find something else than that.
Would be cool if someone has a clue/ idea :)

On 08/12/2014 at 08:06, xxxxxxxx wrote:

Hello and welcome,

PRIM_CUBE_LEN is a parameter of a parametric cube object. So you won't find this parameter in a polygon object's BaseContainer.

The size of an object's bounding box is returned by GetRad(), it's center by GetMp().

best wishes,

On 08/12/2014 at 08:21, xxxxxxxx wrote:

That's it! :) Thanks a lot!

On 22/09/2015 at 11:56, xxxxxxxx wrote:

If the object's size changes (e.g., animated spline), how do I get the size for each frame without stepping through the animation frame range?
Do I need to change the scene frame?



On 23/09/2015 at 00:28, xxxxxxxx wrote:


you can animate a single object using AnimateObject(). Then you can get the object's bounding box. If the state of the object does not only depend on its own animation but also on other components like expressions you have to animate the while document using ExecutePasses().

Best wishes,