Commit: 3d256694864b86efa5014fc2164ded8a624a9c8d
Author: Hans Goudey
Date:   Fri Mar 26 11:38:46 2021 -0400
Branches: master
https://developer.blender.org/rB3d256694864b86efa5014fc2164ded8a624a9c8d

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.

===================================================================

M       source/blender/blenkernel/intern/attribute_access.cc

===================================================================

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 {};

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to