Skip to content

Commit fbfd5f8

Browse files
committed
Merge pull request #108356 from neonmoe/fix-incorrect-light-values-for-blender-imports
Fix incorrect light values on blend import
2 parents 3d84b78 + 4808c25 commit fbfd5f8

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)