From 644de52ca938ddcedbb8356b16508d895cb1c0b7 Mon Sep 17 00:00:00 2001 From: willnationsdev Date: Sat, 28 Sep 2019 22:27:10 -0500 Subject: [PATCH] Add script class categories to EditorInspector. --- editor/editor_inspector.cpp | 104 ++++++++++++++++++++++++++++++++++-- editor/editor_inspector.h | 1 + editor/editor_node.cpp | 2 - 3 files changed, 102 insertions(+), 5 deletions(-) diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index a8ded443239d..cc58a0d5a089 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -1504,9 +1504,9 @@ void EditorInspector::update_tree() { String subgroup_base; VBoxContainer *category_vbox = nullptr; - List - plist; + List plist; object->get_property_list(&plist, true); + _update_script_class_properties(*object, plist); HashMap item_path; Map section_map; @@ -1572,7 +1572,28 @@ void EditorInspector::update_tree() { category_vbox = nullptr; //reset String type = p.name; - category->icon = EditorNode::get_singleton()->get_class_icon(type, "Object"); + if (!ClassDB::class_exists(type) && !ScriptServer::is_global_class(type) && p.hint_string.length() && FileAccess::exists(p.hint_string)) { + Ref