Fixed array operator bug after 75f56462b (related to #2905)

This commit is contained in:
Andrej730
2023-03-28 18:16:42 +05:00
parent 75c98e5b00
commit fbd57a2bd7
+5 -2
View File
@@ -444,8 +444,11 @@ class Model(blenderbim.core.tool.Model):
)
new_matrix = obj.matrix_world.copy()
current_obj_offset = obj.matrix_world @ offset if array["use_local_space"] else offset
new_matrix.col[3] = (obj.matrix_world.col[3].to_3d() + current_obj_offset).to_4d()
if array["use_local_space"]:
current_obj_translation = obj.matrix_world @ offset
else:
current_obj_translation = obj.matrix_world.col[3].to_3d() + offset
new_matrix.col[3] = current_obj_translation.to_4d()
child_obj.matrix_world = new_matrix
children_objs.append(child_obj)
children_elements.append(child_element)