diff options
author | Hans Goudey <h.goudey@me.com> | 2021-03-13 22:13:16 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-03-13 22:13:16 +0300 |
commit | ba3a0dc9ba91e2f55e3632a69f8671079d871a94 (patch) | |
tree | 407aab052755863fdc32d400790a941e50868093 /source/blender/nodes | |
parent | 2966871a7a891bf36b261419a5b09ecff93504e0 (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/nodes')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc index 45aaf81d63f..54b0c07a0a0 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc @@ -224,7 +224,7 @@ static void join_components(Span<const MeshComponent *> src_components, Geometry /* Don't copy attributes that are stored directly in the mesh data structs. */ join_attributes(to_base_components(src_components), dst_component, - {"position", "material_index", "vertex_normal", "shade_smooth"}); + {"position", "material_index", "normal", "shade_smooth"}); } static void join_components(Span<const PointCloudComponent *> src_components, GeometrySet &result) |