diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-11 09:42:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-11 09:42:10 +0200 |
commit | 2ddb41a5d83cac464855c8f03564d98d5ef7794c (patch) | |
tree | 176b93cd5637fe97249f27c749833ac8a4d71e3c /editor | |
parent | 2d67eaf2c3480a4a56aab69e6e2b6c67e04fc821 (diff) | |
parent | 790a78273f1d7e0f3588e0aea789c3f1c92206c7 (diff) |
Merge pull request #27894 from nekomatata/fix-particle-errors
EditorFolding ignores hidden properties for folded resources
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_folding.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp index 77c0f7491e..783a2ce74b 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<PropertyInfo> plist; p_node->get_property_list(&plist); for (List<PropertyInfo>::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()) { - - PoolVector<String> res_unfolds = _get_unfolds(res.ptr()); - resource_folds.push_back(res->get_path()); - resource_folds.push_back(res_unfolds); - resources.insert(res); + 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<String> res_unfolds = _get_unfolds(res.ptr()); + resource_folds.push_back(res->get_path()); + resource_folds.push_back(res_unfolds); + resources.insert(res); + } } } } |