code tweaks based on Oscar's comment

This commit is contained in:
Kayla Man 2024-01-03 15:36:27 +08:00
parent 1795290f4d
commit 0734682faa

View file

@ -299,9 +299,9 @@ def reset_unit_scale():
"""
project_name = get_current_project_name()
settings = get_project_settings(project_name).get("max")
unit_scale_setting = settings.get("unit_scale_settings")
if unit_scale_setting:
scene_scale = unit_scale_setting["scene_unit_scale"]
scene_scale = settings.get("unit_scale_settings",
{}).get("scene_unit_scale")
if scene_scale:
rt.units.SystemType = rt.Name(scene_scale)