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
Member

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.

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.
Hans Goudey added 1 commit 2023-04-11 21:13:11 +02:00
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.
Hans Goudey requested review from Lukas Tönne 2023-04-11 21:13:28 +02:00
Hans Goudey requested review from Jacques Lucke 2023-04-11 21:13:28 +02:00
Member

I assume this is supposed to be a utility to prevent users from running into non-working situation too easily, rather than being a strict limitation? Because it seems quite easy to circumvent, e.g. by switching render engines or by using the same node group in both Material and World shaders (can add a node in one instance but not the other).

I'm ok with that since it seems to be considered a high-priority regression and the code is simple enough.

I assume this is supposed to be a utility to prevent users from running into non-working situation _too easily_, rather than being a strict limitation? Because it seems quite easy to circumvent, e.g. by switching render engines or by using the same node group in both Material and World shaders (can add a node in one instance but not the other). I'm ok with that since it seems to be considered a high-priority regression and the code is simple enough.
Lukas Tönne approved these changes 2023-04-12 11:36:48 +02:00
Author
Member

I assume this is supposed to be a utility to prevent users from running into non-working situation too easily

Yeah, exactly. And I mentioned loosening the restriction in the future possibly because I don't think it's necessarily wrong to have a shader with both a world output and a material output. Just really uncommon and more confusing than helpful I'm guessing.

Thanks for checking this out.

>I assume this is supposed to be a utility to prevent users from running into non-working situation too easily Yeah, exactly. And I mentioned loosening the restriction in the future possibly because I don't think it's necessarily wrong to have a shader with both a world output and a material output. Just really uncommon and more confusing than helpful I'm guessing. Thanks for checking this out.
Jacques Lucke approved these changes 2023-04-19 15:15:30 +02:00
Hans Goudey merged commit d6abd2ce72 into main 2023-04-19 15:48:33 +02:00
Hans Goudey deleted branch nodes-add-ui-poll 2023-04-19 15:48:33 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#106829
No description provided.