[Bf-blender-cvs] [3b8d702a2f0] master: Geometry Nodes: use implicit position input in noise node

Jacques Lucke noreply at git.blender.org
Mon Sep 20 19:01:28 CEST 2021


Commit: 3b8d702a2f071319d53aa622ebed0e9bc4ff3876
Author: Jacques Lucke
Date:   Mon Sep 20 19:01:08 2021 +0200
Branches: master
https://developer.blender.org/rB3b8d702a2f071319d53aa622ebed0e9bc4ff3876

Geometry Nodes: use implicit position input in noise node

This is the same behavior as in shader nodes.

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

M	source/blender/modifiers/intern/MOD_nodes_evaluator.cc

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

diff --git a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
index a215ad4d21a..56de0f87ed8 100644
--- a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
+++ b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
@@ -326,7 +326,8 @@ static void get_socket_value(const SocketRef &socket, void *r_value)
    * more complex defaults (other than just single values) in their socket declarations. */
   if (bsocket.flag & SOCK_HIDE_VALUE) {
     const bNode &bnode = *socket.bnode();
-    if (bsocket.type == SOCK_VECTOR && bnode.type == GEO_NODE_SET_POSITION) {
+    if (bsocket.type == SOCK_VECTOR &&
+        ELEM(bnode.type, GEO_NODE_SET_POSITION, SH_NODE_TEX_NOISE)) {
       new (r_value) Field<float3>(
           std::make_shared<bke::AttributeFieldInput>("position", CPPType::get<float3>()));
       return;



More information about the Bf-blender-cvs mailing list