Skip to content

Conversation

@vaner-org
Copy link
Contributor

@vaner-org vaner-org commented Jun 18, 2025

This PR is #96268 updated to current master, with additional features to make it more like "Play This Scene"

  1. If the scene is already main scene or the selected scene has no root, then the option is greyed out.
  2. If the scene is unsaved, the scene is saved and then set as main scene.

set-main-scene-tab-menu

I'm unsure how best to credit @altamkp, please let me know if adding him as co-author is enough.
Closes #10587.

@vaner-org vaner-org requested review from a team as code owners June 18, 2025 02:23
@AThousandShips AThousandShips changed the title Adds "Set as Main Scene" option to EditorSceneTabs context menu Add "Set as Main Scene" option to EditorSceneTabs context menu Jun 18, 2025
@AThousandShips AThousandShips added this to the 4.x milestone Jun 18, 2025
@KoBeWi
Copy link
Member

KoBeWi commented Jun 18, 2025

The new option does not update FileSystem immediately. It still shows the previous scene as main until something refreshes it.

@vaner-org vaner-org force-pushed the set-tab-as-main-scene branch from a2bd719 to 2ab70e8 Compare June 18, 2025 22:59
@vaner-org
Copy link
Contributor Author

vaner-org commented Jun 18, 2025

Added calls to FileSystemDock's update_all function, hope it isn't overkill, should be ok now. Seems setting it from the project settings doesn't update the FileSystem either, so I'd never noticed the accent on the main scene.

@vaner-org vaner-org force-pushed the set-tab-as-main-scene branch from 2ab70e8 to 95ba0c9 Compare June 20, 2025 15:03
@vaner-org vaner-org force-pushed the set-tab-as-main-scene branch from 95ba0c9 to 9b62845 Compare June 20, 2025 15:25
@vaner-org
Copy link
Contributor Author

Much appreciated @KoBeWi.

@KoBeWi KoBeWi modified the milestones: 4.x, 4.6 Jun 20, 2025
@vaner-org vaner-org force-pushed the set-tab-as-main-scene branch from 9b62845 to 391f286 Compare June 20, 2025 16:43
@vaner-org vaner-org force-pushed the set-tab-as-main-scene branch from 391f286 to 94a9f7d Compare June 20, 2025 17:12
@vaner-org vaner-org force-pushed the set-tab-as-main-scene branch from 94a9f7d to 6c0149e Compare September 16, 2025 18:24
@vaner-org vaner-org requested a review from a team as a code owner September 16, 2025 18:24
@Repiteo
Copy link
Contributor

Repiteo commented Nov 14, 2025

Needs rebase

@vaner-org vaner-org force-pushed the set-tab-as-main-scene branch 2 times, most recently from 544ec51 to b6fa059 Compare November 14, 2025 20:30
Copy link
Contributor

@Repiteo Repiteo left a comment

Choose a reason for hiding this comment

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

Looks like transient includes were changed since this was originally made. Should be fixed pretty easily by adding the GLOBAL_GET header:

Adds the option to quickly set main scene by right-clicking a scene tab. If the scene has no root, then the option is greyed out. If the scene is unsaved, the file is saved and then set as main scene.

Co-Authored-By: Alex Tam <[email protected]>
@vaner-org vaner-org force-pushed the set-tab-as-main-scene branch from b6fa059 to 8aea513 Compare November 15, 2025 03:54
@vaner-org vaner-org requested a review from Repiteo November 15, 2025 05:16
@Repiteo Repiteo merged commit f00cf63 into godotengine:master Nov 17, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 17, 2025

Thanks!

@aaronfranke
Copy link
Member

This PR caused a regression: #112894

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.

Add "Set as Main Scene" to EditorSceneTabs context menu

5 participants