[Bf-blender-cvs] [58bac408ef4] temp-node-error-messages: Add error message in attribute randomize node
Hans Goudey
noreply at git.blender.org
Tue Feb 16 15:11:32 CET 2021
Commit: 58bac408ef45b108b5d5a4f1103b592923f74eec
Author: Hans Goudey
Date: Mon Feb 15 23:42:12 2021 -0600
Branches: temp-node-error-messages
https://developer.blender.org/rB58bac408ef45b108b5d5a4f1103b592923f74eec
Add error message in attribute randomize node
===================================================================
M source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc
===================================================================
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc
index 8a098c366a0..4a18544671c 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc
@@ -214,6 +214,8 @@ static void randomize_attribute_on_component(GeometryComponent &component,
* doesn't already exist, don't do the operation. */
if (operation != GEO_NODE_ATTRIBUTE_RANDOMIZE_REPLACE_CREATE) {
if (!component.attribute_exists(attribute_name)) {
+ params.error_message_add(NodeWarningType::Error,
+ "Attribute with name \'" + attribute_name + "\' does not exist.");
return;
}
}
More information about the Bf-blender-cvs
mailing list