Fix #146020: bad assert for supported socket types
The tree-type argument for the `supports_socket_type` type should be allowed to be anything. There doesn't seem to be a great benefit in restricting it. Always returning false when the tree type is not supported makes sense. In addition it would also be good to double-check that one can't add the bundle and closure nodes in the compositor yet. From my basic tests, that seems to work as expected.
This commit is contained in:
@@ -41,7 +41,6 @@ inline bool socket_type_supported_in_bundle(const eNodeSocketDatatype socket_typ
|
||||
SOCK_CLOSURE,
|
||||
SOCK_INT);
|
||||
default:
|
||||
BLI_assert_unreachable();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@ inline bool socket_type_supported_in_closure(const eNodeSocketDatatype socket_ty
|
||||
SOCK_CLOSURE,
|
||||
SOCK_INT);
|
||||
default:
|
||||
BLI_assert_unreachable();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,6 @@ struct RepeatItemsAccessor : public socket_items::SocketItemsAccessorDefaults {
|
||||
SOCK_CLOSURE,
|
||||
SOCK_INT);
|
||||
default:
|
||||
BLI_assert_unreachable();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user