summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-07 07:47:02 +0100
committerGitHub <noreply@github.com>2018-12-07 07:47:02 +0100
commitcac8cc80522be300c807e78f41ec1dcddeac7a97 (patch)
tree7cdc21a1041b233b9361385abebbc25015e9b487
parentdfa5cbfdc3b772ab9d5fceb67142ef73a88bd692 (diff)
parentd514ac405b477e1ecacb25dedc6d0f7f03d2cb2c (diff)
Merge pull request #24205 from YeldhamDev/tileset_context_hide_script
Hide "Script" section in the "TilesetEditorContext"
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp5
-rw-r--r--editor/plugins/tile_set_editor_plugin.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 5844315529..fe896e12ff 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -2442,6 +2442,11 @@ void TilesetEditorContext::_get_property_list(List<PropertyInfo> *p_list) const
}
}
+void TilesetEditorContext::_bind_methods() {
+
+ ClassDB::bind_method("_hide_script_from_inspector", &TilesetEditorContext::_hide_script_from_inspector);
+}
+
TilesetEditorContext::TilesetEditorContext(TileSetEditor *p_tileset_editor) {
tileset_editor = p_tileset_editor;
diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h
index c6fcdae404..e713818c70 100644
--- a/editor/plugins/tile_set_editor_plugin.h
+++ b/editor/plugins/tile_set_editor_plugin.h
@@ -213,6 +213,7 @@ class TilesetEditorContext : public Object {
bool snap_options_visible;
public:
+ bool _hide_script_from_inspector() { return true; }
void set_tileset(const Ref<TileSet> &p_tileset);
private:
@@ -222,6 +223,7 @@ protected:
bool _set(const StringName &p_name, const Variant &p_value);
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
+ static void _bind_methods();
public:
TilesetEditorContext(TileSetEditor *p_tileset_editor);