diff options
author | Hans Goudey <h.goudey@me.com> | 2021-03-26 18:38:46 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-03-26 18:38:46 +0300 |
commit | 3d256694864b86efa5014fc2164ded8a624a9c8d (patch) | |
tree | 9cdcab8c14cad8d98d92787878a8fcd78e846765 /source | |
parent | 252c87b9e87242a85a644da25edc739cf247d322 (diff) |
Cleanup: Geometry Nodes: Allow using "Auto" domain to avoid adapting
Now that we have `ATTR_DOMAIN_AUTO`, it makes sense to use it to skip
automatic domain interpolation. This can make code that depends on the
non-interpolated domain of the attribute a bit simpler.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/attribute_access.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/attribute_access.cc b/source/blender/blenkernel/intern/attribute_access.cc index 05da47aed8e..52f89ca302b 100644 --- a/source/blender/blenkernel/intern/attribute_access.cc +++ b/source/blender/blenkernel/intern/attribute_access.cc @@ -893,7 +893,7 @@ ReadAttributePtr GeometryComponent::attribute_try_get_for_read( return {}; } - if (attribute->domain() != domain) { + if (domain != ATTR_DOMAIN_AUTO && attribute->domain() != domain) { attribute = this->attribute_try_adapt_domain(std::move(attribute), domain); if (!attribute) { return {}; |