From 790a78273f1d7e0f3588e0aea789c3f1c92206c7 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Wed, 10 Apr 2019 12:11:14 +0200 Subject: [PATCH] EditorFolding ignores hidden properties for folded resources (fixes #26663) --- editor/editor_folding.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp index 77c0f7491ea..783a2ce74bd 100644 --- a/editor/editor_folding.cpp +++ b/editor/editor_folding.cpp @@ -112,14 +112,16 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p List plist; p_node->get_property_list(&plist); for (List::Element *E = plist.front(); E; E = E->next()) { - if (E->get().type == Variant::OBJECT) { - RES res = p_node->get(E->get().name); - if (res.is_valid() && !resources.has(res) && res->get_path() != String() && !res->get_path().is_resource_file()) { + if (E->get().usage & PROPERTY_USAGE_EDITOR) { + if (E->get().type == Variant::OBJECT) { + RES res = p_node->get(E->get().name); + if (res.is_valid() && !resources.has(res) && res->get_path() != String() && !res->get_path().is_resource_file()) { - PoolVector res_unfolds = _get_unfolds(res.ptr()); - resource_folds.push_back(res->get_path()); - resource_folds.push_back(res_unfolds); - resources.insert(res); + PoolVector res_unfolds = _get_unfolds(res.ptr()); + resource_folds.push_back(res->get_path()); + resource_folds.push_back(res_unfolds); + resources.insert(res); + } } } }