Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-09-23 21:56:35 +0300
committerHans Goudey <h.goudey@me.com>2022-09-23 21:56:35 +0300
commitdedc679ecabb43e79b0160a7c64bbd616adfa829 (patch)
treec91dd88b31fb20cfeed77c65b6afff6de1977d18 /source/blender/blenkernel/intern/node.cc
parentd5554cdc7c900880571c4265c9f3f7a7cfec6071 (diff)
Geometry Nodes: Split transfer attribute node
This patch replaces the existing transfer attribute node with three nodes, "Sample Nearest Surface", "Sample Index", and "Sample Nearest". This follows the design in T100010, allowing for new nodes like UV sampling in the future. There is versioning so the new nodes replace the old ones and are relinked as necessary. The "Sample Nearest Surface" node is meant for the more complex sampling algorithms that only work on meshes and interpolate values inside of faces. The new "Sample Index" just retrieves attributes from a geometry at specific indices. It doesn't have implicit behavior like the old transfer mode, which should make it more predictable. In order to not change the behavior from existing files, the node has a has a "Clamp", which is off by default for consistency with the "Field at Index" node. The "Sample Nearest" node returns the index of the nearest element on a geometry. It can be combined with the "Sample Index" node for the same functionality as the old transfer node. This node can support curves in the future. Backwards compatibility is handled by versioning, but old versions can not understand these nodes. The warning from 680fa8a523e0 should make this explicit in 3.3 and earlier. Differential Revision: https://developer.blender.org/D15909
Diffstat (limited to 'source/blender/blenkernel/intern/node.cc')
-rw-r--r--source/blender/blenkernel/intern/node.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc
index e5eb7a6c59a..1c7b1b9fa3e 100644
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@ -4800,6 +4800,9 @@ static void registerGeometryNodes()
register_node_type_geo_realize_instances();
register_node_type_geo_remove_attribute();
register_node_type_geo_rotate_instances();
+ register_node_type_geo_sample_index();
+ register_node_type_geo_sample_nearest_surface();
+ register_node_type_geo_sample_nearest();
register_node_type_geo_scale_elements();
register_node_type_geo_scale_instances();
register_node_type_geo_separate_components();
@@ -4821,7 +4824,6 @@ static void registerGeometryNodes()
register_node_type_geo_string_to_curves();
register_node_type_geo_subdivision_surface();
register_node_type_geo_switch();
- register_node_type_geo_transfer_attribute();
register_node_type_geo_transform();
register_node_type_geo_translate_instances();
register_node_type_geo_triangulate();