I can not change the x dimension of an object I have created using this code:
import numpy as np
template_object = bpy.data.objects.get('Cube')
for y in range(3):
for x in range(5):
ob = template_object.copy()
ob.location.y = y*12
ob.location.x = x*12
width = np.random.randint(3,10)
height = np.random.randint(3,10)
print(ob.dimensions.x)
ob.dimensions.x = height
ob.dimensions.y = width
bpy.context.collection.objects.link(ob)
Is this a known issue like Problems with assigning dimensions through python script? Or I am doing something wrong?