From ba3a0dc9ba91e2f55e3632a69f8671079d871a94 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Sat, 13 Mar 2021 14:13:16 -0500 Subject: Geometry Nodes: Add "normal" attribute for face normals This commit adds a `normal` attribute on the polygon domain. Since normal data is derived data purely based off of the location of each face's vertices, it is exposed as a read-only attribute. After rB80f7f1070f17, this attribute can be interpolated to the other domains. Since this attribute is a special case compared to the others, the implementation subclasses `BuiltinAttributeProvider`. It's possible there is a better way to abstract this. Something else might also become apparent if we add similar read-only attributes. See rB2966871a7a891bf36 for why this is preferred over the previous implementation. Differential Revision: https://developer.blender.org/D10677 --- source/blender/blenkernel/intern/geometry_set_instances.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/geometry_set_instances.cc') diff --git a/source/blender/blenkernel/intern/geometry_set_instances.cc b/source/blender/blenkernel/intern/geometry_set_instances.cc index 70b48a253ed..fc9d793c119 100644 --- a/source/blender/blenkernel/intern/geometry_set_instances.cc +++ b/source/blender/blenkernel/intern/geometry_set_instances.cc @@ -381,7 +381,7 @@ static void join_instance_groups_mesh(Span set_groups, gather_attribute_info(attributes, component_types, set_groups, - {"position", "material_index", "vertex_normal", "shade_smooth"}); + {"position", "material_index", "normal", "shade_smooth"}); join_attributes( set_groups, component_types, attributes, static_cast(dst_component)); } -- cgit v1.2.3