Default attribute input and output names for modifier fields #96707

Closed
opened 2022-03-22 14:42:16 +01:00 by Hans Goudey · 10 comments
Member

When a field is exposed to the modifier as an input or output, it would be useful to be able to choose a default name for an attribute read or created with that field.

When a field is exposed to the modifier as an input or output, it would be useful to be able to choose a default name for an attribute read or created with that field.
Author
Member

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

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

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

Added subscriber: @SimonThommes

Added subscriber: @SimonThommes
Member

Small addition: In the case of modifier inputs that would also require to set the default input to be an attribute in the first place.
For outputs that is given, for nodes the input should be passed via node link.

Small addition: In the case of modifier inputs that would also require to set the default input to be an attribute in the first place. For outputs that is given, for nodes the input should be passed via node link.
Author
Member

For outputs that is given, for nodes the input should be passed via node link.

I'm not sure what you mean with the second part of this sentence, could you elaborate?

> For outputs that is given, for nodes the input should be passed via node link. I'm not sure what you mean with the second part of this sentence, could you elaborate?
Member

I'm talking about the default of inputs of the node group for when it's used in another node tree.
I phrased it badly, what I meant was that there the default value should be used regardless. So the default attribute behavior would only affect the modifier version of that node group.
maybe there has to be a bit of discussion on this topic, but I think this makes the most sense.

I'm talking about the default of inputs of the node group for when it's used in another node tree. I phrased it badly, what I meant was that there the default value should be used regardless. So the default attribute behavior would only affect the modifier version of that node group. maybe there has to be a bit of discussion on this topic, but I think this makes the most sense.
Hans Goudey self-assigned this 2022-04-25 15:31:25 +02:00

This issue was referenced by 0ad73bb965

This issue was referenced by 0ad73bb9655f04afb5ad56174d8fb416cded3e4c
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

Added subscriber: @Doltramir

Added subscriber: @Doltramir

So, I don't think it works the way it is intended to work.

What I believe it should do (the right behaviour):

  • Input has 'default' that specifies the default value for input, and 'default attribute' which does the same, but specifies default attribute name, if you are using input as an attribute.
  • Output does not have the 'default', but it does have 'default attribute', and there you should put what to use, as the default attribute's name to store values (When you assign modifier, 'default attribute' says what should be put into corresponding output field by default).

Input's 'default' does what it is intended to do. But both of 'default attribute' don't.
What they actually do right now (the wrong behaviour):

  • Input's 'default attribute' just fills the field once. It is not treated as a default. So if you'll try to reset it's value, you'll get empty string, instead of actual default. Which is not what we want (if we wanted that, we could've just cleared that field).
  • And output's 'default attribute' just gets what is put into 'default attribute' from your geometry, and outputs it. That's the opposite of what it should do.

By default output should do the:

StoreNamedAttribute(name={default attribute}, value=from_socket)

Instead it does this:

StoreNamedAttribute(name="", value=GetNamedAttribute(name={default attribute}))

So, we need to make input's 'default attribute' indeed be the default value for attribute selection, and output's default attribute more of a 'default' of String input, so it would be proper default, and would actually do what it is intended to do.

So, I don't think it works the way it is intended to work. What I believe it should do (the right behaviour): - Input has 'default' that specifies the default value for input, and 'default attribute' which does the same, but specifies default attribute name, if you are using input as an attribute. - Output does not have the 'default', but it does have 'default attribute', and there you should put what to use, as the default attribute's name to store values (When you assign modifier, 'default attribute' says what should be put into corresponding output field by default). Input's 'default' does what it is intended to do. But both of 'default attribute' don't. What they actually do right now (the wrong behaviour): - Input's 'default attribute' just fills the field once. It is not treated as a default. So if you'll try to reset it's value, you'll get empty string, instead of actual default. Which is not what we want (if we wanted that, we could've just cleared that field). - And output's 'default attribute' just gets what is put into 'default attribute' from your geometry, and outputs it. That's the opposite of what it should do. By default output should do the: ``` StoreNamedAttribute(name={default attribute}, value=from_socket) ``` Instead it does this: ``` StoreNamedAttribute(name="", value=GetNamedAttribute(name={default attribute})) ``` So, we need to make input's 'default attribute' indeed be the default value for attribute selection, and output's default attribute more of a 'default' of String input, so it would be proper default, and would actually do what it is intended to do.
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
5 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#96707
No description provided.