Skip to content
Merged
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
66 changes: 0 additions & 66 deletions editor/inspector/editor_inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1930,30 +1930,6 @@ Size2 EditorInspectorCategory::get_minimum_size() const {
return ms;
}

void EditorInspectorCategory::_collect_properties(const Object *p_object, LocalVector<String> &r_properties) const {
List<PropertyInfo> property_list;
p_object->get_property_list(&property_list, true);

String current_category;
for (const PropertyInfo &prop_info : property_list) {
if (prop_info.usage & PROPERTY_USAGE_GROUP) {
continue;
}
if (prop_info.usage & PROPERTY_USAGE_CATEGORY) {
current_category = prop_info.name;
continue;
}
if (!(prop_info.usage & PROPERTY_USAGE_EDITOR)) {
continue;
}
if (!current_category.ends_with(info.name)) {
continue;
}

r_properties.push_back(prop_info.name);
}
}

void EditorInspectorCategory::_handle_menu_option(int p_option) {
switch (p_option) {
case MENU_COPY_VALUE: {
Expand Down Expand Up @@ -2778,48 +2754,6 @@ void EditorInspectorSection::_update_popup() {
menu->set_item_disabled(MENU_PASTE_VALUE, EditorInspector::get_property_clipboard_type() != EditorInspector::PropertyClipboard::Type::SECTION);
}

void EditorInspectorSection::_collect_properties(LocalVector<String> &r_properties) const {
List<PropertyInfo> property_list;
object->get_property_list(&property_list, true);

String current_category;
String current_group;
String current_subgroup;
for (const PropertyInfo &prop_info : property_list) {
if (prop_info.usage & PROPERTY_USAGE_GROUP) {
current_group = prop_info.name;
continue;
}
if (prop_info.usage & PROPERTY_USAGE_SUBGROUP) {
current_subgroup = prop_info.name;
continue;
}
if (prop_info.usage & PROPERTY_USAGE_CATEGORY) {
current_category = prop_info.name;
if (!EditorNode::get_editor_data().is_type_recognized(prop_info.name) && ResourceLoader::exists(prop_info.hint_string, "Script")) {
Ref<Script> scr = ResourceLoader::load(prop_info.hint_string, "Script");
if (scr.is_valid()) {
current_category = scr->get_doc_class_name();
}
}
current_group = "";
current_subgroup = "";
continue;
}
if (!(prop_info.usage & PROPERTY_USAGE_EDITOR)) {
continue;
}
if (prop_info.name.get_slice_count("/") > 1) {
current_group = prop_info.name.get_slicec('/', 0);
}
if (!(current_category + "/" + current_group + "/" + current_subgroup).begins_with(get_inspector_path())) {
continue;
}

r_properties.push_back(prop_info.name);
}
}

void EditorInspectorSection::menu_option(int p_option) const {
switch (p_option) {
case MENU_COPY_VALUE: {
Expand Down
2 changes: 0 additions & 2 deletions editor/inspector/editor_inspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ class EditorInspectorCategory : public Control {

LocalVector<EditorProperty *> category_properties;

void _collect_properties(const Object *p_object, LocalVector<String> &r_properties) const;
void _handle_menu_option(int p_option);
void _popup_context_menu(const Point2i &p_position);
void _update_icon();
Expand Down Expand Up @@ -566,7 +565,6 @@ class EditorInspectorSection : public Container {
void update_property();

void _update_popup();
void _collect_properties(LocalVector<String> &r_properties) const;
void menu_option(int p_option) const;

void register_property(EditorProperty *p_property) { section_properties.push_back(p_property); }
Expand Down
Loading