diff options
author | Charlie Jolly <mistajolly@gmail.com> | 2021-12-31 04:15:00 +0300 |
---|---|---|
committer | Charlie Jolly <mistajolly@gmail.com> | 2021-12-31 04:15:00 +0300 |
commit | 0aa73156083821d45c7794ea964d7fd5e6d13b25 (patch) | |
tree | fc477f331d16f9ae6cf15025c1bd1d0b8134ea8a | |
parent | bf4358ed0c545a14686af0d91ab78d784b988def (diff) |
Fix (unreported): remove menu separators from drag link search
Search was picking up the menu separator entries.
Add check for these which are defined by empty identifier strings.
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_math.cc | 2 | ||||
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_vector_math.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_math.cc b/source/blender/nodes/shader/nodes/node_shader_math.cc index 677e62d14b2..7337a1172bf 100644 --- a/source/blender/nodes/shader/nodes/node_shader_math.cc +++ b/source/blender/nodes/shader/nodes/node_shader_math.cc @@ -72,7 +72,7 @@ static void sh_node_math_gather_link_searches(GatherLinkSearchOpParams ¶ms) static_cast<eNodeSocketDatatype>(params.other_socket().type), SOCK_FLOAT)) { for (const EnumPropertyItem *item = rna_enum_node_math_items; item->identifier != nullptr; item++) { - if (item->name != nullptr) { + if (item->name != nullptr && item->identifier != "") { params.add_item(IFACE_(item->name), SocketSearchOp{"Value", (NodeMathOperation)item->value}); } diff --git a/source/blender/nodes/shader/nodes/node_shader_vector_math.cc b/source/blender/nodes/shader/nodes/node_shader_vector_math.cc index 312929abd0d..0218e759bea 100644 --- a/source/blender/nodes/shader/nodes/node_shader_vector_math.cc +++ b/source/blender/nodes/shader/nodes/node_shader_vector_math.cc @@ -66,7 +66,7 @@ static void sh_node_vector_math_gather_link_searches(GatherLinkSearchOpParams &p for (const EnumPropertyItem *item = rna_enum_node_vec_math_items; item->identifier != nullptr; item++) { - if (item->name != nullptr) { + if (item->name != nullptr && item->identifier != "") { if ((params.in_out() == SOCK_OUT) && ELEM(item->value, NODE_VECTOR_MATH_LENGTH, NODE_VECTOR_MATH_DISTANCE, |