diff options
author | Saracen <SaracenOne@gmail.com> | 2024-08-27 05:26:54 +0100 |
---|---|---|
committer | Saracen <SaracenOne@gmail.com> | 2024-09-08 03:12:47 +0100 |
commit | 86ce15fb7ac1b416d39403ee8226b1a573bc4ec0 (patch) | |
tree | 49c54f4aad0e9939beda3ac2d931bd1235f05e35 /scene/resources/packed_scene.cpp | |
parent | 61598c5c88d95b96811d386cb20d714c35f4c6d7 (diff) | |
download | redot-engine-86ce15fb7ac1b416d39403ee8226b1a573bc4ec0.tar.gz |
Make reimported models reimport their owner.
Changes the behaviour of the scene hot-reload system
so that if the scene which needs to be reimported is
owned by another instance, reload that instance instead.
Diffstat (limited to 'scene/resources/packed_scene.cpp')
-rw-r--r-- | scene/resources/packed_scene.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 27db65bb1a..f93070aea6 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -1267,25 +1267,6 @@ Ref<SceneState> SceneState::get_base_scene_state() const { return Ref<SceneState>(); } -void SceneState::update_instance_resource(String p_path, Ref<PackedScene> p_packed_scene) { - ERR_FAIL_COND(p_packed_scene.is_null()); - - for (const NodeData &nd : nodes) { - if (nd.instance >= 0) { - if (!(nd.instance & FLAG_INSTANCE_IS_PLACEHOLDER)) { - int instance_id = nd.instance & FLAG_MASK; - Ref<PackedScene> original_packed_scene = variants[instance_id]; - if (original_packed_scene.is_valid()) { - if (original_packed_scene->get_path() == p_path) { - variants.remove_at(instance_id); - variants.insert(instance_id, p_packed_scene); - } - } - } - } - } -} - int SceneState::find_node_by_path(const NodePath &p_node) const { ERR_FAIL_COND_V_MSG(node_path_cache.is_empty(), -1, "This operation requires the node cache to have been built."); |