From 84a0ad36b659f352e0c6e044553ee6740d848a9c Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Sat, 2 Nov 2019 11:53:22 +0300 Subject: [PATCH] Sort custom vshader nodes+prevents them from divide to different folders --- .../plugins/visual_shader_editor_plugin.cpp | 58 +++++++++++++++++-- editor/plugins/visual_shader_editor_plugin.h | 2 +- 2 files changed, 54 insertions(+), 6 deletions(-) diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 3a9e48cfdb0..e96f2e55c2f 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -109,11 +109,12 @@ void VisualShaderEditor::clear_custom_types() { for (int i = 0; i < add_options.size(); i++) { if (add_options[i].is_custom) { add_options.remove(i); + i--; } } } -void VisualShaderEditor::add_custom_type(const String &p_name, const Ref