Cleanup: i18n remove extraction macro from Kuwahara node #111151

Merged
Bastien Montagne merged 3 commits from zazizizou/blender:com-cleanup-extraction-macro into main 2023-08-21 16:48:33 +02:00
Member

Followup to #107258. Change was missed beacause development of Kuwahara filter started before #107258 landed.

Followup to #107258. Change was missed beacause development of Kuwahara filter started before #107258 landed.
Habib Gahbiche added 1 commit 2023-08-15 23:06:01 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
49a6b6b4e4
Cleanup: i18n remove extraction macro from Kuwahara node
Followup to #107258. Change was missed beacause development of Kuwahara filter started before #107258 landed.
Habib Gahbiche requested review from Damien Picard 2023-08-15 23:07:55 +02:00
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR111151) when ready.
Habib Gahbiche added 1 commit 2023-08-15 23:42:34 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
3153e56488
Fix build error
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR111151) when ready.
Habib Gahbiche requested review from Bastien Montagne 2023-08-16 14:48:04 +02:00
Member

Hi, I had a look and saw that other nodes were in the same situation, could you include them in the PR as well?

diff --git a/source/blender/nodes/composite/nodes/node_composite_kuwahara.cc b/source/blender/nodes/composite/nodes/node_composite_kuwahara.cc
index 846f41bf4f5..be4d9d88158 100644
--- a/source/blender/nodes/composite/nodes/node_composite_kuwahara.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_kuwahara.cc
@@ -26,10 +26,10 @@ NODE_STORAGE_FUNCS(NodeKuwaharaData)
 
 static void cmp_node_kuwahara_declare(NodeDeclarationBuilder &b)
 {
-  b.add_input<decl::Color>(N_("Image"))
+  b.add_input<decl::Color>("Image")
       .default_value({1.0f, 1.0f, 1.0f, 1.0f})
       .compositor_domain_priority(0);
-  b.add_output<decl::Color>(N_("Image"));
+  b.add_output<decl::Color>("Image");
 }
 
 static void node_composit_init_kuwahara(bNodeTree * /*ntree*/, bNode *node)
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_topology_corners_of_edge.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_topology_corners_of_edge.cc
index a7f8911c9a7..14d1e6c6e97 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_topology_corners_of_edge.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_topology_corners_of_edge.cc
@@ -13,25 +13,21 @@ namespace blender::nodes::node_geo_mesh_topology_corners_of_edge_cc {
 
 static void node_declare(NodeDeclarationBuilder &b)
 {
-  b.add_input<decl::Int>(N_("Edge Index"))
+  b.add_input<decl::Int>("Edge Index")
       .implicit_field(implicit_field_inputs::index)
-      .description(N_("The edge to retrieve data from. Defaults to the edge from the context"));
-  b.add_input<decl::Float>(N_("Weights"))
-      .supports_field()
-      .hide_value()
-      .description(N_("Values that sort the corners attached to the edge"));
-  b.add_input<decl::Int>(N_("Sort Index"))
+      .description("The edge to retrieve data from. Defaults to the edge from the context");
+  b.add_input<decl::Float>("Weights").supports_field().hide_value().description(
+      "Values that sort the corners attached to the edge");
+  b.add_input<decl::Int>("Sort Index")
       .min(0)
       .supports_field()
-      .description(N_("Which of the sorted corners to output"));
-  b.add_output<decl::Int>(N_("Corner Index"))
+      .description("Which of the sorted corners to output");
+  b.add_output<decl::Int>("Corner Index")
       .field_source_reference_all()
       .description(
-          N_("A corner of the input edge in its face's winding order, chosen by the sort index"));
-  b.add_output<decl::Int>(N_("Total"))
-      .field_source()
-      .reference_pass({0})
-      .description(N_("The number of faces or corners connected to each edge"));
+          "A corner of the input edge in its face's winding order, chosen by the sort index");
+  b.add_output<decl::Int>("Total").field_source().reference_pass({0}).description(
+      "The number of faces or corners connected to each edge");
 }
 
 class CornersOfEdgeInput final : public bke::MeshFieldInput {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_repeat_input.cc b/source/blender/nodes/geometry/nodes/node_geo_repeat_input.cc
index 4fff3d585fb..0ce244e2c43 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_repeat_input.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_repeat_input.cc
@@ -24,7 +24,7 @@ static void node_declare_dynamic(const bNodeTree &tree,
                                  NodeDeclaration &r_declaration)
 {
   NodeDeclarationBuilder b{r_declaration};
-  b.add_input<decl::Int>(N_("Iterations")).min(0).default_value(1);
+  b.add_input<decl::Int>("Iterations").min(0).default_value(1);
 
   const NodeGeometryRepeatInput &storage = node_storage(node);
   const bNode *output_node = tree.node_by_id(storage.output_node_id);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_sample_volume.cc b/source/blender/nodes/geometry/nodes/node_geo_sample_volume.cc
index ed1c29af494..43eb89f4ded 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_sample_volume.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_sample_volume.cc
@@ -31,36 +31,36 @@ NODE_STORAGE_FUNCS(NodeGeometrySampleVolume)
 
 static void node_declare(NodeDeclarationBuilder &b)
 {
-  b.add_input<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
+  b.add_input<decl::Geometry>("Volume")
       .translation_context(BLT_I18NCONTEXT_ID_ID)
       .supported_type(GeometryComponent::Type::Volume);
 
   std::string grid_socket_description = N_(
       "Expects a Named Attribute with the name of a Grid in the Volume");
 
-  b.add_input<decl::Vector>(N_("Grid"), "Grid_Vector")
+  b.add_input<decl::Vector>("Grid", "Grid_Vector")
       .field_on_all()
       .hide_value()
       .description(grid_socket_description);
-  b.add_input<decl::Float>(N_("Grid"), "Grid_Float")
+  b.add_input<decl::Float>("Grid", "Grid_Float")
       .field_on_all()
       .hide_value()
       .description(grid_socket_description);
-  b.add_input<decl::Bool>(N_("Grid"), "Grid_Bool")
+  b.add_input<decl::Bool>("Grid", "Grid_Bool")
       .field_on_all()
       .hide_value()
       .description(grid_socket_description);
-  b.add_input<decl::Int>(N_("Grid"), "Grid_Int")
+  b.add_input<decl::Int>("Grid", "Grid_Int")
       .field_on_all()
       .hide_value()
       .description(grid_socket_description);
 
-  b.add_input<decl::Vector>(N_("Position")).implicit_field(implicit_field_inputs::position);
+  b.add_input<decl::Vector>("Position").implicit_field(implicit_field_inputs::position);
 
-  b.add_output<decl::Vector>(N_("Value"), "Value_Vector").dependent_field({5});
-  b.add_output<decl::Float>(N_("Value"), "Value_Float").dependent_field({5});
-  b.add_output<decl::Bool>(N_("Value"), "Value_Bool").dependent_field({5});
-  b.add_output<decl::Int>(N_("Value"), "Value_Int").dependent_field({5});
+  b.add_output<decl::Vector>("Value", "Value_Vector").dependent_field({5});
+  b.add_output<decl::Float>("Value", "Value_Float").dependent_field({5});
+  b.add_output<decl::Bool>("Value", "Value_Bool").dependent_field({5});
+  b.add_output<decl::Int>("Value", "Value_Int").dependent_field({5});
 }
 
 static void search_node_add_ops(GatherAddNodeSearchParams &params)
Hi, I had a look and saw that other nodes were in the same situation, could you include them in the PR as well? ```diff diff --git a/source/blender/nodes/composite/nodes/node_composite_kuwahara.cc b/source/blender/nodes/composite/nodes/node_composite_kuwahara.cc index 846f41bf4f5..be4d9d88158 100644 --- a/source/blender/nodes/composite/nodes/node_composite_kuwahara.cc +++ b/source/blender/nodes/composite/nodes/node_composite_kuwahara.cc @@ -26,10 +26,10 @@ NODE_STORAGE_FUNCS(NodeKuwaharaData) static void cmp_node_kuwahara_declare(NodeDeclarationBuilder &b) { - b.add_input<decl::Color>(N_("Image")) + b.add_input<decl::Color>("Image") .default_value({1.0f, 1.0f, 1.0f, 1.0f}) .compositor_domain_priority(0); - b.add_output<decl::Color>(N_("Image")); + b.add_output<decl::Color>("Image"); } static void node_composit_init_kuwahara(bNodeTree * /*ntree*/, bNode *node) diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_topology_corners_of_edge.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_topology_corners_of_edge.cc index a7f8911c9a7..14d1e6c6e97 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_topology_corners_of_edge.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_topology_corners_of_edge.cc @@ -13,25 +13,21 @@ namespace blender::nodes::node_geo_mesh_topology_corners_of_edge_cc { static void node_declare(NodeDeclarationBuilder &b) { - b.add_input<decl::Int>(N_("Edge Index")) + b.add_input<decl::Int>("Edge Index") .implicit_field(implicit_field_inputs::index) - .description(N_("The edge to retrieve data from. Defaults to the edge from the context")); - b.add_input<decl::Float>(N_("Weights")) - .supports_field() - .hide_value() - .description(N_("Values that sort the corners attached to the edge")); - b.add_input<decl::Int>(N_("Sort Index")) + .description("The edge to retrieve data from. Defaults to the edge from the context"); + b.add_input<decl::Float>("Weights").supports_field().hide_value().description( + "Values that sort the corners attached to the edge"); + b.add_input<decl::Int>("Sort Index") .min(0) .supports_field() - .description(N_("Which of the sorted corners to output")); - b.add_output<decl::Int>(N_("Corner Index")) + .description("Which of the sorted corners to output"); + b.add_output<decl::Int>("Corner Index") .field_source_reference_all() .description( - N_("A corner of the input edge in its face's winding order, chosen by the sort index")); - b.add_output<decl::Int>(N_("Total")) - .field_source() - .reference_pass({0}) - .description(N_("The number of faces or corners connected to each edge")); + "A corner of the input edge in its face's winding order, chosen by the sort index"); + b.add_output<decl::Int>("Total").field_source().reference_pass({0}).description( + "The number of faces or corners connected to each edge"); } class CornersOfEdgeInput final : public bke::MeshFieldInput { diff --git a/source/blender/nodes/geometry/nodes/node_geo_repeat_input.cc b/source/blender/nodes/geometry/nodes/node_geo_repeat_input.cc index 4fff3d585fb..0ce244e2c43 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_repeat_input.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_repeat_input.cc @@ -24,7 +24,7 @@ static void node_declare_dynamic(const bNodeTree &tree, NodeDeclaration &r_declaration) { NodeDeclarationBuilder b{r_declaration}; - b.add_input<decl::Int>(N_("Iterations")).min(0).default_value(1); + b.add_input<decl::Int>("Iterations").min(0).default_value(1); const NodeGeometryRepeatInput &storage = node_storage(node); const bNode *output_node = tree.node_by_id(storage.output_node_id); diff --git a/source/blender/nodes/geometry/nodes/node_geo_sample_volume.cc b/source/blender/nodes/geometry/nodes/node_geo_sample_volume.cc index ed1c29af494..43eb89f4ded 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_sample_volume.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_sample_volume.cc @@ -31,36 +31,36 @@ NODE_STORAGE_FUNCS(NodeGeometrySampleVolume) static void node_declare(NodeDeclarationBuilder &b) { - b.add_input<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume")) + b.add_input<decl::Geometry>("Volume") .translation_context(BLT_I18NCONTEXT_ID_ID) .supported_type(GeometryComponent::Type::Volume); std::string grid_socket_description = N_( "Expects a Named Attribute with the name of a Grid in the Volume"); - b.add_input<decl::Vector>(N_("Grid"), "Grid_Vector") + b.add_input<decl::Vector>("Grid", "Grid_Vector") .field_on_all() .hide_value() .description(grid_socket_description); - b.add_input<decl::Float>(N_("Grid"), "Grid_Float") + b.add_input<decl::Float>("Grid", "Grid_Float") .field_on_all() .hide_value() .description(grid_socket_description); - b.add_input<decl::Bool>(N_("Grid"), "Grid_Bool") + b.add_input<decl::Bool>("Grid", "Grid_Bool") .field_on_all() .hide_value() .description(grid_socket_description); - b.add_input<decl::Int>(N_("Grid"), "Grid_Int") + b.add_input<decl::Int>("Grid", "Grid_Int") .field_on_all() .hide_value() .description(grid_socket_description); - b.add_input<decl::Vector>(N_("Position")).implicit_field(implicit_field_inputs::position); + b.add_input<decl::Vector>("Position").implicit_field(implicit_field_inputs::position); - b.add_output<decl::Vector>(N_("Value"), "Value_Vector").dependent_field({5}); - b.add_output<decl::Float>(N_("Value"), "Value_Float").dependent_field({5}); - b.add_output<decl::Bool>(N_("Value"), "Value_Bool").dependent_field({5}); - b.add_output<decl::Int>(N_("Value"), "Value_Int").dependent_field({5}); + b.add_output<decl::Vector>("Value", "Value_Vector").dependent_field({5}); + b.add_output<decl::Float>("Value", "Value_Float").dependent_field({5}); + b.add_output<decl::Bool>("Value", "Value_Bool").dependent_field({5}); + b.add_output<decl::Int>("Value", "Value_Int").dependent_field({5}); } static void search_node_add_ops(GatherAddNodeSearchParams &params) ```

Ah, some more relatively new nodes ../

Ah, some more relatively new nodes ../
Habib Gahbiche added 1 commit 2023-08-19 12:56:31 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
336d8d1e8b
Add missing nodes
Author
Member

@blender-bot build

@blender-bot build
Bastien Montagne approved these changes 2023-08-21 16:46:04 +02:00
Bastien Montagne left a comment
Owner

LGTM, thanks!

LGTM, thanks!
Iliya Katushenock reviewed 2023-08-21 16:47:40 +02:00
@ -37,3 +37,2 @@
std::string grid_socket_description = N_(
"Expects a Named Attribute with the name of a Grid in the Volume");
std::string grid_socket_description =

Is it matched by new regular expressions?

Is it matched by new regular expressions?
Author
Member

No, I searched manually for the remaining nodes. Is this change undesired?

No, I searched manually for the remaining nodes. Is this change undesired?

This does not look good indeed, will revert in code, thanks for noticing!

This does not look good indeed, will revert in code, thanks for noticing!
Bastien Montagne merged commit 7d9214d30f into main 2023-08-21 16:48:33 +02:00
Bastien Montagne deleted branch com-cleanup-extraction-macro 2023-08-21 16:48:35 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#111151
No description provided.