Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Blend file import doesn't handle lights #59748

Closed
timshannon opened this issue Mar 31, 2022 · 4 comments · Fixed by #59753
Closed

New Blend file import doesn't handle lights #59748

timshannon opened this issue Mar 31, 2022 · 4 comments · Fixed by #59753

Comments

@timshannon
Copy link

Godot version

v4.0.alpha.mono.custom_build [a647fb3]

System information

Ubuntu 21.04 using Blender 3.1.1

Issue description

I was testing out the new Blend file import added here: #54886 and it works great, except lights don't seem to get imported, even when Punctual Lights are selected in the import settings.

The same issue does not apply when using GLTF files directly.

Steps to reproduce

Start a new project with the new blend import option enabled and the editor setting path set to the blender executable.

Import any blender scene with lights. The default import settings include punctual lights, however disabling or enabling them seems to have no impact.

Minimal reproduction project

Bug.zip

@timshannon
Copy link
Author

Also, I assume once this is working we'll still have the same issue with GLTF punctual light attenuation described here: #54596

@fire
Copy link
Member

fire commented Mar 31, 2022

Weird. Let me see. @lentsius-bark demoed it working live in a discord call.

@fire
Copy link
Member

fire commented Mar 31, 2022

It's a small typo.

> git diff
diff --git a/modules/gltf/editor/editor_scene_importer_blend.cpp b/modules/gltf/editor/editor_scene_importer_blend.cpp
index 2587c095e1d..337a1e981aa 100644
--- a/modules/gltf/editor/editor_scene_importer_blend.cpp
+++ b/modules/gltf/editor/editor_scene_importer_blend.cpp
@@ -85,7 +85,7 @@ Node *EditorSceneFormatImporterBlend::import_scene(const String &p_path, uint32_
        } else {
                parameters_arg += "export_cameras=False,";
        }
-       if (p_options.has(SNAME("blender/nodes/lights")) && p_options[SNAME("blender/nodes/lights")]) {
+       if (p_options.has(SNAME("blender/nodes/punctual_lights")) && p_options[SNAME("blender/nodes/punctual_lights")]) {
                parameters_arg += "export_lights=True,";
        } else {
                parameters_arg += "export_lights=False,";

@fire
Copy link
Member

fire commented Mar 31, 2022

After the diff.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants