You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
Groundbreaking!! Godot resources can now be flagged to be local to the scene being edited!
This means that each time this scene is instanced, the resource will be unique! As such, thanks to this, the following features were implemented: -ButtonGroup is no longer a control, it's now a resource local to the scene -ViewportTexture can be created from the editor and set to any object, making ViewportSprite and other kind of nodes obsolete!
This commit is contained in:
@@ -3745,7 +3745,7 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
|
||||
sdata->set_path(lpath,true); //take over path
|
||||
}
|
||||
|
||||
Node*new_scene=sdata->instance(true);
|
||||
Node*new_scene=sdata->instance(PackedScene::GEN_EDIT_STATE_MAIN);
|
||||
|
||||
if (!new_scene) {
|
||||
|
||||
@@ -5365,8 +5365,15 @@ void EditorNode::_bind_methods() {
|
||||
|
||||
}
|
||||
|
||||
static Node* _resource_get_edited_scene() {
|
||||
|
||||
return EditorNode::get_singleton()->get_edited_scene();
|
||||
}
|
||||
|
||||
EditorNode::EditorNode() {
|
||||
|
||||
Resource::_get_local_scene_func=_resource_get_edited_scene;
|
||||
|
||||
VisualServer::get_singleton()->textures_keep_original(true);
|
||||
|
||||
EditorHelp::generate_doc(); //before any editor classes are crated
|
||||
|
||||
Reference in New Issue
Block a user