Extract editor run toolbar into its own component

- Simplify and update its logic.
- Simplify EditorScript.
- Improve EditorNode and other relevant includes.
- Fix scene-based path in the movie writer when
reloading a scene.
This commit is contained in:
Yuri Sizov
2023-04-12 21:02:28 +02:00
parent 27253f3eb2
commit 8a74d8438f
37 changed files with 771 additions and 538 deletions

View File

@ -713,6 +713,16 @@ int EditorData::get_edited_scene() const {
return current_edited_scene;
}
int EditorData::get_edited_scene_from_path(const String &p_path) const {
for (int i = 0; i < edited_scene.size(); i++) {
if (edited_scene[i].path == p_path) {
return i;
}
}
return -1;
}
void EditorData::set_edited_scene(int p_idx) {
ERR_FAIL_INDEX(p_idx, edited_scene.size());
current_edited_scene = p_idx;