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.
This commit is contained in:
@@ -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});
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user