io_scene_3ds: Changed unit convert to apply units #104777

Merged
Sebastian Sille merged 13 commits from :main into main 2023-07-25 18:44:03 +02:00
2 changed files with 6 additions and 6 deletions

View File

@ -176,9 +176,9 @@ class Export3DS(bpy.types.Operator, ExportHelper):
soft_min=0.0, soft_max=100000.0,
default=1.0,
)
unit_convert: BoolProperty(
name="Convert Units",
description="Converts to scene unit length settings",
apply_unit: BoolProperty(
name="Apply Units",
description="Take the scene unit length settings into account",
default=False,
)
use_selection: BoolProperty(
@ -264,7 +264,7 @@ class MAX3DS_PT_export_transform(bpy.types.Panel):
operator = sfile.active_operator
layout.prop(operator, "scale_factor")
layout.prop(operator, "unit_convert")
layout.prop(operator, "apply_unit")
layout.prop(operator, "axis_forward")
layout.prop(operator, "axis_up")

View File

@ -1489,7 +1489,7 @@ def make_ambient_node(world):
# EXPORT #
##########
def save(operator, context, filepath="", scale_factor=1.0, unit_convert=False,
def save(operator, context, filepath="", scale_factor=1.0, apply_unit=False,
use_selection=False, use_hierarchy=False, write_keyframe=False, global_matrix=None):
"""Save the Blender scene to a 3ds file."""
@ -1503,7 +1503,7 @@ def save(operator, context, filepath="", scale_factor=1.0, unit_convert=False,
world = scene.world
unit_measure = 1.0
if unit_convert:
if apply_unit:
unit_length = sce.unit_settings.length_unit
if unit_length == 'KILOMETERS':
unit_measure = 0.001