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>2021-09-28 23:21:36 +0300
committerHans Goudey <h.goudey@me.com>2021-09-28 23:21:36 +0300
commit9f0a3a99ab664bc0f6378c5a4d6ac9e16f1f59f7 (patch)
tree6b9a5ac3b19cb1169f5712e150e8ad1cc02c3d50 /source/blender/modifiers/intern/MOD_nodes_evaluator.cc
parent283d76a70dba69665d08039a0a7c675c9efc7110 (diff)
Geometry Nodes: Fields version of attribute proximity node
Add a fields-aware implementation of the attribute proximity node. The Source position is an implicit position field, but can be connected with a position input node with alterations before use. The target input and mode function the same as the original node. Patch by Johnny Matthews with edits from Hans Goudey (@HooglyBoogly). Differential Revision: https://developer.blender.org/D12635
Diffstat (limited to 'source/blender/modifiers/intern/MOD_nodes_evaluator.cc')
-rw-r--r--source/blender/modifiers/intern/MOD_nodes_evaluator.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
index b9a9437d761..592e6180f80 100644
--- a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
+++ b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
@@ -329,7 +329,11 @@ static void get_socket_value(const SocketRef &socket, void *r_value)
if (bsocket.flag & SOCK_HIDE_VALUE) {
const bNode &bnode = *socket.bnode();
if (bsocket.type == SOCK_VECTOR) {
- if (ELEM(bnode.type, GEO_NODE_SET_POSITION, SH_NODE_TEX_NOISE, GEO_NODE_MESH_TO_POINTS)) {
+ if (ELEM(bnode.type,
+ GEO_NODE_SET_POSITION,
+ SH_NODE_TEX_NOISE,
+ GEO_NODE_MESH_TO_POINTS,
+ GEO_NODE_PROXIMITY)) {
new (r_value) Field<float3>(
std::make_shared<bke::AttributeFieldInput>("position", CPPType::get<float3>()));
return;