diff options
Diffstat (limited to 'source/blender/nodes/function')
17 files changed, 60 insertions, 55 deletions
diff --git a/source/blender/nodes/function/nodes/legacy/node_fn_random_float.cc b/source/blender/nodes/function/nodes/legacy/node_fn_random_float.cc index 7f6f554ba93..d98d49c7273 100644 --- a/source/blender/nodes/function/nodes/legacy/node_fn_random_float.cc +++ b/source/blender/nodes/function/nodes/legacy/node_fn_random_float.cc @@ -23,10 +23,10 @@ namespace blender::nodes { static void fn_node_legacy_random_float_declare(NodeDeclarationBuilder &b) { b.is_function_node(); - b.add_input<decl::Float>("Min").min(-10000.0f).max(10000.0f); - b.add_input<decl::Float>("Max").default_value(1.0f).min(-10000.0f).max(10000.0f); - b.add_input<decl::Int>("Seed").min(-10000).max(10000); - b.add_output<decl::Float>("Value"); + b.add_input<decl::Float>(N_("Min")).min(-10000.0f).max(10000.0f); + b.add_input<decl::Float>(N_("Max")).default_value(1.0f).min(-10000.0f).max(10000.0f); + b.add_input<decl::Int>(N_("Seed")).min(-10000).max(10000); + b.add_output<decl::Float>(N_("Value")); }; } // namespace blender::nodes diff --git a/source/blender/nodes/function/nodes/node_fn_align_euler_to_vector.cc b/source/blender/nodes/function/nodes/node_fn_align_euler_to_vector.cc index ae41cdfca5a..4088fa24ca7 100644 --- a/source/blender/nodes/function/nodes/node_fn_align_euler_to_vector.cc +++ b/source/blender/nodes/function/nodes/node_fn_align_euler_to_vector.cc @@ -28,10 +28,14 @@ namespace blender::nodes { static void fn_node_align_euler_to_vector_declare(NodeDeclarationBuilder &b) { b.is_function_node(); - b.add_input<decl::Vector>("Rotation").subtype(PROP_EULER).hide_value(); - b.add_input<decl::Float>("Factor").default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR); - b.add_input<decl::Vector>("Vector").default_value({0.0, 0.0, 1.0}); - b.add_output<decl::Vector>("Rotation").subtype(PROP_EULER); + b.add_input<decl::Vector>(N_("Rotation")).subtype(PROP_EULER).hide_value(); + b.add_input<decl::Float>(N_("Factor")) + .default_value(1.0f) + .min(0.0f) + .max(1.0f) + .subtype(PROP_FACTOR); + b.add_input<decl::Vector>(N_("Vector")).default_value({0.0, 0.0, 1.0}); + b.add_output<decl::Vector>(N_("Rotation")).subtype(PROP_EULER); } static void fn_node_align_euler_to_vector_layout(uiLayout *layout, diff --git a/source/blender/nodes/function/nodes/node_fn_boolean_math.cc b/source/blender/nodes/function/nodes/node_fn_boolean_math.cc index 09caf12e425..b44e8d54ff1 100644 --- a/source/blender/nodes/function/nodes/node_fn_boolean_math.cc +++ b/source/blender/nodes/function/nodes/node_fn_boolean_math.cc @@ -29,9 +29,9 @@ namespace blender::nodes { static void fn_node_boolean_math_declare(NodeDeclarationBuilder &b) { b.is_function_node(); - b.add_input<decl::Bool>("Boolean", "Boolean"); - b.add_input<decl::Bool>("Boolean", "Boolean_001"); - b.add_output<decl::Bool>("Boolean"); + b.add_input<decl::Bool>(N_("Boolean"), "Boolean"); + b.add_input<decl::Bool>(N_("Boolean"), "Boolean_001"); + b.add_output<decl::Bool>(N_("Boolean")); }; static void fn_node_boolean_math_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) diff --git a/source/blender/nodes/function/nodes/node_fn_float_compare.cc b/source/blender/nodes/function/nodes/node_fn_float_compare.cc index bdc4a3c1e02..2e1f2aaeeef 100644 --- a/source/blender/nodes/function/nodes/node_fn_float_compare.cc +++ b/source/blender/nodes/function/nodes/node_fn_float_compare.cc @@ -31,10 +31,10 @@ namespace blender::nodes { static void fn_node_float_compare_declare(NodeDeclarationBuilder &b) { b.is_function_node(); - b.add_input<decl::Float>("A").min(-10000.0f).max(10000.0f); - b.add_input<decl::Float>("B").min(-10000.0f).max(10000.0f); - b.add_input<decl::Float>("Epsilon").default_value(0.001f).min(-10000.0f).max(10000.0f); - b.add_output<decl::Bool>("Result"); + b.add_input<decl::Float>(N_("A")).min(-10000.0f).max(10000.0f); + b.add_input<decl::Float>(N_("B")).min(-10000.0f).max(10000.0f); + b.add_input<decl::Float>(N_("Epsilon")).default_value(0.001f).min(-10000.0f).max(10000.0f); + b.add_output<decl::Bool>(N_("Result")); }; static void geo_node_float_compare_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) diff --git a/source/blender/nodes/function/nodes/node_fn_float_to_int.cc b/source/blender/nodes/function/nodes/node_fn_float_to_int.cc index 5dccd26158b..e6ec925f945 100644 --- a/source/blender/nodes/function/nodes/node_fn_float_to_int.cc +++ b/source/blender/nodes/function/nodes/node_fn_float_to_int.cc @@ -30,8 +30,8 @@ namespace blender::nodes { static void fn_node_float_to_int_declare(NodeDeclarationBuilder &b) { b.is_function_node(); - b.add_input<decl::Float>("Float"); - b.add_output<decl::Int>("Integer"); + b.add_input<decl::Float>(N_("Float")); + b.add_output<decl::Int>(N_("Integer")); }; static void fn_node_float_to_int_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) diff --git a/source/blender/nodes/function/nodes/node_fn_input_bool.cc b/source/blender/nodes/function/nodes/node_fn_input_bool.cc index 58f8969f1b6..1358bf8a223 100644 --- a/source/blender/nodes/function/nodes/node_fn_input_bool.cc +++ b/source/blender/nodes/function/nodes/node_fn_input_bool.cc @@ -25,7 +25,7 @@ namespace blender::nodes { static void fn_node_input_bool_declare(NodeDeclarationBuilder &b) { - b.add_output<decl::Bool>("Boolean"); + b.add_output<decl::Bool>(N_("Boolean")); }; static void fn_node_input_bool_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) diff --git a/source/blender/nodes/function/nodes/node_fn_input_color.cc b/source/blender/nodes/function/nodes/node_fn_input_color.cc index b6079835eae..43bb654b776 100644 --- a/source/blender/nodes/function/nodes/node_fn_input_color.cc +++ b/source/blender/nodes/function/nodes/node_fn_input_color.cc @@ -23,7 +23,7 @@ namespace blender::nodes { static void fn_node_input_color_declare(NodeDeclarationBuilder &b) { - b.add_output<decl::Color>("Color"); + b.add_output<decl::Color>(N_("Color")); }; static void fn_node_input_color_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) diff --git a/source/blender/nodes/function/nodes/node_fn_input_int.cc b/source/blender/nodes/function/nodes/node_fn_input_int.cc index db52d569ac5..ddbb86e2661 100644 --- a/source/blender/nodes/function/nodes/node_fn_input_int.cc +++ b/source/blender/nodes/function/nodes/node_fn_input_int.cc @@ -25,7 +25,7 @@ namespace blender::nodes { static void fn_node_input_int_declare(NodeDeclarationBuilder &b) { - b.add_output<decl::Int>("Integer"); + b.add_output<decl::Int>(N_("Integer")); }; static void fn_node_input_int_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) diff --git a/source/blender/nodes/function/nodes/node_fn_input_special_characters.cc b/source/blender/nodes/function/nodes/node_fn_input_special_characters.cc index 11c64d3f694..c61af419e50 100644 --- a/source/blender/nodes/function/nodes/node_fn_input_special_characters.cc +++ b/source/blender/nodes/function/nodes/node_fn_input_special_characters.cc @@ -20,8 +20,8 @@ namespace blender::nodes { static void fn_node_input_special_characters_declare(NodeDeclarationBuilder &b) { - b.add_output<decl::String>("Line Break"); - b.add_output<decl::String>("Tab"); + b.add_output<decl::String>(N_("Line Break")); + b.add_output<decl::String>(N_("Tab")); }; class MF_SpecialCharacters : public fn::MultiFunction { diff --git a/source/blender/nodes/function/nodes/node_fn_input_string.cc b/source/blender/nodes/function/nodes/node_fn_input_string.cc index 0982096eaea..dd2d1292601 100644 --- a/source/blender/nodes/function/nodes/node_fn_input_string.cc +++ b/source/blender/nodes/function/nodes/node_fn_input_string.cc @@ -24,7 +24,7 @@ namespace blender::nodes { static void fn_node_input_string_declare(NodeDeclarationBuilder &b) { b.is_function_node(); - b.add_output<decl::String>("String"); + b.add_output<decl::String>(N_("String")); }; static void fn_node_input_string_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) diff --git a/source/blender/nodes/function/nodes/node_fn_input_vector.cc b/source/blender/nodes/function/nodes/node_fn_input_vector.cc index f64fd182282..1e5fd186b5a 100644 --- a/source/blender/nodes/function/nodes/node_fn_input_vector.cc +++ b/source/blender/nodes/function/nodes/node_fn_input_vector.cc @@ -25,7 +25,7 @@ namespace blender::nodes { static void fn_node_input_vector_declare(NodeDeclarationBuilder &b) { - b.add_output<decl::Vector>("Vector"); + b.add_output<decl::Vector>(N_("Vector")); }; static void fn_node_input_vector_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) diff --git a/source/blender/nodes/function/nodes/node_fn_random_value.cc b/source/blender/nodes/function/nodes/node_fn_random_value.cc index 53ca77aab0c..d48b9f3461a 100644 --- a/source/blender/nodes/function/nodes/node_fn_random_value.cc +++ b/source/blender/nodes/function/nodes/node_fn_random_value.cc @@ -26,29 +26,29 @@ namespace blender::nodes { static void fn_node_random_value_declare(NodeDeclarationBuilder &b) { - b.add_input<decl::Vector>("Min").supports_field(); - b.add_input<decl::Vector>("Max").default_value({1.0f, 1.0f, 1.0f}).supports_field(); - b.add_input<decl::Float>("Min", "Min_001").supports_field(); - b.add_input<decl::Float>("Max", "Max_001").default_value(1.0f).supports_field(); - b.add_input<decl::Int>("Min", "Min_002").min(-100000).max(100000).supports_field(); - b.add_input<decl::Int>("Max", "Max_002") + b.add_input<decl::Vector>(N_("Min")).supports_field(); + b.add_input<decl::Vector>(N_("Max")).default_value({1.0f, 1.0f, 1.0f}).supports_field(); + b.add_input<decl::Float>(N_("Min"), "Min_001").supports_field(); + b.add_input<decl::Float>(N_("Max"), "Max_001").default_value(1.0f).supports_field(); + b.add_input<decl::Int>(N_("Min"), "Min_002").min(-100000).max(100000).supports_field(); + b.add_input<decl::Int>(N_("Max"), "Max_002") .default_value(100) .min(-100000) .max(100000) .supports_field(); - b.add_input<decl::Float>("Probability") + b.add_input<decl::Float>(N_("Probability")) .min(0.0f) .max(1.0f) .default_value(0.5f) .subtype(PROP_FACTOR) .supports_field(); - b.add_input<decl::Int>("ID").implicit_field(); - b.add_input<decl::Int>("Seed").default_value(0).min(-10000).max(10000).supports_field(); + b.add_input<decl::Int>(N_("ID")).implicit_field(); + b.add_input<decl::Int>(N_("Seed")).default_value(0).min(-10000).max(10000).supports_field(); - b.add_output<decl::Vector>("Value").dependent_field(); - b.add_output<decl::Float>("Value", "Value_001").dependent_field(); - b.add_output<decl::Int>("Value", "Value_002").dependent_field(); - b.add_output<decl::Bool>("Value", "Value_003").dependent_field(); + b.add_output<decl::Vector>(N_("Value")).dependent_field(); + b.add_output<decl::Float>(N_("Value"), "Value_001").dependent_field(); + b.add_output<decl::Int>(N_("Value"), "Value_002").dependent_field(); + b.add_output<decl::Bool>(N_("Value"), "Value_003").dependent_field(); } static void fn_node_random_value_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) diff --git a/source/blender/nodes/function/nodes/node_fn_replace_string.cc b/source/blender/nodes/function/nodes/node_fn_replace_string.cc index 1ec4979176e..881a3c68e7d 100644 --- a/source/blender/nodes/function/nodes/node_fn_replace_string.cc +++ b/source/blender/nodes/function/nodes/node_fn_replace_string.cc @@ -22,10 +22,11 @@ namespace blender::nodes { static void fn_node_replace_string_declare(NodeDeclarationBuilder &b) { - b.add_input<decl::String>("String"); - b.add_input<decl::String>("Find").description("The string to find in the input string"); - b.add_input<decl::String>("Replace").description("The string to replace each match with"); - b.add_output<decl::String>("String"); + b.add_input<decl::String>(N_("String")); + b.add_input<decl::String>(N_("Find")).description(N_("The string to find in the input string")); + b.add_input<decl::String>(N_("Replace")) + .description(N_("The string to replace each match with")); + b.add_output<decl::String>(N_("String")); }; static std::string replace_all(std::string str, const std::string &from, const std::string &to) diff --git a/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc b/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc index a01cc6b58dd..fc4c3d8221f 100644 --- a/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc +++ b/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc @@ -29,11 +29,11 @@ namespace blender::nodes { static void fn_node_rotate_euler_declare(NodeDeclarationBuilder &b) { b.is_function_node(); - b.add_input<decl::Vector>("Rotation").subtype(PROP_EULER).hide_value(); - b.add_input<decl::Vector>("Rotate By").subtype(PROP_EULER); - b.add_input<decl::Vector>("Axis").default_value({0.0, 0.0, 1.0}).subtype(PROP_XYZ); - b.add_input<decl::Float>("Angle").subtype(PROP_ANGLE); - b.add_output<decl::Vector>("Rotation"); + b.add_input<decl::Vector>(N_("Rotation")).subtype(PROP_EULER).hide_value(); + b.add_input<decl::Vector>(N_("Rotate By")).subtype(PROP_EULER); + b.add_input<decl::Vector>(N_("Axis")).default_value({0.0, 0.0, 1.0}).subtype(PROP_XYZ); + b.add_input<decl::Float>(N_("Angle")).subtype(PROP_ANGLE); + b.add_output<decl::Vector>(N_("Rotation")); }; static void fn_node_rotate_euler_update(bNodeTree *UNUSED(ntree), bNode *node) diff --git a/source/blender/nodes/function/nodes/node_fn_slice_string.cc b/source/blender/nodes/function/nodes/node_fn_slice_string.cc index 08e17da0d92..5cb753e8f34 100644 --- a/source/blender/nodes/function/nodes/node_fn_slice_string.cc +++ b/source/blender/nodes/function/nodes/node_fn_slice_string.cc @@ -22,10 +22,10 @@ namespace blender::nodes { static void fn_node_slice_string_declare(NodeDeclarationBuilder &b) { - b.add_input<decl::String>("String"); - b.add_input<decl::Int>("Position"); - b.add_input<decl::Int>("Length").min(0).default_value(10); - b.add_output<decl::String>("String"); + b.add_input<decl::String>(N_("String")); + b.add_input<decl::Int>(N_("Position")); + b.add_input<decl::Int>(N_("Length")).min(0).default_value(10); + b.add_output<decl::String>(N_("String")); }; static void fn_node_slice_string_build_multi_function(NodeMultiFunctionBuilder &builder) diff --git a/source/blender/nodes/function/nodes/node_fn_string_length.cc b/source/blender/nodes/function/nodes/node_fn_string_length.cc index d882280b566..63429d35993 100644 --- a/source/blender/nodes/function/nodes/node_fn_string_length.cc +++ b/source/blender/nodes/function/nodes/node_fn_string_length.cc @@ -24,8 +24,8 @@ namespace blender::nodes { static void fn_node_string_length_declare(NodeDeclarationBuilder &b) { - b.add_input<decl::String>("String"); - b.add_output<decl::Int>("Length"); + b.add_input<decl::String>(N_("String")); + b.add_output<decl::Int>(N_("Length")); }; static void fn_node_string_length_build_multi_function(NodeMultiFunctionBuilder &builder) diff --git a/source/blender/nodes/function/nodes/node_fn_value_to_string.cc b/source/blender/nodes/function/nodes/node_fn_value_to_string.cc index 112726f98dc..96a56760664 100644 --- a/source/blender/nodes/function/nodes/node_fn_value_to_string.cc +++ b/source/blender/nodes/function/nodes/node_fn_value_to_string.cc @@ -21,9 +21,9 @@ namespace blender::nodes { static void fn_node_value_to_string_declare(NodeDeclarationBuilder &b) { - b.add_input<decl::Float>("Value"); - b.add_input<decl::Int>("Decimals").min(0); - b.add_output<decl::String>("String"); + b.add_input<decl::Float>(N_("Value")); + b.add_input<decl::Int>(N_("Decimals")).min(0); + b.add_output<decl::String>(N_("String")); }; static void fn_node_value_to_string_build_multi_function(NodeMultiFunctionBuilder &builder) |