Cleanup: i18n: remove extraction macro from some geometry nodes

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

Pull Request: https://projects.blender.org/blender/blender/pulls/111151
This commit is contained in:
Habib Gahbiche 2023-08-21 16:48:24 +02:00 committed by Bastien Montagne
parent f1c6d61854
commit 7d9214d30f
4 changed files with 24 additions and 28 deletions

View File

@ -29,10 +29,10 @@ NODE_STORAGE_FUNCS(NodeKuwaharaData)
static void cmp_node_kuwahara_declare(NodeDeclarationBuilder &b) 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}) .default_value({1.0f, 1.0f, 1.0f, 1.0f})
.compositor_domain_priority(0); .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) static void node_composit_init_kuwahara(bNodeTree * /*ntree*/, bNode *node)

View File

@ -13,25 +13,21 @@ namespace blender::nodes::node_geo_mesh_topology_corners_of_edge_cc {
static void node_declare(NodeDeclarationBuilder &b) 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) .implicit_field(implicit_field_inputs::index)
.description(N_("The edge to retrieve data from. Defaults to the edge from the context")); .description("The edge to retrieve data from. Defaults to the edge from the context");
b.add_input<decl::Float>(N_("Weights")) b.add_input<decl::Float>("Weights").supports_field().hide_value().description(
.supports_field() "Values that sort the corners attached to the edge");
.hide_value() b.add_input<decl::Int>("Sort Index")
.description(N_("Values that sort the corners attached to the edge"));
b.add_input<decl::Int>(N_("Sort Index"))
.min(0) .min(0)
.supports_field() .supports_field()
.description(N_("Which of the sorted corners to output")); .description("Which of the sorted corners to output");
b.add_output<decl::Int>(N_("Corner Index")) b.add_output<decl::Int>("Corner Index")
.field_source_reference_all() .field_source_reference_all()
.description( .description(
N_("A corner of the input edge in its face's winding order, chosen by the sort index")); "A corner of the input edge in its face's winding order, chosen by the sort index");
b.add_output<decl::Int>(N_("Total")) b.add_output<decl::Int>("Total").field_source().reference_pass({0}).description(
.field_source() "The number of faces or corners connected to each edge");
.reference_pass({0})
.description(N_("The number of faces or corners connected to each edge"));
} }
class CornersOfEdgeInput final : public bke::MeshFieldInput { class CornersOfEdgeInput final : public bke::MeshFieldInput {

View File

@ -24,7 +24,7 @@ static void node_declare_dynamic(const bNodeTree &tree,
NodeDeclaration &r_declaration) NodeDeclaration &r_declaration)
{ {
NodeDeclarationBuilder b{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 NodeGeometryRepeatInput &storage = node_storage(node);
const bNode *output_node = tree.node_by_id(storage.output_node_id); const bNode *output_node = tree.node_by_id(storage.output_node_id);

View File

@ -35,32 +35,32 @@ static void node_declare(NodeDeclarationBuilder &b)
.translation_context(BLT_I18NCONTEXT_ID_ID) .translation_context(BLT_I18NCONTEXT_ID_ID)
.supported_type(GeometryComponent::Type::Volume); .supported_type(GeometryComponent::Type::Volume);
std::string grid_socket_description = N_( std::string grid_socket_description =
"Expects a Named Attribute with the name of a Grid in the Volume"); "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() .field_on_all()
.hide_value() .hide_value()
.description(grid_socket_description); .description(grid_socket_description);
b.add_input<decl::Float>(N_("Grid"), "Grid_Float") b.add_input<decl::Float>(("Grid"), "Grid_Float")
.field_on_all() .field_on_all()
.hide_value() .hide_value()
.description(grid_socket_description); .description(grid_socket_description);
b.add_input<decl::Bool>(N_("Grid"), "Grid_Bool") b.add_input<decl::Bool>(("Grid"), "Grid_Bool")
.field_on_all() .field_on_all()
.hide_value() .hide_value()
.description(grid_socket_description); .description(grid_socket_description);
b.add_input<decl::Int>(N_("Grid"), "Grid_Int") b.add_input<decl::Int>(("Grid"), "Grid_Int")
.field_on_all() .field_on_all()
.hide_value() .hide_value()
.description(grid_socket_description); .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::Vector>(("Value"), "Value_Vector").dependent_field({5});
b.add_output<decl::Float>(N_("Value"), "Value_Float").dependent_field({5}); b.add_output<decl::Float>(("Value"), "Value_Float").dependent_field({5});
b.add_output<decl::Bool>(N_("Value"), "Value_Bool").dependent_field({5}); b.add_output<decl::Bool>(("Value"), "Value_Bool").dependent_field({5});
b.add_output<decl::Int>(N_("Value"), "Value_Int").dependent_field({5}); b.add_output<decl::Int>(("Value"), "Value_Int").dependent_field({5});
} }
static void search_node_add_ops(GatherAddNodeSearchParams &params) static void search_node_add_ops(GatherAddNodeSearchParams &params)