Fix #106138: Node add searches missing context-based poll #106829

Merged
Hans Goudey merged 1 commits from HooglyBoogly/blender:nodes-add-ui-poll into main 2023-04-19 15:48:33 +02:00

1 Commits

Author SHA1 Message Date
Hans Goudey 1c503b4fb3 Fix #106138: Node add searches missing context-based poll
Before the add node search refactor and link-drag-search, nodes were
filtered out based on whether they worked with the active render
engine. For example, the Principled Hair BSDF node doesn't work with
EEVEE, so it isn't displayed in the UI. While we might want to relax
this in the future, we have no better way to show that they don't work
right now, so it's best to keep that behavior.

The filtering is implemented with a new node type callback, mainly
to reduce the boilerplate of implementing many node search callbacks
otherwise. It's also relatively clear this way I think. The only
downside is that now there are three poll functions.

I didn't port the "eevee_cycles_shader_nodes_poll" to the new
searches, since I don't understand the purpose of it.
2023-04-11 15:12:09 -04:00