[Bf-blender-cvs] [5c3dc52536d] master: Cleanup: Improve variable name

Hans Goudey noreply at git.blender.org
Thu Jul 7 15:13:19 CEST 2022


Commit: 5c3dc52536d373253a0de584f80f7ada9528f003
Author: Hans Goudey
Date:   Thu Jul 7 08:13:11 2022 -0500
Branches: master
https://developer.blender.org/rB5c3dc52536d373253a0de584f80f7ada9528f003

Cleanup: Improve variable name

The new name makes more sense in non-node-related contexts.

===================================================================

M	source/blender/editors/include/UI_interface.hh
M	source/blender/editors/interface/interface_template_attribute_search.cc

===================================================================

diff --git a/source/blender/editors/include/UI_interface.hh b/source/blender/editors/include/UI_interface.hh
index 63cf8fa0c56..82bfdd7e212 100644
--- a/source/blender/editors/include/UI_interface.hh
+++ b/source/blender/editors/include/UI_interface.hh
@@ -46,7 +46,7 @@ void template_breadcrumbs(uiLayout &layout, Span<ContextPathItem> context_path);
 
 void attribute_search_add_items(
     StringRefNull str,
-    bool is_output,
+    bool can_create_attribute,
     Span<const nodes::geometry_nodes_eval_log::GeometryAttributeInfo *> infos,
     uiSearchItems *items,
     bool is_first);
diff --git a/source/blender/editors/interface/interface_template_attribute_search.cc b/source/blender/editors/interface/interface_template_attribute_search.cc
index 4e587bd5338..0a684903f0f 100644
--- a/source/blender/editors/interface/interface_template_attribute_search.cc
+++ b/source/blender/editors/interface/interface_template_attribute_search.cc
@@ -50,7 +50,7 @@ static bool attribute_search_item_add(uiSearchItems *items, const GeometryAttrib
 }
 
 void attribute_search_add_items(StringRefNull str,
-                                const bool is_output,
+                                const bool can_create_attribute,
                                 Span<const GeometryAttributeInfo *> infos,
                                 uiSearchItems *seach_items,
                                 const bool is_first)
@@ -68,8 +68,12 @@ void attribute_search_add_items(StringRefNull str,
     }
     if (!contained) {
       dummy_info.name = str;
-      UI_search_item_add(
-          seach_items, str.c_str(), &dummy_info, is_output ? ICON_ADD : ICON_NONE, 0, 0);
+      UI_search_item_add(seach_items,
+                         str.c_str(),
+                         &dummy_info,
+                         can_create_attribute ? ICON_ADD : ICON_NONE,
+                         0,
+                         0);
     }
   }



More information about the Bf-blender-cvs mailing list