[Bf-blender-cvs] [cffd4a7ccf7] temp-geometry-nodes-fields: Cleanup: Add comment about reusing span for input and output
Hans Goudey
noreply at git.blender.org
Tue Sep 7 03:43:31 CEST 2021
Commit: cffd4a7ccf7dcf0d92d1b2392ac5adba9a965cdb
Author: Hans Goudey
Date: Mon Sep 6 20:43:21 2021 -0500
Branches: temp-geometry-nodes-fields
https://developer.blender.org/rBcffd4a7ccf7dcf0d92d1b2392ac5adba9a965cdb
Cleanup: Add comment about reusing span for input and output
===================================================================
M source/blender/nodes/geometry/nodes/node_geo_point_translate.cc
===================================================================
diff --git a/source/blender/nodes/geometry/nodes/node_geo_point_translate.cc b/source/blender/nodes/geometry/nodes/node_geo_point_translate.cc
index ad91cb2d377..48778532789 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_point_translate.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_point_translate.cc
@@ -90,7 +90,9 @@ static void execute_on_component(GeometryComponent &component,
/* Add an add operation field on top of the provided translation field, which can be evaluated
* directly into the position virtual array. That way, any optimizations can be done more
- * generally for the whole evaluation system. */
+ * generally for the whole evaluation system. In the general case it may not work to share the
+ * same span for the input and output of an evaluation, but in this case there there is only one
+ * output, so it is fine. */
static const fn::CustomMF_SI_SI_SO<float3, float3, float3> add_fn = {
"Add", [](float3 a, float3 b) { return a + b; }};
std::shared_ptr<fn::FieldOperation> add_operation = std::make_shared<fn::FieldOperation>(
More information about the Bf-blender-cvs
mailing list