Import_3ds: Fixed mismatched letter in scene variable #104792

Merged
Sebastian Sille merged 37 commits from :main into main 2023-07-28 19:45:28 +02:00
2 changed files with 7 additions and 7 deletions
Showing only changes of commit 00636818a9 - Show all commits

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
@ -1538,7 +1538,7 @@ def save(operator, context, filepath="", scale_factor=1.0, unit_convert=False,
# Add MASTERSCALE element
mscale = _3ds_chunk(MASTERSCALE)
mscale.add_variable("scale", _3ds_float((1.0 / unit_measure)))
mscale.add_variable("scale", _3ds_float(1.0))
object_info.add_subchunk(mscale)
# Init main keyframe data chunk