diff options
author | 风青山 <idleman@yeah.net> | 2024-04-09 20:41:16 +0800 |
---|---|---|
committer | 风青山 <idleman@yeah.net> | 2024-04-10 09:49:29 +0800 |
commit | 41f6a683b6dff3440e747c121b4fa9ff32a2fb5d (patch) | |
tree | b75ce7a00f6ea44b1917ff95ee2b4720fc1f3a87 /thirdparty/assimp/code/PostProcessing/ComputeUVMappingProcess.cpp | |
parent | 6c579280630715ff7da8310d405ef34194847294 (diff) | |
download | redot-engine-41f6a683b6dff3440e747c121b4fa9ff32a2fb5d.tar.gz |
Correctly replace scene root when `must_reload` in `EditorData::check_and_update_scene()`
We need to update the scene root in multiple singletons to ensure that
certain flags are correct. This is what `EditorNode::set_edited_scene()`
does.
Usually we use `replace_by` to complete the replacement of the scene
root. Call `EditorNode::set_edited_scene()` when the `replacing_by`
signal is emitted to set the new scene root. This is suitable when
using a single node to replace, which may be problematic if the
replacing node is a tree. Because during the call to `replace_by()`,
the new node and its child nodes will enter tree during `parent->
add_child(p_node)`, and later emits the `replacing_by` signal.
When the parent scene has to be reloaded because the child scene
changes and switches to the parent scene, there is no need to use
`replace_by()` since the scene's diffs are already saved.
Diffstat (limited to 'thirdparty/assimp/code/PostProcessing/ComputeUVMappingProcess.cpp')
0 files changed, 0 insertions, 0 deletions