Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-08-07 01:00:53 +0300
committerHans Goudey <h.goudey@me.com>2022-08-07 01:01:01 +0300
commit800c7dbf41a2d1f79ce7517c5a5e9a69a51ac4cf (patch)
treee2642f1efed3c2b9f155173bdf37bf0d99ec276c /source/blender/nodes/geometry/nodes/node_geo_deform_curves_on_surface.cc
parentd58476049e2ae2e407d66cbb4d5eac65b594509a (diff)
Fix: Missing translation in deform curves on surface node
Also add an error message for when the node is used on non-curves objects, since there's nothing in the UI to show why it doesn't work except for that. And also use quotes when referring to attribute names.
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_deform_curves_on_surface.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_deform_curves_on_surface.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_deform_curves_on_surface.cc b/source/blender/nodes/geometry/nodes/node_geo_deform_curves_on_surface.cc
index e739b052b6b..5a40ededa96 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_deform_curves_on_surface.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_deform_curves_on_surface.cc
@@ -222,13 +222,13 @@ static void node_geo_exec(GeoNodeExecParams params)
const Object *self_ob_eval = params.self_object();
if (self_ob_eval == nullptr || self_ob_eval->type != OB_CURVES) {
pass_through_input();
+ params.error_message_add(NodeWarningType::Error, TIP_("Node only works for curves objects"));
return;
}
const Curves *self_curves_eval = static_cast<const Curves *>(self_ob_eval->data);
if (self_curves_eval->surface_uv_map == nullptr || self_curves_eval->surface_uv_map[0] == '\0') {
pass_through_input();
- const char *message = TIP_("Surface UV map not defined");
- params.error_message_add(NodeWarningType::Error, message);
+ params.error_message_add(NodeWarningType::Error, TIP_("Surface UV map not defined"));
return;
}
/* Take surface information from self-object. */
@@ -242,7 +242,7 @@ static void node_geo_exec(GeoNodeExecParams params)
}
if (surface_ob_eval == nullptr || surface_ob_eval->type != OB_MESH) {
pass_through_input();
- params.error_message_add(NodeWarningType::Error, "Curves not attached to a surface");
+ params.error_message_add(NodeWarningType::Error, TIP_("Curves not attached to a surface"));
return;
}
Object *surface_ob_orig = DEG_get_original_object(surface_ob_eval);
@@ -258,7 +258,7 @@ static void node_geo_exec(GeoNodeExecParams params)
Mesh *surface_mesh_eval = BKE_modifier_get_evaluated_mesh_from_evaluated_object(surface_ob_eval);
if (surface_mesh_eval == nullptr) {
pass_through_input();
- params.error_message_add(NodeWarningType::Error, "Surface has no mesh");
+ params.error_message_add(NodeWarningType::Error, TIP_("Surface has no mesh"));
return;
}
@@ -272,7 +272,7 @@ static void node_geo_exec(GeoNodeExecParams params)
if (!mesh_attributes_eval.contains(uv_map_name)) {
pass_through_input();
- char *message = BLI_sprintfN(TIP_("Evaluated surface missing UV map: %s"),
+ char *message = BLI_sprintfN(TIP_("Evaluated surface missing UV map: \"%s\""),
uv_map_name.c_str());
params.error_message_add(NodeWarningType::Error, message);
MEM_freeN(message);
@@ -280,7 +280,8 @@ static void node_geo_exec(GeoNodeExecParams params)
}
if (!mesh_attributes_orig.contains(uv_map_name)) {
pass_through_input();
- char *message = BLI_sprintfN(TIP_("Original surface missing UV map: %s"), uv_map_name.c_str());
+ char *message = BLI_sprintfN(TIP_("Original surface missing UV map: \"%s\""),
+ uv_map_name.c_str());
params.error_message_add(NodeWarningType::Error, message);
MEM_freeN(message);
return;
@@ -288,7 +289,7 @@ static void node_geo_exec(GeoNodeExecParams params)
if (!mesh_attributes_eval.contains(rest_position_name)) {
pass_through_input();
params.error_message_add(NodeWarningType::Error,
- TIP_("Evaluated surface missing attribute: rest_position"));
+ TIP_("Evaluated surface missing attribute: \"rest_position\""));
return;
}
if (curves.surface_uv_coords().is_empty() && curves.curves_num() > 0) {