UI: Add visual toggle for global automasking #117649

Merged
Pablo Vazquez merged 5 commits from Sean-Kim/blender:102585-automask-toggle-icon into main 2024-02-02 14:34:56 +01:00
Contributor

This pull request adds a visual toggle for sculpt automasking in both normal and Grease Pencil modes.

If no automasking settings are applied, then the icon is CLIPUV_DEHLT, otherwise it is CLIPUV_HLT

Changes

sculpt_automasking_toggle.gif
gpsculpt_automasking_toggle.gif

Testing

  • Manual testing of changes in both modes

Addresses #102585

This pull request adds a visual toggle for sculpt automasking in both normal and Grease Pencil modes. If no automasking settings are applied, then the icon is CLIPUV_DEHLT, otherwise it is CLIPUV_HLT ### Changes ![sculpt_automasking_toggle.gif](/attachments/df847d79-fe3b-4ba9-b94a-f13b50b388ea) ![gpsculpt_automasking_toggle.gif](/attachments/50336fc5-7536-4156-b04a-7d92a738b242) ### Testing * Manual testing of changes in both modes Addresses #102585
Sean Kim added 2 commits 2024-01-29 22:56:14 +01:00
Sean Kim requested review from Sergey Sharybin 2024-01-29 22:56:38 +01:00
Sean Kim requested review from Hans Goudey 2024-01-29 22:56:54 +01:00
Sean Kim requested review from Julien Kaspar 2024-01-29 22:57:06 +01:00
Member

I'm not sure about the switch of the mask icon here. Personally I find this version not as visually pleasing. I know that's being discussed elsewhere though.

I'm not sure about the switch of the mask icon here. Personally I find this version not as visually pleasing. I know that's being discussed elsewhere though.
Sergey Sharybin requested review from Pablo Vazquez 2024-01-30 09:40:16 +01:00

The icon itself is more for the UI module to review.

From the implementation side, the icon selection should not be a property, but a function in Python:

def _automasking_icon_get(context):
    # implementaiton

layout.popover(
            panel="VIEW3D_PT_sculpt_automasking",
            text="",
            icon_value=_automasking_icon_get()
        )

The UI is not a part of Python API (except of cases like collapsed state of a box, for which there is no better solution within the Blender design).

The icon itself is more for the UI module to review. From the implementation side, the icon selection should not be a property, but a function in Python: ``` def _automasking_icon_get(context): # implementaiton layout.popover( panel="VIEW3D_PT_sculpt_automasking", text="", icon_value=_automasking_icon_get() ) ``` The UI is not a part of Python API (except of cases like collapsed state of a box, for which there is no better solution within the Blender design).
Julien Kaspar approved these changes 2024-01-30 10:08:17 +01:00
Julien Kaspar left a comment
Member

On the user side this works as expected! Waiting for technical approval then.

If there are still concerns about the icon choice we could discuss this in the chat or on the design task?

On the user side this works as expected! Waiting for technical approval then. If there are still concerns about the icon choice we could discuss this in the chat or on the design task?
Member

Functionality wise is great to have, thanks! It should use proper icon names though (MASK, not CLIPUV), or would that happen after #117467 lands?

Functionality wise is great to have, thanks! It should use proper icon names though (`MASK`, not `CLIPUV`), or would that happen after #117467 lands?
Author
Contributor

From the implementation side, the icon selection should not be a property, but a function in Python:

@Sergey - Makes sense on avoiding adding this into the python API, I recalled seeing it elsewhere in the code to achieve a similar effect, but keeping it entirely in UI code makes sense.

Functionality wise is great to have, thanks! It should use proper icon names though (MASK, not CLIPUV), or would that happen after #117467 lands?

@pablovazquez - Replied to this in the other PR (#117467), apologies for the split discussion happening across these two - I think the naming of the icons is best addressed there.

> From the implementation side, the icon selection should not be a property, but a function in Python: @Sergey - Makes sense on avoiding adding this into the python API, I recalled seeing it elsewhere in the code to achieve a similar effect, but keeping it entirely in UI code makes sense. > Functionality wise is great to have, thanks! It should use proper icon names though (`MASK`, not `CLIPUV`), or would that happen after #117467 lands? @pablovazquez - Replied to this in the other PR (#117467), apologies for the split discussion happening across these two - I think the naming of the icons is best addressed there.
Sean Kim added 3 commits 2024-01-31 22:43:13 +01:00
Pablo Vazquez approved these changes 2024-02-01 12:07:18 +01:00
Pablo Vazquez left a comment
Member

Thanks! Approving design-wise.

Will leave the code review to the devs.

Thanks! Approving design-wise. Will leave the code review to the devs.
Hans Goudey approved these changes 2024-02-01 20:00:12 +01:00
Hans Goudey left a comment
Member

Looks fine to me. I'm not up to date on which icon we should be using for each case, but I assume others have stronger opinions about that than me anyway.

Looks fine to me. I'm not up to date on which icon we should be using for each case, but I assume others have stronger opinions about that than me anyway.
Member

Looks fine to me. I'm not up to date on which icon we should be using for each case

Thanks! It's been decided to use CLIPUV_HLT/DEHLT, name can be adjusted in the future as larger change but that's outside the scope of this patch.

> Looks fine to me. I'm not up to date on which icon we should be using for each case Thanks! It's been decided to use `CLIPUV_HLT/DEHLT`, name can be adjusted in the future as larger change but that's outside the scope of this patch.
Pablo Vazquez merged commit c15d1b8ccb into main 2024-02-02 14:34:56 +01:00
Pablo Vazquez deleted branch 102585-automask-toggle-icon 2024-02-02 14:34:59 +01:00
Harley Acheson added this to the User Interface project 2024-02-08 20:06:42 +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
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#117649
No description provided.