Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/object/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,8 @@ void Object::get_property_list(List<PropertyInfo> *p_list, bool p_reversed) cons
}

for (const KeyValue<StringName, Variant> &K : metadata) {
PropertyInfo pi = PropertyInfo(K.value.get_type(), "metadata/" + K.key.string());
const uint32_t meta_usage = K.key.string().begins_with("_") ? PROPERTY_USAGE_NO_EDITOR : PROPERTY_USAGE_DEFAULT;
PropertyInfo pi = PropertyInfo(K.value.get_type(), "metadata/" + K.key.string(), PROPERTY_HINT_NONE, "", meta_usage);
if (K.value.get_type() == Variant::OBJECT) {
pi.hint = PROPERTY_HINT_RESOURCE_TYPE;
Object *obj = K.value;
Expand Down
7 changes: 3 additions & 4 deletions editor/inspector/editor_inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ bool EditorInspector::_resource_properties_matches(const Ref<Resource> &p_resour

continue;

} else if (p.name.begins_with("metadata/_") || !(p.usage & PROPERTY_USAGE_EDITOR) || _is_property_disabled_by_feature_profile(p.name) ||
} else if (!(p.usage & PROPERTY_USAGE_EDITOR) || _is_property_disabled_by_feature_profile(p.name) ||
(p_filter.is_empty() && restrict_to_basic && !(p.usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) {
// Ignore properties that are not supposed to be in the inspector.
continue;
Expand Down Expand Up @@ -4584,8 +4584,7 @@ void EditorInspector::update_tree() {
List<PropertyInfo>::Element *N = E_property->next();
bool valid = true;
while (N) {
if (!N->get().name.begins_with("metadata/_") && N->get().usage & PROPERTY_USAGE_EDITOR &&
(!filter.is_empty() || !restrict_to_basic || (N->get().usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) {
if (N->get().usage & PROPERTY_USAGE_EDITOR && (!filter.is_empty() || !restrict_to_basic || (N->get().usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) {
break;
}
// Treat custom categories as second-level ones. Do not skip a normal category if it is followed by a custom one.
Expand Down Expand Up @@ -4657,7 +4656,7 @@ void EditorInspector::update_tree() {

continue;

} else if (p.name.begins_with("metadata/_") || !(p.usage & PROPERTY_USAGE_EDITOR) || _is_property_disabled_by_feature_profile(p.name) ||
} else if (!(p.usage & PROPERTY_USAGE_EDITOR) || _is_property_disabled_by_feature_profile(p.name) ||
(filter.is_empty() && restrict_to_basic && !(p.usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) {
// Ignore properties that are not supposed to be in the inspector.
continue;
Expand Down
Loading