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:
authorHans Goudey <h.goudey@me.com>2021-03-13 22:13:16 +0300
committerHans Goudey <h.goudey@me.com>2021-03-13 22:13:16 +0300
commitba3a0dc9ba91e2f55e3632a69f8671079d871a94 (patch)
tree407aab052755863fdc32d400790a941e50868093 /source/blender/blenkernel/intern/geometry_set_instances.cc
parent2966871a7a891bf36b261419a5b09ecff93504e0 (diff)
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
Diffstat (limited to 'source/blender/blenkernel/intern/geometry_set_instances.cc')
-rw-r--r--source/blender/blenkernel/intern/geometry_set_instances.cc2
1 files changed, 1 insertions, 1 deletions
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<GeometryInstanceGroup> 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<GeometryComponent &>(dst_component));
}