diff options
author | Hans Goudey <h.goudey@me.com> | 2021-03-13 22:05:00 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-03-13 22:05:00 +0300 |
commit | 2966871a7a891bf36b261419a5b09ecff93504e0 (patch) | |
tree | 2264aa120141235cdff99888114972133d19967a /source/blender/blenkernel/intern/attribute_access_intern.hh | |
parent | 88f845c881d8e9285c86810755d673642bcbe1e0 (diff) |
Geometry Nodes: Revert current normal attribute implementation
After further thought, the implementation of the "normal" attribute
from D10541 is not the best approach to expose this data, mainly
because it blindly copied existing design rather than using the
best method in the context of the generalized attribute system.
In Blender, vertex normals are simply a cache of the average normals
from the surrounding / connected faces. Because we have automatic
interpolation between domains already, we don't need a special
`vertex_normal` attribute for this case, we can just let the
generalized interpolation do the hard work where necessary,
simplifying the set of built-in attributes to only include the
`normal` attribute from faces.
The fact that vertex normals are just a cache also raised another
issue, because the cache could be dirty, so mutex locks were
necessary to calculate normals. That isn't necessarily a problem,
but it's nice to avoid where possible.
Another downside of the current attribute naming is that after the
point distribute node there would be two normal attributes.
This commit reverts the `vertex_normal` attribute so that
it can be replaced by the implementation in D10677.
Differential Revision: https://developer.blender.org/D10676
Diffstat (limited to 'source/blender/blenkernel/intern/attribute_access_intern.hh')
-rw-r--r-- | source/blender/blenkernel/intern/attribute_access_intern.hh | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/attribute_access_intern.hh b/source/blender/blenkernel/intern/attribute_access_intern.hh index 299da4c97fe..19349c69662 100644 --- a/source/blender/blenkernel/intern/attribute_access_intern.hh +++ b/source/blender/blenkernel/intern/attribute_access_intern.hh @@ -405,7 +405,6 @@ class BuiltinCustomDataLayerProvider final : public BuiltinAttributeProvider { const CustomDataAccessInfo custom_data_access_; const AsReadAttribute as_read_attribute_; const AsWriteAttribute as_write_attribute_; - const UpdateOnRead update_on_read_; const UpdateOnWrite update_on_write_; public: @@ -419,7 +418,6 @@ class BuiltinCustomDataLayerProvider final : public BuiltinAttributeProvider { const CustomDataAccessInfo custom_data_access, const AsReadAttribute as_read_attribute, const AsWriteAttribute as_write_attribute, - const UpdateOnRead update_on_read, const UpdateOnWrite update_on_write) : BuiltinAttributeProvider( std::move(attribute_name), domain, attribute_type, creatable, writable, deletable), @@ -427,7 +425,6 @@ class BuiltinCustomDataLayerProvider final : public BuiltinAttributeProvider { custom_data_access_(custom_data_access), as_read_attribute_(as_read_attribute), as_write_attribute_(as_write_attribute), - update_on_read_(update_on_read), update_on_write_(update_on_write) { } |