summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-11-10 22:06:30 +0100
committerGitHub <noreply@github.com>2021-11-10 22:06:30 +0100
commit68664c02398e443617ba4d6f3ad9691087ce7e5c (patch)
treec0f5e266ec4263fcccb5e1329432e6de6673cdfb /editor/plugins
parent7b3abf17fdde312eb8ae85924e511f30bce4ea3b (diff)
parent2e4d18c92926b15188fc479e3fa432a453b45df8 (diff)
Merge pull request #54836 from pycbouh/inspector-plugins-fixes-and-groups
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/ot_features_plugin.cpp6
-rw-r--r--editor/plugins/ot_features_plugin.h2
-rw-r--r--editor/plugins/root_motion_editor_plugin.cpp12
-rw-r--r--editor/plugins/root_motion_editor_plugin.h2
-rw-r--r--editor/plugins/style_box_editor_plugin.cpp7
-rw-r--r--editor/plugins/style_box_editor_plugin.h2
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp12
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h2
8 files changed, 4 insertions, 41 deletions
diff --git a/editor/plugins/ot_features_plugin.cpp b/editor/plugins/ot_features_plugin.cpp
index fd42bce06e..c949621e28 100644
--- a/editor/plugins/ot_features_plugin.cpp
+++ b/editor/plugins/ot_features_plugin.cpp
@@ -185,12 +185,6 @@ bool EditorInspectorPluginOpenTypeFeatures::can_handle(Object *p_object) {
return (Object::cast_to<Control>(p_object) != nullptr);
}
-void EditorInspectorPluginOpenTypeFeatures::parse_begin(Object *p_object) {
-}
-
-void EditorInspectorPluginOpenTypeFeatures::parse_category(Object *p_object, const String &p_parse_category) {
-}
-
bool EditorInspectorPluginOpenTypeFeatures::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
if (p_path == "opentype_features/_new") {
OpenTypeFeaturesAdd *editor = memnew(OpenTypeFeaturesAdd);
diff --git a/editor/plugins/ot_features_plugin.h b/editor/plugins/ot_features_plugin.h
index dbafa3bbf6..add491ed48 100644
--- a/editor/plugins/ot_features_plugin.h
+++ b/editor/plugins/ot_features_plugin.h
@@ -86,8 +86,6 @@ class EditorInspectorPluginOpenTypeFeatures : public EditorInspectorPlugin {
public:
virtual bool can_handle(Object *p_object) override;
- virtual void parse_begin(Object *p_object) override;
- virtual void parse_category(Object *p_object, const String &p_parse_category) override;
virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
};
diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp
index ed91f174d1..0f3c50a861 100644
--- a/editor/plugins/root_motion_editor_plugin.cpp
+++ b/editor/plugins/root_motion_editor_plugin.cpp
@@ -271,11 +271,7 @@ EditorPropertyRootMotion::EditorPropertyRootMotion() {
//////////////////////////
bool EditorInspectorRootMotionPlugin::can_handle(Object *p_object) {
- return true; //can handle everything
-}
-
-void EditorInspectorRootMotionPlugin::parse_begin(Object *p_object) {
- //do none
+ return true; // Can handle everything.
}
bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
@@ -288,9 +284,5 @@ bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, const Var
return true;
}
- return false; //can be overridden, although it will most likely be last anyway
-}
-
-void EditorInspectorRootMotionPlugin::parse_end() {
- //do none
+ return false;
}
diff --git a/editor/plugins/root_motion_editor_plugin.h b/editor/plugins/root_motion_editor_plugin.h
index 1484af62e8..c05975b6c3 100644
--- a/editor/plugins/root_motion_editor_plugin.h
+++ b/editor/plugins/root_motion_editor_plugin.h
@@ -64,9 +64,7 @@ class EditorInspectorRootMotionPlugin : public EditorInspectorPlugin {
public:
virtual bool can_handle(Object *p_object) override;
- virtual void parse_begin(Object *p_object) override;
virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
- virtual void parse_end() override;
};
#endif // ROOT_MOTION_EDITOR_PLUGIN_H
diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp
index 91c5e96f08..1c7f319280 100644
--- a/editor/plugins/style_box_editor_plugin.cpp
+++ b/editor/plugins/style_box_editor_plugin.cpp
@@ -44,13 +44,6 @@ void EditorInspectorPluginStyleBox::parse_begin(Object *p_object) {
add_custom_control(preview);
}
-bool EditorInspectorPluginStyleBox::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, bool p_wide) {
- return false; //do not want
-}
-
-void EditorInspectorPluginStyleBox::parse_end() {
-}
-
void StyleBoxPreview::edit(const Ref<StyleBox> &p_stylebox) {
if (stylebox.is_valid()) {
stylebox->disconnect("changed", callable_mp(this, &StyleBoxPreview::_sb_changed));
diff --git a/editor/plugins/style_box_editor_plugin.h b/editor/plugins/style_box_editor_plugin.h
index 8ca348bd80..d82e5ab05e 100644
--- a/editor/plugins/style_box_editor_plugin.h
+++ b/editor/plugins/style_box_editor_plugin.h
@@ -61,8 +61,6 @@ class EditorInspectorPluginStyleBox : public EditorInspectorPlugin {
public:
virtual bool can_handle(Object *p_object) override;
virtual void parse_begin(Object *p_object) override;
- virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
- virtual void parse_end() override;
};
class StyleBoxEditorPlugin : public EditorPlugin {
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index c7c6b9b0ee..f87b1c2be1 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -5187,11 +5187,7 @@ EditorPropertyShaderMode::EditorPropertyShaderMode() {
}
bool EditorInspectorShaderModePlugin::can_handle(Object *p_object) {
- return true; //can handle everything
-}
-
-void EditorInspectorShaderModePlugin::parse_begin(Object *p_object) {
- //do none
+ return true; // Can handle everything.
}
bool EditorInspectorShaderModePlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
@@ -5204,11 +5200,7 @@ bool EditorInspectorShaderModePlugin::parse_property(Object *p_object, const Var
return true;
}
- return false; //can be overridden, although it will most likely be last anyway
-}
-
-void EditorInspectorShaderModePlugin::parse_end() {
- //do none
+ return false;
}
//////////////////////////////////
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index c4a392469b..74ccda3c9a 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -523,9 +523,7 @@ class EditorInspectorShaderModePlugin : public EditorInspectorPlugin {
public:
virtual bool can_handle(Object *p_object) override;
- virtual void parse_begin(Object *p_object) override;
virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
- virtual void parse_end() override;
};
class VisualShaderNodePortPreview : public Control {