Get size of an object (bounding box) [SOLVED]
-
On 08/12/2014 at 07:11, xxxxxxxx wrote:
Hi!
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()
bc.GetVector(c4d.PRIM_CUBE_LEN)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
[URL-REMOVED] is a parameter of a parametric cube object. So you won't find this parameter in a polygon object'sBaseContainer
[URL-REMOVED].The size of an object's bounding box is returned by
GetRad()
[URL-REMOVED], it's center byGetMp()
[URL-REMOVED].best wishes,
Sebastian
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
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?Thanks,
Chris
-
On 23/09/2015 at 00:28, xxxxxxxx wrote:
Hello,
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,
Sebastian