Operators to save curve or point selection as an attribute #99297

Open
opened 2022-06-30 14:46:26 +02:00 by Hans Goudey · 6 comments
Member

It would be useful to save selections as attributes and to load them later.
Two operators should be added and exposed in the "Select" menu in curves sculpt mode:

  • Selection to Attribute
    • Saves the current selection into a float attribute, with a domain depending on the current selection domain
    • A popup allows you to choose the name or potentially convert into an existing attribute
  • Attribute to Selection
    • Allows choosing any attribute and copying it to the selection.
    • The current selection domain could be set to the domain of the chosen attribute.

The operators should be disabled when selection is disabled.

In edit mode in the future this would work the same, except a boolean attribute would be created.

It would be useful to save selections as attributes and to load them later. Two operators should be added and exposed in the "Select" menu in curves sculpt mode: - Selection to Attribute - Saves the current selection into a float attribute, with a domain depending on the current selection domain - A popup allows you to choose the name or potentially convert *into* an existing attribute - Attribute to Selection - Allows choosing any attribute and copying it to the selection. - The current selection domain could be set to the domain of the chosen attribute. The operators should be disabled when selection is disabled. In edit mode in the future this would work the same, except a boolean attribute would be created.
Author
Member

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

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

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Hi Hans,

My initial reaction to this was:

  • Does "Face Sets" fix that same problem (re-usable selections)?
  • Is this a problem unique to hair (probably not)?
  • How relevant is this problem to modelling/sculpting/greasepencil?
  • Is there a solution that contemplate all those modes/object types?
  • Do we want a generic attribute to selection operator? How will that work for non-boolean attributes?
  • How are people expected to edit attributes usually? Would be nice to have at least a design for this.

So basically my gut feeling is that this seems a bit rushed, and it risk isolating the hair workflow from the rest of Blender.

That's not to say that this solution is not good. I think it is rather reasonable actually. But I think it needs to be presented within the context of the rest of Blender (and ideally attribute editing and visualization as well).

Hi Hans, My initial reaction to this was: * Does "Face Sets" fix that same problem (re-usable selections)? * Is this a problem unique to hair (probably not)? * How relevant is this problem to modelling/sculpting/greasepencil? * Is there a solution that contemplate all those modes/object types? * Do we want a generic attribute to selection operator? How will that work for non-boolean attributes? * How are people expected to edit attributes usually? Would be nice to have at least a design for this. So basically my gut feeling is that this seems a bit rushed, and it risk isolating the hair workflow from the rest of Blender. That's not to say that this solution is not good. I think it is rather reasonable actually. But I think it needs to be presented within the context of the rest of Blender (and ideally attribute editing and visualization as well).
Author
Member

Good point about seeing this in a larger context. However, I actually don't think a larger context changes the design at all. I would use the same design for other object types.

In #99297#1382919, @dfelinto wrote:

  • Does "Face Sets" fix that same problem (re-usable selections)?

No, that is a different thing (integer value per curve), which doesn't solve the same problems as controlling the influence of an operation.
Also, we want storing a selection to be simple and non-destructive. We shouldn't be forced to convert it to a different concept to store it for later.

  • Is this a problem unique to hair (probably not)?
  • How relevant is this problem to modelling/sculpting/greasepencil?
  • Is there a solution that contemplate all those modes/object types?
    So basically my gut feeling is that this seems a bit rushed, and it risk isolating the hair workflow from the rest of Blender.

I would apply the same design for any other object type that supports attributes, I think the utility is the same. Sometimes making a selection can take a while, so saving it makes sense.

  • Do we want a generic attribute to selection operator? How will that work for non-boolean attributes?

Well, we're dealing with float attributes here. But it would just use the existing implicit conversions. I don't think there's any reason not to allow the flexibility.

  • How are people expected to edit attributes usually? Would be nice to have at least a design for this.

Obviously we want better ways to edit/paint attributes. That would make it easy to paint whatever selection attribute you saved.
However, I don't see that as blocking this task. We already allow creating attributes, this is just another way to create them and use them.

Good point about seeing this in a larger context. However, I actually don't think a larger context changes the design at all. I would use the same design for other object types. > In #99297#1382919, @dfelinto wrote: > * Does "Face Sets" fix that same problem (re-usable selections)? No, that is a different thing (integer value per curve), which doesn't solve the same problems as controlling the influence of an operation. Also, we want storing a selection to be simple and non-destructive. We shouldn't be forced to convert it to a different concept to store it for later. > * Is this a problem unique to hair (probably not)? > * How relevant is this problem to modelling/sculpting/greasepencil? > * Is there a solution that contemplate all those modes/object types? > So basically my gut feeling is that this seems a bit rushed, and it risk isolating the hair workflow from the rest of Blender. I would apply the same design for any other object type that supports attributes, I think the utility is the same. Sometimes making a selection can take a while, so saving it makes sense. > * Do we want a generic attribute to selection operator? How will that work for non-boolean attributes? Well, we're dealing with float attributes here. But it would just use the existing implicit conversions. I don't think there's any reason not to allow the flexibility. > * How are people expected to edit attributes usually? Would be nice to have at least a design for this. Obviously we want better ways to edit/paint attributes. That would make it easy to paint whatever selection attribute you saved. However, I don't see that as blocking this task. We already allow creating attributes, this is just another way to create them and use them.
Contributor

Added subscriber: @RedMser

Added subscriber: @RedMser
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#99297
No description provided.