From bc647393ba043239ac18f4a7414f138a3117bd00 Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Thu, 13 Feb 2020 09:43:43 +0300 Subject: [PATCH] Added virtual method to VisualShaderNodeCustom to enable high-end mark --- doc/classes/VisualShaderNodeCustom.xml | 8 ++++++++ editor/plugins/visual_shader_editor_plugin.cpp | 11 +++++++++-- editor/plugins/visual_shader_editor_plugin.h | 2 +- scene/resources/visual_shader.cpp | 1 + 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index 9ccdf0d3c4f..0d1bcc754fb 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -143,6 +143,14 @@ Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the root of the main category (see [method _get_category]). + + + + + Override this method to enable high-end mark in the Visual Shader Editor's members dialog. + Defining this method is [b]optional[/b]. If not overridden, it's false. + + diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 438c640bab2..ebd7b4edf68 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -116,7 +116,7 @@ void VisualShaderEditor::clear_custom_types() { } } -void VisualShaderEditor::add_custom_type(const String &p_name, const Ref