Skip to content

Commit 4808c25

Browse files
committed
Fix light values on blend import when using non-physical light units
1 parent 0c51ede commit 4808c25

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

modules/gltf/editor/editor_scene_importer_blend.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ Node *EditorSceneFormatImporterBlend::import_scene(const String &p_path, uint32_
146146
parameters_map["export_keep_originals"] = unpack_original_images;
147147
parameters_map["export_format"] = "GLTF_SEPARATE";
148148
parameters_map["export_yup"] = true;
149+
parameters_map["export_import_convert_lighting_mode"] = "COMPAT";
149150

150151
if (p_options.has(SNAME("blender/nodes/custom_properties")) && p_options[SNAME("blender/nodes/custom_properties")]) {
151152
parameters_map["export_extras"] = true;

modules/gltf/extensions/gltf_light.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ Light3D *GLTFLight::to_node() const {
182182
return nullptr;
183183
}
184184
light->set_color(color.linear_to_srgb());
185+
light->set_param(Light3D::PARAM_ATTENUATION, 2.0);
185186
return light;
186187
}
187188

0 commit comments

Comments
 (0)