Sculpt: Disable mask operators on invisible objects #118173

Merged
Raul Fernandez Hernandez merged 1 commits from Sean-Kim/blender:112371-mask-invisible into blender-v4.1-release 2024-02-15 16:24:50 +01:00
Member

This PR disables the SCULPT_OT_mask_init, SCULPT_OT_mask_filter, SCULPT_OT_mask_by_color, and SCULPT_OT_mask_from_cavity operators and the following actions that correspond to them when attempting to operate on invisible objects:

  • Random Mesh
    • Per Vertex
    • Per Face Set
    • Per Loose Part
  • Smooth Mask
  • Sharpen Mask
  • Grow Mask
  • Shrink Mask
  • Increase Contrast
  • Decrease Contrast
  • Mask By Color
  • Mask From Cavity
Init Filter By Color From Cavity

Limitations

  • All of the operators invoked by a menu option do not indicate to the user that they are currently invalid or will not operate due to the mesh being invisible, potentially leading to a confusing user experience.

Addresses part of #112371

This PR disables the `SCULPT_OT_mask_init`, `SCULPT_OT_mask_filter`, `SCULPT_OT_mask_by_color`, and `SCULPT_OT_mask_from_cavity` operators and the following actions that correspond to them when attempting to operate on invisible objects: * Random Mesh * Per Vertex * Per Face Set * Per Loose Part * Smooth Mask * Sharpen Mask * Grow Mask * Shrink Mask * Increase Contrast * Decrease Contrast * Mask By Color * Mask From Cavity | Init | Filter | By Color | From Cavity | | ---- | --- | --- | --- | | ![](/attachments/fc2ea68e-0af9-4887-b1a3-b2aa2eacaf21) | ![](attachments/3e94f48c-b463-417c-9ad9-bdc74e24bd70) | ![](/attachments/16029e7c-d973-483e-8c4a-164133d0fe11) | ![](/attachments/b356a248-354b-4c68-bf5b-c49907edcaff) ### Limitations * All of the operators invoked by a menu option do not indicate to the user that they are currently invalid or will not operate due to the mesh being invisible, potentially leading to a confusing user experience. Addresses part of #112371
Sean Kim added 1 commit 2024-02-13 02:04:28 +01:00
Sean Kim requested review from Julien Kaspar 2024-02-13 02:12:17 +01:00
Sean Kim changed title from Sculpt: Disable mask operators on invisible objects to WIP: Sculpt: Disable mask operators on invisible objects 2024-02-13 04:14:55 +01:00
Author
Member

Actually, marking this as a WIP for now - did a bit more research about greying out menu buttons and I feel like where possible these visibility checks should be added to the poll functions as part of this change to address the limitations I put in the description.

Actually, marking this as a WIP for now - did a bit more research about greying out menu buttons and I feel like where possible these visibility checks should be added to the `poll` functions as part of this change to address the limitations I put in the description.
Julien Kaspar added the
Module
Sculpt, Paint & Texture
label 2024-02-13 10:38:59 +01:00
Member

@Sean-Kim In terms of greying out the menu entries, I think that would be a far broader task. All modes and object types would benefit from that inclusion (or another indicator that the object cannot be edited in a hidden state)

@Sean-Kim In terms of greying out the menu entries, I think that would be a far broader task. All modes and object types would benefit from that inclusion (or another indicator that the object cannot be edited in a hidden state)
Author
Member

@JulienKaspar Ah, I see, In that case if it seems too large for working on related to this task I'll leave it out for now and remove this PR's WIP status.

@JulienKaspar Ah, I see, In that case if it seems too large for working on related to this task I'll leave it out for now and remove this PR's WIP status.
Sean Kim changed title from WIP: Sculpt: Disable mask operators on invisible objects to Sculpt: Disable mask operators on invisible objects 2024-02-13 11:29:30 +01:00
Julien Kaspar requested review from Brecht Van Lommel 2024-02-13 12:06:52 +01:00
Julien Kaspar approved these changes 2024-02-13 12:06:57 +01:00
Brecht Van Lommel requested review from Raul Fernandez Hernandez 2024-02-13 12:18:49 +01:00

I think I can leave this one to @farsthary to review and land. If not, let me know.

I think I can leave this one to @farsthary to review and land. If not, let me know.

Looks good to me too. A follow up task would be to add greyed out settings too

Looks good to me too. A follow up task would be to add greyed out settings too
Raul Fernandez Hernandez approved these changes 2024-02-13 17:13:13 +01:00
Raul Fernandez Hernandez merged commit d76c1e30e7 into blender-v4.1-release 2024-02-15 16:24:50 +01:00
Sean Kim deleted branch 112371-mask-invisible 2024-02-16 00:21:30 +01:00
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
4 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#118173
No description provided.