summaryrefslogtreecommitdiffstats
path: root/scene/main/node.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2023-03-17 01:58:30 +0100
committerkobewi <kobewi4e@gmail.com>2023-03-22 23:57:12 +0100
commit8f8178bda6d74e09283df85d4cb34a52843e1892 (patch)
tree074fa921a80ff53da77c6f474c598a372665e0da /scene/main/node.cpp
parent0291fcd7b66bcb315a49c44de8031e5596de4216 (diff)
downloadredot-engine-8f8178bda6d74e09283df85d4cb34a52843e1892.tar.gz
Fix auto-translations in editor
Diffstat (limited to 'scene/main/node.cpp')
-rw-r--r--scene/main/node.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 62ce887c93..22bcfc947b 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2073,6 +2073,11 @@ bool Node::is_property_pinned(const StringName &p_property) const {
StringName Node::get_property_store_alias(const StringName &p_property) const {
return p_property;
}
+
+bool Node::is_part_of_edited_scene() const {
+ return Engine::get_singleton()->is_editor_hint() && is_inside_tree() && get_tree()->get_edited_scene_root() &&
+ (get_tree()->get_edited_scene_root() == this || get_tree()->get_edited_scene_root()->is_ancestor_of(this));
+}
#endif
void Node::get_storable_properties(HashSet<StringName> &r_storable_properties) const {