Commit: 9959c5315f462371c55f4164427af64f9d588d15 Author: Peter Sergay Date: Wed Oct 20 11:48:53 2021 -0500 Branches: master https://developer.blender.org/rB9959c5315f462371c55f4164427af64f9d588d15
Geometry Nodes: Add warnings for instances input in two nodes Certain geometry nodes don't work properly on inputs that contain instances, but don't display any warning that they aren't working. The nodes now will display a warning that explains the situtation iff the input contains any instances. Differential Revision: https://developer.blender.org/D12858 =================================================================== M source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc M source/blender/nodes/geometry/nodes/node_geo_proximity.cc =================================================================== diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc index 6abb7cc31ac..6d371c27d43 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc @@ -237,6 +237,12 @@ static void geo_node_curve_sample_exec(GeoNodeExecParams params) params.set_output("Normal", fn::make_constant_field<float3>({0.0f, 0.0f, 0.0f})); }; + if (geometry_set.has_instances()) { + params.error_message_add( + NodeWarningType::Info, + TIP_("The node only supports realized curve data, instances are ignored")); + } + const CurveComponent *component = geometry_set.get_component_for_read<CurveComponent>(); if (component == nullptr) { return return_default(); diff --git a/source/blender/nodes/geometry/nodes/node_geo_proximity.cc b/source/blender/nodes/geometry/nodes/node_geo_proximity.cc index 02694a4a496..ec4d6ceb728 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_proximity.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_proximity.cc @@ -214,6 +214,12 @@ static void geo_node_proximity_exec(GeoNodeExecParams params) params.set_output("Distance", fn::make_constant_field<float>(0.0f)); }; + if (geometry_set_target.has_instances()) { + params.error_message_add( + NodeWarningType::Info, + TIP_("The node only supports realized mesh or point cloud data, instances are ignored")); + } + if (!geometry_set_target.has_mesh() && !geometry_set_target.has_pointcloud()) { return return_default(); } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs