[Bf-blender-cvs] [55f27617cf3] master: Geometry Nodes: Add mesh input warning to curve to mesh node
Hans Goudey
noreply at git.blender.org
Fri Jul 2 20:26:21 CEST 2021
Commit: 55f27617cf3d527d4f9ed47d0bf739af44651960
Author: Hans Goudey
Date: Fri Jul 2 13:24:42 2021 -0500
Branches: master
https://developer.blender.org/rB55f27617cf3d527d4f9ed47d0bf739af44651960
Geometry Nodes: Add mesh input warning to curve to mesh node
A point of confusion about this node is that it doesn't work on the
output of the mesh circle primitive node. This patch adds a warning to
help with that. This avoids adding a warning when the geometry set
input has no mesh.
Differential Revision: https://developer.blender.org/D11771
===================================================================
M source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc
===================================================================
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc
index c0d817385e2..159c4fffb57 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc
@@ -337,7 +337,17 @@ static void geo_node_curve_to_mesh_exec(GeoNodeExecParams params)
curve_set = bke::geometry_set_realize_instances(curve_set);
profile_set = bke::geometry_set_realize_instances(profile_set);
+ /* Note: Theoretically an "is empty" check would be more correct for errors. */
+ if (profile_set.has_mesh() && !profile_set.has_curve()) {
+ params.error_message_add(NodeWarningType::Warning,
+ TIP_("No curve data available in profile input"));
+ }
+
if (!curve_set.has_curve()) {
+ if (curve_set.has_mesh()) {
+ params.error_message_add(NodeWarningType::Warning,
+ TIP_("No curve data available in curve input"));
+ }
params.set_output("Mesh", GeometrySet());
return;
}
More information about the Bf-blender-cvs
mailing list