Import_3ds: Improved aspect calculation #104815
@ -1541,12 +1541,18 @@ def save(operator, context, filepath="", scale_factor=1.0, use_scene_unit=False,
|
||||
unit_measure = 1.0
|
||||
if use_scene_unit:
|
||||
unit_length = scene.unit_settings.length_unit
|
||||
if unit_length == 'KILOMETERS':
|
||||
if unit_length == 'MILES':
|
||||
unit_measure = 0.000621371
|
||||
elif unit_length == 'KILOMETERS':
|
||||
unit_measure = 0.001
|
||||
elif unit_length == 'INCHES':
|
||||
unit_measure = 39.37007874
|
||||
elif unit_length == 'CENTIMETERS':
|
||||
unit_measure = 100
|
||||
elif unit_length == 'MILLIMETERS':
|
||||
unit_measure = 1000
|
||||
elif unit_length == 'THOU':
|
||||
unit_measure = 39370.07874
|
||||
elif unit_length == 'MICROMETERS':
|
||||
unit_measure = 1000000
|
||||
|
||||
|
@ -1475,12 +1475,18 @@ def load_3ds(filepath, context, CONSTRAIN=10.0, UNITS=False, IMAGE_SEARCH=True,
|
||||
|
||||
if UNITS:
|
||||
unit_length = scn.unit_settings.length_unit
|
||||
if unit_length == 'KILOMETERS':
|
||||
if unit_length == 'MILES':
|
||||
MEASURE = 1609.344
|
||||
elif unit_length == 'KILOMETERS':
|
||||
MEASURE = 1000.0
|
||||
elif unit_length == 'INCHES':
|
||||
MEASURE = 0.3048
|
||||
elif unit_length == 'CENTIMETERS':
|
||||
MEASURE = 0.01
|
||||
elif unit_length == 'MILLIMETERS':
|
||||
MEASURE = 0.001
|
||||
elif unit_length == 'THOU':
|
||||
MEASURE = 0.0000254
|
||||
elif unit_length == 'MICROMETERS':
|
||||
MEASURE = 0.000001
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user