bound_box error

Hello to all.
I’m trying to get the bound_box of a plane, and all goes well while I would not change the dimensions to it, because the change still gives me the same bound_box
What can I do? :eyebrowlift2:
Thanks in advance.

bound_box is a read only attribute.

Yes, I know that bound_box is a read only attribute, but when the object changes its size, should not also change the bound_box? :confused:

sometimes you need to do a bpy.context.scene.update(), maybe ?

Post a short script describing what isn’t working, you’ll probably figure it out yourself.

for example, with this script:

import bpy
a = bpy.context.active_object.bound_box
for [x,y,z] in a:

the bound_box matrix not change with 2x2 plane or 10x10 plane
what happens?

you should apply the scale transformation to the mesh…

Or just use the dimensions of the object, not the bounding box.

import bpy

x = bpy.context.active_object.dimensions[0]
y = bpy.context.active_object.dimensions[1]
z = bpy.context.active_object.dimensions[2]


my friend I saw that I have only solution, use dimensions, because for using bound_box transformations to object will be execute in edit mode

hehe Atom! or

x, y, z = bpy.context.active_object.dimensions