Skip to content

Commit

Permalink
gdtf: Improved method to check dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
nrgsille76 authored Jul 27, 2024
1 parent 18629bd commit c1c81e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdtf.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def loadModel(profile, model):
load_3ds(file_name, bpy.context, FILTER={'MESH'}, KEYFRAME=False, APPLY_MATRIX=False)
obj_dimension = Vector((model.length, model.width, model.height))
for ob in bpy.context.selected_objects:
if obj_dimension.to_tuple(3) != ob.dimensions.to_tuple(3):
if ob.dimensions.to_tuple(3) > obj_dimension.to_tuple(3):
ob.data.transform(Matrix.Scale(0.001, 4))
except Exception as e:
DMX_Log.log.error(f"Error loading a 3DS file {e}")
Expand Down

0 comments on commit c1c81e8

Please sign in to comment.