summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-28 14:17:24 +0200
committerGitHub <noreply@github.com>2022-03-28 14:17:24 +0200
commitabbb0dc08245e14510fff9163449ff6ae65da1ba (patch)
treec80d5dfb8a336de4b9556a2e928ce85e762a7063
parent41d075de5865c8b088c83219431661bc2d1f1802 (diff)
parent5371009d8efbeee7b272b76de6534cad567fc60a (diff)
Merge pull request #59548 from akien-mga/obj-remove-unused-categories
-rw-r--r--core/core_bind.cpp5
-rw-r--r--core/core_bind.h1
-rw-r--r--core/doc_data.h2
-rw-r--r--core/io/ip.h1
-rw-r--r--core/io/resource.h1
-rw-r--r--core/io/stream_peer.h1
-rw-r--r--core/io/stream_peer_tcp.h1
-rw-r--r--core/object/class_db.cpp9
-rw-r--r--core/object/class_db.h3
-rw-r--r--core/object/object.h18
-rw-r--r--core/os/main_loop.h1
-rw-r--r--doc/classes/ClassDB.xml7
-rw-r--r--scene/3d/collision_shape_3d.h1
-rw-r--r--scene/3d/light_3d.h1
-rw-r--r--scene/3d/node_3d.h1
-rw-r--r--scene/3d/visual_instance_3d.h1
-rw-r--r--scene/animation/animation_player.h1
-rw-r--r--scene/gui/control.h1
-rw-r--r--scene/main/node.h1
19 files changed, 1 insertions, 56 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index 8b060b09f9..706395afa9 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -2093,10 +2093,6 @@ int ClassDB::get_integer_constant(const StringName &p_class, const StringName &p
return c;
}
-StringName ClassDB::get_category(const StringName &p_node) const {
- return ::ClassDB::get_category(p_node);
-}
-
bool ClassDB::has_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance) const {
return ::ClassDB::has_enum(p_class, p_name, p_no_inheritance);
}
@@ -2168,7 +2164,6 @@ void ClassDB::_bind_methods() {
::ClassDB::bind_method(D_METHOD("class_get_enum_constants", "class", "enum", "no_inheritance"), &ClassDB::get_enum_constants, DEFVAL(false));
::ClassDB::bind_method(D_METHOD("class_get_integer_constant_enum", "class", "name", "no_inheritance"), &ClassDB::get_integer_constant_enum, DEFVAL(false));
- ::ClassDB::bind_method(D_METHOD("class_get_category", "class"), &ClassDB::get_category);
::ClassDB::bind_method(D_METHOD("is_class_enabled", "class"), &ClassDB::is_class_enabled);
}
diff --git a/core/core_bind.h b/core/core_bind.h
index 2942f54a15..907f37c5fa 100644
--- a/core/core_bind.h
+++ b/core/core_bind.h
@@ -605,7 +605,6 @@ public:
PackedStringArray get_integer_constant_list(const StringName &p_class, bool p_no_inheritance = false) const;
bool has_integer_constant(const StringName &p_class, const StringName &p_name) const;
int get_integer_constant(const StringName &p_class, const StringName &p_name) const;
- StringName get_category(const StringName &p_node) const;
bool has_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance = false) const;
PackedStringArray get_enum_list(const StringName &p_class, bool p_no_inheritance = false) const;
diff --git a/core/doc_data.h b/core/doc_data.h
index 9286b843be..194a39a729 100644
--- a/core/doc_data.h
+++ b/core/doc_data.h
@@ -152,7 +152,7 @@ public:
struct ClassDoc {
String name;
String inherits;
- String category;
+ String category; // FIXME: Wrongly used by VisualScriptPropertySelector, should be removed.
String brief_description;
String description;
Vector<TutorialDoc> tutorials;
diff --git a/core/io/ip.h b/core/io/ip.h
index ab00b7b0a6..ebd944a949 100644
--- a/core/io/ip.h
+++ b/core/io/ip.h
@@ -38,7 +38,6 @@ struct _IP_ResolverPrivate;
class IP : public Object {
GDCLASS(IP, Object);
- OBJ_CATEGORY("Networking");
public:
enum ResolverStatus {
diff --git a/core/io/resource.h b/core/io/resource.h
index b1e1c15541..8068000f32 100644
--- a/core/io/resource.h
+++ b/core/io/resource.h
@@ -48,7 +48,6 @@ private:
class Resource : public RefCounted {
GDCLASS(Resource, RefCounted);
- OBJ_CATEGORY("Resources");
public:
static void register_custom_data_to_otdb() { ClassDB::add_resource_base_extension("res", get_class_static()); }
diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h
index e71941b7e1..4609e52aa2 100644
--- a/core/io/stream_peer.h
+++ b/core/io/stream_peer.h
@@ -39,7 +39,6 @@
class StreamPeer : public RefCounted {
GDCLASS(StreamPeer, RefCounted);
- OBJ_CATEGORY("Networking");
protected:
static void _bind_methods();
diff --git a/core/io/stream_peer_tcp.h b/core/io/stream_peer_tcp.h
index f2c47b25cf..bf49cc8a5f 100644
--- a/core/io/stream_peer_tcp.h
+++ b/core/io/stream_peer_tcp.h
@@ -38,7 +38,6 @@
class StreamPeerTCP : public StreamPeer {
GDCLASS(StreamPeerTCP, StreamPeer);
- OBJ_CATEGORY("Networking");
public:
enum Status {
diff --git a/core/object/class_db.cpp b/core/object/class_db.cpp
index 51ca06d9d2..fd86a02b90 100644
--- a/core/object/class_db.cpp
+++ b/core/object/class_db.cpp
@@ -1556,15 +1556,6 @@ bool ClassDB::is_class_exposed(const StringName &p_class) {
return ti->exposed;
}
-StringName ClassDB::get_category(const StringName &p_node) {
- ERR_FAIL_COND_V(!classes.has(p_node), StringName());
-#ifdef DEBUG_ENABLED
- return classes[p_node].category;
-#else
- return StringName();
-#endif
-}
-
void ClassDB::add_resource_base_extension(const StringName &p_extension, const StringName &p_class) {
if (resource_base_extensions.has(p_extension)) {
return;
diff --git a/core/object/class_db.h b/core/object/class_db.h
index 4211601d15..b8a4b3ea2b 100644
--- a/core/object/class_db.h
+++ b/core/object/class_db.h
@@ -109,7 +109,6 @@ public:
Set<StringName> methods_in_properties;
List<MethodInfo> virtual_methods;
Map<StringName, MethodInfo> virtual_methods_map;
- StringName category;
Map<StringName, Vector<Error>> method_error_values;
#endif
HashMap<StringName, PropertySetGet> property_setget;
@@ -331,8 +330,6 @@ public:
static Vector<Error> get_method_error_return_values(const StringName &p_class, const StringName &p_method);
static Variant class_get_default_property_value(const StringName &p_class, const StringName &p_property, bool *r_valid = nullptr);
- static StringName get_category(const StringName &p_node);
-
static void set_class_enabled(const StringName &p_class, bool p_enable);
static bool is_class_enabled(const StringName &p_class);
diff --git a/core/object/object.h b/core/object/object.h
index 41365cfe51..dbaf9f13fd 100644
--- a/core/object/object.h
+++ b/core/object/object.h
@@ -344,16 +344,6 @@ public:
m_inherits::get_inheritance_list_static(p_inheritance_list); \
p_inheritance_list->push_back(String(#m_class)); \
} \
- static String get_category_static() { \
- String category = m_inherits::get_category_static(); \
- if (_get_category != m_inherits::_get_category) { \
- if (!category.is_empty()) { \
- category += "/"; \
- } \
- category += _get_category(); \
- } \
- return category; \
- } \
virtual bool is_class(const String &p_class) const override { \
if (_get_extension() && _get_extension()->is_class(p_class)) { \
return true; \
@@ -454,12 +444,6 @@ protected:
\
private:
-#define OBJ_CATEGORY(m_category) \
-protected: \
- _FORCE_INLINE_ static String _get_category() { return m_category; } \
- \
-private:
-
#define OBJ_SAVE_TYPE(m_class) \
public: \
virtual String get_save_class() const override { return #m_class; } \
@@ -590,7 +574,6 @@ protected:
virtual void _get_property_listv(List<PropertyInfo> *p_list, bool p_reversed) const {};
virtual void _notificationv(int p_notification, bool p_reversed) {}
- static String _get_category() { return ""; }
static void _bind_methods();
bool _set(const StringName &p_name, const Variant &p_property) { return false; };
bool _get(const StringName &p_name, Variant &r_property) const { return false; };
@@ -694,7 +677,6 @@ public:
static String get_class_static() { return "Object"; }
static String get_parent_class_static() { return String(); }
- static String get_category_static() { return String(); }
virtual String get_class() const {
if (_extension) {
diff --git a/core/os/main_loop.h b/core/os/main_loop.h
index a6a32f0138..2bb1ea2ef4 100644
--- a/core/os/main_loop.h
+++ b/core/os/main_loop.h
@@ -38,7 +38,6 @@
class MainLoop : public Object {
GDCLASS(MainLoop, Object);
- OBJ_CATEGORY("Main Loop");
Ref<Script> initialize_script;
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index 835588b293..43210de686 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -23,13 +23,6 @@
Returns whether the specified [code]class[/code] is available or not.
</description>
</method>
- <method name="class_get_category" qualifiers="const">
- <return type="StringName" />
- <argument index="0" name="class" type="StringName" />
- <description>
- Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required.
- </description>
- </method>
<method name="class_get_enum_constants" qualifiers="const">
<return type="PackedStringArray" />
<argument index="0" name="class" type="StringName" />
diff --git a/scene/3d/collision_shape_3d.h b/scene/3d/collision_shape_3d.h
index bd5595f974..fbcabf6529 100644
--- a/scene/3d/collision_shape_3d.h
+++ b/scene/3d/collision_shape_3d.h
@@ -37,7 +37,6 @@
class CollisionObject3D;
class CollisionShape3D : public Node3D {
GDCLASS(CollisionShape3D, Node3D);
- OBJ_CATEGORY("3D Physics Nodes");
Ref<Shape3D> shape;
diff --git a/scene/3d/light_3d.h b/scene/3d/light_3d.h
index 81c25f01c3..383fa644e5 100644
--- a/scene/3d/light_3d.h
+++ b/scene/3d/light_3d.h
@@ -35,7 +35,6 @@
class Light3D : public VisualInstance3D {
GDCLASS(Light3D, VisualInstance3D);
- OBJ_CATEGORY("3D Light Nodes");
public:
enum Param {
diff --git a/scene/3d/node_3d.h b/scene/3d/node_3d.h
index 65d0e071cf..6d857a83ea 100644
--- a/scene/3d/node_3d.h
+++ b/scene/3d/node_3d.h
@@ -50,7 +50,6 @@ public:
class Node3D : public Node {
GDCLASS(Node3D, Node);
- OBJ_CATEGORY("3D");
public:
enum RotationEditMode {
diff --git a/scene/3d/visual_instance_3d.h b/scene/3d/visual_instance_3d.h
index 1c044ba681..f8fd4378fe 100644
--- a/scene/3d/visual_instance_3d.h
+++ b/scene/3d/visual_instance_3d.h
@@ -35,7 +35,6 @@
class VisualInstance3D : public Node3D {
GDCLASS(VisualInstance3D, Node3D);
- OBJ_CATEGORY("3D Visual Nodes");
RID base;
RID instance;
diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h
index c4fc69f370..a68f6b9d5b 100644
--- a/scene/animation/animation_player.h
+++ b/scene/animation/animation_player.h
@@ -62,7 +62,6 @@ public:
class AnimationPlayer : public Node {
GDCLASS(AnimationPlayer, Node);
- OBJ_CATEGORY("Animation Nodes");
public:
enum AnimationProcessCallback {
diff --git a/scene/gui/control.h b/scene/gui/control.h
index 9f78d003ae..4240d52b65 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -44,7 +44,6 @@ class Panel;
class Control : public CanvasItem {
GDCLASS(Control, CanvasItem);
- OBJ_CATEGORY("GUI Nodes");
public:
enum Anchor {
diff --git a/scene/main/node.h b/scene/main/node.h
index f5fbcf6587..196d23c14f 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -43,7 +43,6 @@ class PropertyTweener;
class Node : public Object {
GDCLASS(Node, Object);
- OBJ_CATEGORY("Nodes");
public:
enum ProcessMode {