With the default scene with the cube selected, consider this script:
import bpy
bpy.context.active_object.dimensions = (10,10,10)
bpy.context.active_object.matrix_world.translation = (1,1,1)
This code should make the sides of the cube 10 meters long, and then move it. However, the dimension change is ignored. If I reverse the order of the statements, it works. Also if I run the statements separately, they work. Is this a bug or is there something more I need to do? I tried to call
bpy.context.collection.objects.update()
between the statements, without any effect. I am creating a plugin where I have to change the dimensions first before moving an object, so reversing the order of the statements is not a feasible fix in my case.
T @ S @ matrix_worldis the result. – batFINGER Aug 13 '21 at 10:55matrix_world. – Martin Aug 16 '21 at 08:30