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

Fix 3D scene preview generation. #47172

Merged
merged 1 commit into from
May 4, 2021
Merged

Fix 3D scene preview generation. #47172

merged 1 commit into from
May 4, 2021

Conversation

CaptainProton42
Copy link
Contributor

The previous check for creating a preview image for 3D scenes erroneously evaluated to false when no actual editor feature profile was set in the editor which means no preview images for 3D scenes were created in the file system dock at all.

I fixed the check so 3D scene previews will now correctly generate when no feature profile is set.

This applies to current master as well as the current 3.x branch.

This fixes #47171.

@YuriSizov
Copy link
Contributor

I'm not sure this is a good solution. As unlikely as it can be that we disable 3D by default, this check shouldn't rely on a feature being on without actually checking for it. Default profile should still be a profile.

@CaptainProton42
Copy link
Contributor Author

Is there a proper way to check for which features are enabled by default when no profile is set?

If I understand this snippet of code correctly, the check for whether to display the 3D editor at all is done in the same way:

main_editor_buttons[EDITOR_3D]->set_visible(true);

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I share @pycbouh's concern but this is better than the current status anyway, and we're unlikely to disable 3D by default in the future.

@akien-mga
Copy link
Member

Needs a rebase, otherwise should be good to merge.

@akien-mga akien-mga added cherrypick:3.3 cherrypick:3.x Considered for cherry-picking into a future 3.x release labels May 4, 2021
File system dock previews will now be generated for 3D scenes when no
editor feature profile is set.
@CaptainProton42
Copy link
Contributor Author

I share @pycbouh's concern but this is better than the current status anyway, and we're unlikely to disable 3D by default in the future.

I also agree, but I don't see another way of doing this right now.

Anyways, I rebased on top of current master!

@akien-mga akien-mga merged commit 4dacd22 into godotengine:master May 4, 2021
@akien-mga
Copy link
Member

Thanks!

@CaptainProton42 CaptainProton42 deleted the fix-3d-scene-preview branch May 4, 2021 16:05
@akien-mga
Copy link
Member

Cherry-picked for 3.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label May 5, 2021
@akien-mga
Copy link
Member

Cherry-picked for 3.3.1.

@AgasferLukich
Copy link

Hello. Many thanks. Thanks to everyone who took part in solving this problem. This thing is already working in 3.3.1 rc and I am very happy.

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

Successfully merging this pull request may close these issues.

Missing file system dock preview thumbnail for 3D scenes
4 participants