Attribute References in Modifiers #117893

Open
opened 2024-02-06 13:04:28 +01:00 by Campbell Barton · 4 comments

Motivation

A PR has been submitted that adds attribute names to the bevel modifier #117366.

Consistent conventions should be used for referencing attributes between different areas of Blender.

Proposal

Updated based on feedback.

  • Limited use of attributes for modifiers.

    • We don't accept adding arbitrary attributes to any modifiers that support vertex groups (if such patches are submitted).
    • Support for attributes is limited to previously hard coded flags (bevel, crease, sharp...).

    We could consider extending places where attributes are used in modifiers at some point.

  • Handle names as follows:

    • Existing modifiers must be versioned to have the default custom-data layer names initialized.
    • An empty string skips loading any custom-data layers (behaves as if the layer is missing).
    • Clicking on the name shows a drop-down list of names (as with vertex groups), this includes the default name.
    • Renaming an attribute updates the modifier names accordingly.
## Motivation A PR has been submitted that adds attribute names to the bevel modifier #117366. Consistent conventions should be used for referencing attributes between different areas of Blender. ## Proposal **Updated based on feedback.** - Limited use of attributes for modifiers. - We don't accept adding arbitrary attributes to any modifiers that support vertex groups (if such patches are submitted). - Support for attributes is limited to previously hard coded flags (bevel, crease, sharp...). *We could consider extending places where attributes are used in modifiers at some point.* - Handle names as follows: - Existing modifiers must be versioned to have the default custom-data layer names initialized. - An empty string skips loading any custom-data layers (behaves as if the layer is missing). - Clicking on the name shows a drop-down list of names (as with vertex groups), this includes the default name. - Renaming an attribute updates the modifier names accordingly.
Campbell Barton added the
Module
Core
Type
Design
labels 2024-02-06 13:04:28 +01:00
Author
Owner

Created this task to settle on conventions before accepting #117366.
There may be existing conventions here I'm unaware of.

CC'ing @HooglyBoogly, @brecht & @howardt.

Created this task to settle on conventions before accepting #117366. There may be existing conventions here I'm unaware of. CC'ing @HooglyBoogly, @brecht & @howardt.
Member

Since we aim to replace builtin modifiers with geometry nodes completely long term, I think we should focus on aligning behavior with nodes or at least keeping a simple transition in the future.

An empty string (default) uses the default attribute, so bevel would use "bevel_weight_edge" for instance.

I would rather see the naming convention filled in the modifier's name property by default. That behavior is less magical, simpler, and teaches users at the same time.

Clicking on the name shows a drop-down list of names (as with vertex groups), this includes the default name.

For geometry nodes this is already implemented with the attribute search system. It uses logged data from the last evaluation to give more accurate results as geometry changes during evaluation. I don't think it's worth making a new attribute search suggestion system for the transition period in these very few cases.

Renaming an attribute updates the modifier names accordingly.

This worked in general with the imagined use cases for vertex groups years ago, where it was always a simple question of using the name from the original object. It's more complicated nowadays, with attributes generated procedurally, transferred from other objects, etc. I don't think this should be considered for this discussion, it's a more broad topic. Either way we decide eventually, it should be implemented for geometry nodes, then for the legacy builtin modifiers if it's a priority.

Since we aim to replace builtin modifiers with geometry nodes completely long term, I think we should focus on aligning behavior with nodes or at least keeping a simple transition in the future. >An empty string (default) uses the default attribute, so bevel would use "bevel_weight_edge" for instance. I would rather see the naming convention filled in the modifier's name property by default. That behavior is less magical, simpler, and teaches users at the same time. >Clicking on the name shows a drop-down list of names (as with vertex groups), this includes the default name. For geometry nodes this is already implemented with the attribute search system. It uses logged data from the last evaluation to give more accurate results as geometry changes during evaluation. I don't think it's worth making a new attribute search suggestion system for the transition period in these very few cases. >Renaming an attribute updates the modifier names accordingly. This worked in general with the imagined use cases for vertex groups years ago, where it was always a simple question of using the name from the original object. It's more complicated nowadays, with attributes generated procedurally, transferred from other objects, etc. I don't think this should be considered for this discussion, it's a more broad topic. Either way we decide eventually, it should be implemented for geometry nodes, then for the legacy builtin modifiers if it's a priority.
Author
Owner

@HooglyBoogly thanks for the feedback, updated the proposal.

@HooglyBoogly thanks for the feedback, updated the proposal.

Current version of the proposal looks good to me.

Current version of the proposal looks good to me.
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#117893
No description provided.