diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_help.cpp | 1 | ||||
-rw-r--r-- | editor/editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/editor_plugin_settings.cpp | 88 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/animation_blend_tree_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/editor_preview_plugins.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 1 |
8 files changed, 58 insertions, 38 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 2e8f8ec646..e6df00b48c 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -54,6 +54,7 @@ void EditorHelp::_init_colors() { qualifier_color = text_color * Color(1, 1, 1, 0.8); type_color = get_color("accent_color", "Editor").linear_interpolate(text_color, 0.5); class_desc->add_color_override("selection_color", get_color("accent_color", "Editor") * Color(1, 1, 1, 0.4)); + class_desc->add_constant_override("line_separation", Math::round(5 * EDSCALE)); } void EditorHelp::_unhandled_key_input(const Ref<InputEvent> &p_ev) { diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index e27f1ab9eb..d9fd0659aa 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -238,7 +238,7 @@ Control *EditorInterface::get_base_control() { } void EditorInterface::set_plugin_enabled(const String &p_plugin, bool p_enabled) { - EditorNode::get_singleton()->set_addon_plugin_enabled(p_plugin, p_enabled); + EditorNode::get_singleton()->set_addon_plugin_enabled(p_plugin, p_enabled, true); } bool EditorInterface::is_plugin_enabled(const String &p_plugin) const { diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp index 09577e39e1..514b3ff5d2 100644 --- a/editor/editor_plugin_settings.cpp +++ b/editor/editor_plugin_settings.cpp @@ -96,45 +96,59 @@ void EditorPluginSettings::update_plugins() { if (err2 != OK) { WARN_PRINTS("Can't load plugin config: " + path); - } else if (!cf->has_section_key("plugin", "name")) { - WARN_PRINTS("Plugin misses plugin/name: " + path); - } else if (!cf->has_section_key("plugin", "author")) { - WARN_PRINTS("Plugin misses plugin/author: " + path); - } else if (!cf->has_section_key("plugin", "version")) { - WARN_PRINTS("Plugin misses plugin/version: " + path); - } else if (!cf->has_section_key("plugin", "description")) { - WARN_PRINTS("Plugin misses plugin/description: " + path); - } else if (!cf->has_section_key("plugin", "script")) { - WARN_PRINTS("Plugin misses plugin/script: " + path); } else { + bool key_missing = false; - String d2 = plugins[i]; - String name = cf->get_value("plugin", "name"); - String author = cf->get_value("plugin", "author"); - String version = cf->get_value("plugin", "version"); - String description = cf->get_value("plugin", "description"); - String script = cf->get_value("plugin", "script"); - - TreeItem *item = plugin_list->create_item(root); - item->set_text(0, name); - item->set_tooltip(0, "Name: " + name + "\nPath: " + path + "\nMain Script: " + script + "\nDescription: " + description); - item->set_metadata(0, d2); - item->set_text(1, version); - item->set_metadata(1, script); - item->set_text(2, author); - item->set_metadata(2, description); - item->set_cell_mode(3, TreeItem::CELL_MODE_RANGE); - item->set_range_config(3, 0, 1, 1); - item->set_text(3, "Inactive,Active"); - item->set_editable(3, true); - item->add_button(4, get_icon("Edit", "EditorIcons"), BUTTON_PLUGIN_EDIT, false, TTR("Edit Plugin")); - - if (EditorNode::get_singleton()->is_addon_plugin_enabled(d2)) { - item->set_custom_color(3, get_color("success_color", "Editor")); - item->set_range(3, 1); - } else { - item->set_custom_color(3, get_color("disabled_font_color", "Editor")); - item->set_range(3, 0); + if (!cf->has_section_key("plugin", "name")) { + WARN_PRINTS("Plugin config misses \"plugin/name\" key: " + path); + key_missing = true; + } + if (!cf->has_section_key("plugin", "author")) { + WARN_PRINTS("Plugin config misses \"plugin/author\" key: " + path); + key_missing = true; + } + if (!cf->has_section_key("plugin", "version")) { + WARN_PRINTS("Plugin config misses \"plugin/version\" key: " + path); + key_missing = true; + } + if (!cf->has_section_key("plugin", "description")) { + WARN_PRINTS("Plugin config misses \"plugin/description\" key: " + path); + key_missing = true; + } + if (!cf->has_section_key("plugin", "script")) { + WARN_PRINTS("Plugin config misses \"plugin/script\" key: " + path); + key_missing = true; + } + + if (!key_missing) { + String d2 = plugins[i]; + String name = cf->get_value("plugin", "name"); + String author = cf->get_value("plugin", "author"); + String version = cf->get_value("plugin", "version"); + String description = cf->get_value("plugin", "description"); + String script = cf->get_value("plugin", "script"); + + TreeItem *item = plugin_list->create_item(root); + item->set_text(0, name); + item->set_tooltip(0, TTR("Name:") + " " + name + "\n" + TTR("Path:") + " " + path + "\n" + TTR("Main Script:") + " " + script + "\n" + TTR("Description:") + " " + description); + item->set_metadata(0, d2); + item->set_text(1, version); + item->set_metadata(1, script); + item->set_text(2, author); + item->set_metadata(2, description); + item->set_cell_mode(3, TreeItem::CELL_MODE_RANGE); + item->set_range_config(3, 0, 1, 1); + item->set_text(3, "Inactive,Active"); + item->set_editable(3, true); + item->add_button(4, get_icon("Edit", "EditorIcons"), BUTTON_PLUGIN_EDIT, false, TTR("Edit Plugin")); + + if (EditorNode::get_singleton()->is_addon_plugin_enabled(d2)) { + item->set_custom_color(3, get_color("success_color", "Editor")); + item->set_range(3, 1); + } else { + item->set_custom_color(3, get_color("disabled_font_color", "Editor")); + item->set_range(3, 0); + } } } } diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index c15d24719f..e29e44caa2 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -1066,6 +1066,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("title_color", "GraphNode", default_node_color); default_node_color.a = 0.7; theme->set_color("close_color", "GraphNode", default_node_color); + theme->set_color("resizer_color", "GraphNode", default_node_color); theme->set_constant("port_offset", "GraphNode", 14 * EDSCALE); theme->set_constant("title_h_offset", "GraphNode", -16 * EDSCALE); diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index 574f906cfa..235c204265 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -249,6 +249,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() { node->add_color_override("title_color", c); c.a = 0.7; node->add_color_override("close_color", c); + node->add_color_override("resizer_color", c); } } diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index cb68f5eaaf..894e5c7298 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -290,6 +290,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() { desc_vbox->add_child(description); description->set_v_size_flags(SIZE_EXPAND_FILL); description->connect("meta_clicked", this, "_link_click"); + description->add_constant_override("line_separation", Math::round(5 * EDSCALE)); VBoxContainer *previews_vbox = memnew(VBoxContainer); hbox->add_child(previews_vbox); diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index c8ffc2744a..8acc41a2c7 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -624,6 +624,7 @@ Ref<Texture> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const S uint8_t *imgw = imgdata.ptr(); Ref<AudioStreamPlayback> playback = stream->instance_playback(); + ERR_FAIL_COND_V(playback.is_null(), Ref<Texture>()); float len_s = stream->get_length(); if (len_s == 0) { diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 66fbc32b1c..6b338ca02b 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -410,6 +410,7 @@ void VisualShaderEditor::_update_created_node(GraphNode *node) { node->add_color_override("title_color", c); c.a = 0.7; node->add_color_override("close_color", c); + node->add_color_override("resizer_color", c); } } |