-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Make default main screen plugin work even if 2D and 3D are disabled in editor features #41036
Conversation
12f5134
to
2a3b56d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change also gives us the opportunity to allow disabling the 2D main screen in addition to the others (currently in 3.2 and master it is force-enabled), since now the logic is no longer dependent on either the 2D or 3D main screens being enabled. The 2D viewport is not necessary in a variety of situations (ex: making command line apps in Godot, making 3D game prototypes without a GUI, making 2.5D games with the 2.5D main screen plugin, etc). This can be done in a follow-up PR (EDIT: #41038).
For this PR in particular, defaulting to 3D (as in current 3.2 and master) is rather arbitrary, so I guess it makes sense to default to whatever the first item in the list is unless someone has a reason against this. Even if we want to keep 3D as the default, the logic should still be changed to be similar to this PR, so that there are more fallbacks available.
2a3b56d
to
c0d52bf
Compare
I love it! I think this is a great idea and has little risk of breaking things. That being said, this impacts what users see everytime they open the engine, so this really needs to be discussed in a proposal and shared around a bit before we decide what to do. |
c0d52bf
to
0d948fe
Compare
I confirm the usefulness of this PR, I once fixed a bug caused by having 3D main screen on a 2D project as default back in the days of 3.1: #25491. |
Proposal: godotengine/godot-proposals#1352 |
0d948fe
to
9a832fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Godot usage polls made in 2020, ~75-80% of users are focused on 2D. Therefore, I think this is a good change for now. It's likely that this share will remain above 50% for the foreseeable future.
We can cherry-pick this to the 3.x
branch after 3.3 is released.
I just found this piece of code (inside READY of EditorNode): Lines 589 to 593 in 166a6d0
I think it's no longer relevant after this change? |
Yeah, but it's relevant for this PR not the follow-up. We can't assume the other PR will get merged. |
I'm against this PR, I work with a lot of 3D projects and everytime I make a new scene I must have to change to 3D, so please don't change this. |
@sairam4123 If you click the new scene button, it keeps the same main screen you're in. This only affects new projects. |
Still I have to change back to 3D everytime, I create a new project for prototype. |
@sairam4123 When you click the "3D Scene" button in a new project, it will switch to 3D automatically. You don't have to manually switch to 3D. This only affects new projects before you create a node for the first scene (or if the root is "Node"). |
At some point this was discussed some years ago, and the result of the discussion was that it should be kept 3D because it looks cool when opening the engine compared to the emptiness of the 2D editor. After all, when you add the right node by creating a new scene it eventually moves to the right editor. I made a new poll to corroborate this feeling with the community, and it seems this is still the overwhelming predominant opinion: As such, I think this Pull Request and associated proposal should be closed. |
It was also discussed that it doesn't matter at all, because the only thing that it changes is what you see when you open a new project for the very first time. The poll you just posted is biased towards 3D and most people voting don't even understand what the change is really about and why it was brought up (from the beginning it was about removing a hard-coded editor switch and making the code simpler/more generic). |
Even if we decide to show 3d by default, this PR highly simplifies the code and also supports disabling both 2d and 3d |
@nathanfranke Yes. We can modify this PR to show 3D by default but also include the rest of the changes here that make the code more flexible. That way it will be more likely to be merged since it keeps the 3D-is-default status quo. |
bfbe60c
to
404a11d
Compare
404a11d
to
9954544
Compare
Thanks! |
Note that 2D can not yet be disabled in editor features. This is a precursor to #41038
This was based on a request here by @itsraineing:> I would recommend that either the default (eg when creating a new scene) be changed to 2D, or the 3D tab moved to be the first; it's always stricken me as a bit odd that the editor defaults to the second tab.This PR changes the default main screen plugin to the first one that is enabled. Typically, 2DBefore:After:Bugsquad edit: Closes godotengine/godot-proposals#1352