diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-06 21:20:03 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-06 21:23:41 +0300 |
commit | ced56dbc5396521e9fe51c0b59041f6577cd6135 (patch) | |
tree | 55f22d622b21d104baa561c46f7ce9359d12ef13 /source/blender/blenkernel/intern/attribute_access_intern.hh | |
parent | 394c0b5ae4d9b28e8624ea831e20e011a687f71e (diff) |
Fix: Restore fix for empty attributes after recent commit
3484c6d4f116409 removed parts of 6e5eb46d7339591 by mistake,
returning no attribute when attribute data wasn't found. However, we
want that attributes can exist even on empty geometry. This commit
restores the fix and tries to make it more explicit to avoid the same
mistake again.
Differential Revision: https://developer.blender.org/D15899
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, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/attribute_access_intern.hh b/source/blender/blenkernel/intern/attribute_access_intern.hh index d8550c596f2..8050f45da94 100644 --- a/source/blender/blenkernel/intern/attribute_access_intern.hh +++ b/source/blender/blenkernel/intern/attribute_access_intern.hh @@ -258,6 +258,9 @@ class BuiltinCustomDataLayerProvider final : public BuiltinAttributeProvider { bool try_delete(void *owner) const final; bool try_create(void *owner, const AttributeInit &initializer) const final; bool exists(const void *owner) const final; + + private: + bool layer_exists(const CustomData &custom_data) const; }; /** |