Nodes: improve temp viewer from Connect to Output #122520

Merged
Jacques Lucke merged 4 commits from pioverfour/blender:dp_connect_output_socket_color into blender-v4.2-release 2024-06-06 14:47:55 +02:00
Member

This PR changes the temporary viewers created in node groups by Connect to Output in two ways:

  • Rename it, as it is currently called "tmp_viewer", which stands out
    as strange and code-like. It is renamed to "(Viewer)", which can be
    translated.

  • Use the actual connected socket type.
    Currently the viewer uses hardcoded socket types (Geometry for Geometry
    Nodes, Shader for shader nodes). While in GN we can only connect
    geometry to the output, in shader nodes other types can be inspected.
    This change allows the tmp_viewer to use the type of the actual socket
    being inspected, to have a better idea of what it contains from
    outside the group.

    It can be especially useful if a group is used in multiple materials
    and different sockets are being previewed in each one.

It also does some cleanup, details in the commits.


This PR changes the temporary viewers created in node groups by Connect to Output in two ways: - Rename it, as it is currently called "tmp_viewer", which stands out as strange and code-like. It is renamed to "(Viewer)", which can be translated. - Use the actual connected socket type. Currently the viewer uses hardcoded socket types (Geometry for Geometry Nodes, Shader for shader nodes). While in GN we can only connect geometry to the output, in shader nodes other types can be inspected. This change allows the tmp_viewer to use the type of the actual socket being inspected, to have a better idea of what it contains from outside the group. It can be especially useful if a group is used in multiple materials and different sockets are being previewed in each one. It also does some cleanup, details in the commits. ----- <video src="/attachments/2e38838f-9977-4a01-a526-0e64201b5799" title="socket_color.mp4" controls></video>
Damien Picard requested review from Jacques Lucke 2024-05-31 01:39:49 +02:00
Iliya Katushenock added this to the Nodes & Physics project 2024-05-31 05:45:51 +02:00
Jacques Lucke approved these changes 2024-05-31 10:19:04 +02:00
Jacques Lucke left a comment
Member

LGTM

LGTM
Author
Member

@JacquesLucke Hi, should I rebase this to the release branch?

@JacquesLucke Hi, should I rebase this to the release branch?
Member

Yes please. Sorry I forgot to merge this, thought you could do it yourself.

Yes please. Sorry I forgot to merge this, thought you could do it yourself.
Damien Picard force-pushed dp_connect_output_socket_color from 331e958d02 to d1ddca239d 2024-06-05 18:41:38 +02:00 Compare
Damien Picard changed target branch from main to blender-v4.2-release 2024-06-05 18:41:52 +02:00
Author
Member

No worries, done :)

No worries, done :)
Jacques Lucke merged commit 15ec49ff28 into blender-v4.2-release 2024-06-06 14:47:35 +02:00
Damien Picard deleted branch dp_connect_output_socket_color 2024-06-06 15:00:54 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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 Assignees
2 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#122520
No description provided.