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:
authorPeter Sergay <psergay>2021-10-20 19:48:53 +0300
committerHans Goudey <h.goudey@me.com>2021-10-20 19:48:53 +0300
commit9959c5315f462371c55f4164427af64f9d588d15 (patch)
tree2b31a4242079b928d23a2256f2361150adcf8f13 /source/blender/nodes/geometry/nodes/node_geo_proximity.cc
parent7d111f4ac2b1321fc9387922c606381cadd3f3ad (diff)
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
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_proximity.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_proximity.cc6
1 files changed, 6 insertions, 0 deletions
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();
}