Commit: ad05b78d092ae0c837d96598322fcce1fb3be12f
Author: Iliya Katueshenock
Date:   Fri Dec 9 15:29:03 2022 -0600
Branches: master
https://developer.blender.org/rBad05b78d092ae0c837d96598322fcce1fb3be12f

Geometry Nodes: Improve viewer node domain choice for blur node

Add preferred domain based on the "Value" input field. Most often,
the domain must match the original domain for the value.

Differential Revision: https://developer.blender.org/D16730

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

M       source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc

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

diff --git a/source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc 
b/source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc
index f53364aebdb..ca373cdf4d9 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc
@@ -14,6 +14,7 @@
 
 #include "BKE_attribute_math.hh"
 #include "BKE_curves.hh"
+#include "BKE_geometry_fields.hh"
 #include "BKE_mesh.h"
 #include "BKE_mesh_mapping.h"
 
@@ -443,6 +444,11 @@ class BlurAttributeFieldInput final : public 
bke::GeometryFieldInput {
     }
     return false;
   }
+
+  std::optional<eAttrDomain> preferred_domain(const GeometryComponent 
&component) const override
+  {
+    return bke::try_detect_field_domain(component, value_field_);
+  }
 };
 
 static StringRefNull identifier_suffix(eCustomDataType data_type)

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to