Operator to convert input node to new group input socket #100646

Open
opened 2022-08-26 15:24:40 +02:00 by Simon Thommes · 10 comments
Member

Make an operator to convert input node to new group input socket

Screenshot from 2022-08-26 14-55-28.png

image.png
image.png

Behaviour:

  • Create a new input on the current node group.

  • Use the input node's...
    ... type as the group input socket type
    ... value as default value and of the new group input and value of all instances where the group is used
    ... label as the new group input's name

  • Replace the input node with a group input node and reconnect the new output to all previous connections

  • Hide all outputs on the new group input node except the newly create one (same as drag realease search way of adding a new group input socket)

Make an operator to convert input node to new group input socket ![Screenshot from 2022-08-26 14-55-28.png](https://archive.blender.org/developer/F13418493/Screenshot_from_2022-08-26_14-55-28.png) - > ![image.png](https://archive.blender.org/developer/F13418503/image.png) ![image.png](https://archive.blender.org/developer/F13418495/image.png) Behaviour: - Create a new input on the current node group. - Use the input node's... ... type as the group input socket type ... value as default value and of the new group input and value of all instances where the group is used ... label as the new group input's name - Replace the input node with a group input node and reconnect the new output to all previous connections - Hide all outputs on the new group input node except the newly create one (same as drag realease search way of adding a new group input socket)
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Member

Added subscriber: @SimonThommes

Added subscriber: @SimonThommes

Added subscriber: @MichaelFraser

Added subscriber: @MichaelFraser
Michael Fraser self-assigned this 2022-11-17 01:23:03 +01:00

Hi! I had a first pass at this operator. I'll post a diff soon. Stay tuned.

T100646_01.mp4

Hi! I had a first pass at this operator. I'll post a diff soon. Stay tuned. [T100646_01.mp4](https://archive.blender.org/developer/F13934739/T100646_01.mp4)

The operator initially supports conversion of these input nodes:

  • boolean
  • color
  • integer
  • material
  • string
  • value
  • vector

T100646_02.mp4

The operator initially supports conversion of these input nodes: - boolean - color - integer - material - string - value - vector [T100646_02.mp4](https://archive.blender.org/developer/F13934754/T100646_02.mp4)
Author
Member

Thanks for picking this up, looks great already!

A couple of notes:

  • The name of the operator is really long right now. I would suggest something shorter like convert_to_group_input. That should still give enough information.
  • It would be great if the newly created input would not show up in existing input nodes, but just be hidden there by default. That is also how creating an input using the link drag search behaves.
  • This operator should probably show up in the context menu as well for discoverability. This also concerns the refactoring of that menu in D16216
Thanks for picking this up, looks great already! A couple of notes: - The name of the operator is really long right now. I would suggest something shorter like `convert_to_group_input`. That should still give enough information. - It would be great if the newly created input would not show up in existing input nodes, but just be hidden there by default. That is also how creating an input using the link drag search behaves. - This operator should probably show up in the context menu as well for discoverability. This also concerns the refactoring of that menu in [D16216](https://archive.blender.org/developer/D16216)

Thanks for the feedback, @simonthommes. I made these updates and posted to D16539.

  • Changed operator name to convert_to_group_input
  • Hid the newly created socket on existing input nodes
  • Added to the node context menu

T100646_03.mp4

Thanks for the feedback, @simonthommes. I made these updates and posted to [D16539](https://archive.blender.org/developer/D16539). - Changed operator name to `convert_to_group_input` - Hid the newly created socket on existing input nodes - Added to the node context menu [T100646_03.mp4](https://archive.blender.org/developer/F13937725/T100646_03.mp4)

Added subscriber: @mod_moder

Added subscriber: @mod_moder

@MichaelFraser Now it's best to have a discussion in the comments to the patch. There may be a design discussion here.

@MichaelFraser Now it's best to have a discussion in the comments to the patch. There may be a design discussion here.

@mod_moder Sounds good. I'm available.

@mod_moder Sounds good. I'm available.
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#100646
No description provided.