Add a simple Switch node #85374
Labels
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
12 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#85374
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement a simple first iteration of a switch node that only supports to be based on a boolean primary input to switch between two secondary inputs.
(It is planned to get this based on an index integer with variable amount of secondary inputs, but there needs to be a solid design for that first. The multi-input socket is currently not suitable when the order matters.)
The name of the output socket should depend on the set type.
The enum to choose the type of the output and secondary inputs should contain the following options:
--
Implementation:
{F10051197, size=full}
Added subscriber: @SimonThommes
Added subscriber: @someuser
imho switch node need integer variable as index input (not binary thing)
and multiinput socket for:
Integer
Boolean
Vector
Color
String
Geometry
Object
Collection
Added subscriber: @KenzieMac130
Hard agree! It should still handle binary switches but being able to switch between many different versions of geometry is just as crucial if not more than the merge node accepting more than one item.
@someuser @astrand130
Note:
It is planned to support a variable amount of inputs in the future, but there needs to be a solid design for that first. The multi-input socket is currently not suitable when the order matters.
For now this is just a first step to get the binary functionality as a node faster.
I updated the description of the task to make this more clear.
Added subscriber: @MiroHorvath
Added subscriber: @pablovazquez
Posting this mockup of how a more advanced version of this node would be. (shared it on blender.chat but keeping it here for later reference)
Basic design on the left. Possible look when connected on the right, with a subtle highlight on the matching socket. And socket number displayed when connected.
{F9813701, size=full}
Added subscriber: @Erindale
I think it should not have separate input sockets as we've already got the multi input sockets with the Join node. Perhaps it could have the multi input socket and highlight the connecting noodle to show which one is selected?
That might be slightly an accessibility concern if it's not clear which input is live or how to reorder inputs but maybe better than adding another UI design.
Added subscriber: @satishgoda1
Added subscriber: @guitargeek
This issue was referenced by
799f532f46
Added subscriber: @baoyu
please add this in the shader node too!
Added subscriber: @Eary
I think in shader nodes, we already have the Mix RGB and Mix Shader for similar usage. It is just that in Geometry Nodes' context, a "switch" makes more sense than a "mix", imho
Of course the mix node can do the job. It's just like the relationship between "switch case" and "if else" in programming languages. It tides up the node tree and make it more readable and much eaiser to manage.
In shader nodes, say I want to make a material for 100 photo, which are made of the same paper, the only difference is that their content differs. In this example you could tweak one as standard and use it to duplicate 100 materials. What if you want to change the roughness or any other mat?
Then comes the mix node, use object id as the mix factor to recursivly mix between 100 photo. While the node tree will be to long to read and manage.
Added subscriber: @dfelinto
There is some discussion regarding the name.
Changed status from 'Needs Triage' to: 'Confirmed'
Changed status from 'Confirmed' to: 'Resolved'