Sculpting/Painting on invisible objects #112371

Open
opened 2023-09-14 12:51:29 +02:00 by Julien Kaspar · 8 comments
Member

System Information
Operating system: Linux-6.5.2-gentoo-x86_64-AMD_Ryzen_Threadripper_1950X_16-Core_Processor-with-glibc2.37 64 Bits, X11 UI
Graphics card: AMD Radeon RX 7900 XT (gfx1100, LLVM 16.0.6, DRM 3.54, 6.5.2-gentoo) AMD 4.6 (Core Profile) Mesa 23.3.0-devel (git-b492f73f87)

Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-09-12 22:03, hash: 158dbc1b101b
Worked: ---

Short description of error
This is an inconsistency that I noticed when toggling between collections of objects while working on an asset. It's most likely not a regression.

In edit mode it's impossible to operate on the selection if the object is currently hidden. This is very helpful to prevent mistakes and as feedback that you might be editing the wrong object atm.

While in sculpt mode or any of the painting modes this is not the case. If the object is currently hidden while in sculpt or weight paint mode, it is possible to use the brushes on the geometry.

Ideally any operation should be prevented if the object is hidden.

Exact steps for others to reproduce the error

  1. Enter edit mode.
  2. Select everything.
  3. Hide the object or collection in the outliner.
  4. Try to move or otherwise edit the selected geometry.
  5. Show the object again (No edits should have happened).
  6. Enter sculpt mode and hid the object/collection again.
  7. Use a brush on the hidden object.
  8. Show the object/collection (See the edits that have been done).
**System Information** Operating system: Linux-6.5.2-gentoo-x86_64-AMD_Ryzen_Threadripper_1950X_16-Core_Processor-with-glibc2.37 64 Bits, X11 UI Graphics card: AMD Radeon RX 7900 XT (gfx1100, LLVM 16.0.6, DRM 3.54, 6.5.2-gentoo) AMD 4.6 (Core Profile) Mesa 23.3.0-devel (git-b492f73f87) **Blender Version** Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-09-12 22:03, hash: `158dbc1b101b` Worked: --- **Short description of error** This is an inconsistency that I noticed when toggling between collections of objects while working on an asset. It's most likely not a regression. In edit mode it's impossible to operate on the selection if the object is currently hidden. This is very helpful to prevent mistakes and as feedback that you might be editing the wrong object atm. While in sculpt mode or any of the painting modes this is not the case. If the object is currently hidden while in sculpt or weight paint mode, it is possible to use the brushes on the geometry. Ideally any operation should be prevented if the object is hidden. **Exact steps for others to reproduce the error** 1. Enter edit mode. 2. Select everything. 3. Hide the object or collection in the outliner. 4. Try to move or otherwise edit the selected geometry. 5. Show the object again (No edits should have happened). 6. Enter sculpt mode and hid the object/collection again. 7. Use a brush on the hidden object. 8. Show the object/collection (See the edits that have been done).
Julien Kaspar added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-09-14 12:51:30 +02:00
Iliya Katushenock added the
Interest
Sculpt, Paint & Texture
label 2023-09-14 17:07:22 +02:00

I can confirm.
GIF.gif

Fortunately this does not happen with hidden elements (Vertex, Edge, Face).

Unlike in edit mode, where you can work on multiple objects, in sculpt mode you're limited to one object at a time. Given this, the problem doesn't seem as serious.

But in fact it is an inconsistency.

I can confirm. ![GIF.gif](/attachments/9445afb6-4af6-4d40-9e68-f13c6c3b1a74) Fortunately this does not happen with hidden elements (Vertex, Edge, Face). Unlike in edit mode, where you can work on multiple objects, in sculpt mode you're limited to one object at a time. Given this, the problem doesn't seem as serious. But in fact it is an inconsistency.
335 KiB
Author
Member

If fixing this is relatively straight forward, that would be very appreciated.

Just to add a scenario where this is a frequent and annoying issue:
The problem is more serious when working on multiple variations of a sculpt. This is typically done by duplicating the collection and then toggling between them.
Because the objects in each collection are very similar, it's easy to switch collections and forget to switch the object as well.

In this example I am about to sculpt on the wrong face. It's very hard to tell unless a few strokes are already done.

image

If fixing this is relatively straight forward, that would be very appreciated. Just to add a scenario where this is a frequent and annoying issue: The problem is more serious when working on multiple variations of a sculpt. This is typically done by duplicating the collection and then toggling between them. Because the objects in each collection are very similar, it's easy to switch collections and forget to switch the object as well. In this example I am about to sculpt on the wrong face. It's very hard to tell unless a few strokes are already done. ![image](/attachments/2417a28e-84b4-4f72-b905-9774c79c53ad)
743 KiB
Member

Just asking: there should be nothing allowed for hidden objects? Strokes seem obvious, but just checking if other stuff like Initialize Face Sets should also do nothing (I would think "yes", this should be consistent across all of sculptmode and basically nothing should act on hidden objects)

Just asking: there should be **nothing** allowed for hidden objects? Strokes seem obvious, but just checking if other stuff like `Initialize Face Sets` should also do nothing (I would think "yes", this should be consistent across all of sculptmode and basically nothing should act on hidden objects)
Author
Member

Yes. No operations should be allowed on hidden objects (and objects in hidden collections)

Yes. No operations should be allowed on hidden objects (and objects in hidden collections)
Contributor

Should hopefully have a PR for this issue soon - I've got it working currently for individual objects being hidden, but not the hierarchy toggle.

Should hopefully have a PR for this issue soon - I've got it working currently for individual objects being hidden, but not the hierarchy toggle.
Contributor

Copying this list from the current PR, the following operators all need to still be changed to cancel when interacting with hidden geometry

  • SCULPT_OT_expand - #118070
  • SCULPT_OT_trim_box_gesture - #118072
  • SCULPT_OT_trim_lasso_gesture - #118072
  • SCULPT_OT_sample_detail_size - #118075
  • MESH_OT_face_set_extract - Works as expected with hidden geometry, was unable to test yesterday due to assert crash that has now been resolved
  • SCULPT_OT_mesh_filter
  • SCULPT_OT_cloth_filter
  • SCULPT_OT_color_filter

As stated in that PR, I've opted to keep that PR isolated to just the brush change for now and will address the remaining ones in future PRs for the ease of review. If that plan seems like it will cause more confusion, I'm also fine bundling all the changes together. Let me know your thoughts.

Copying this list from the current PR, the following operators all need to still be changed to cancel when interacting with hidden geometry * `SCULPT_OT_expand` - #118070 * `SCULPT_OT_trim_box_gesture` - #118072 * `SCULPT_OT_trim_lasso_gesture` - #118072 * `SCULPT_OT_sample_detail_size` - #118075 * ~~`MESH_OT_face_set_extract`~~ - Works as expected with hidden geometry, was unable to test yesterday due to assert crash that has now been resolved * `SCULPT_OT_mesh_filter` * `SCULPT_OT_cloth_filter` * `SCULPT_OT_color_filter` As stated in that PR, I've opted to keep that PR isolated to just the brush change for now and will address the remaining ones in future PRs for the ease of review. If that plan seems like it will cause more confusion, I'm also fine bundling all the changes together. Let me know your thoughts.
Contributor

Amending my previous comment - there are far more than those that still need to be edited for visibility checking. I went through the list of operators in sculpt_ops.cc and came up with the following list:

  • Filters - #118172
    • SCULPT_OT_mesh_filter
    • SCULPT_OT_color_filter
    • SCULPT_OT_cloth_filter
  • Mask Operators - #118173
    • SCULPT_OT_mask_init
    • SCULPT_OT_mask_filter
    • SCULPT_OT_mask_from_cavity
    • SCULPT_OT_mask_by_color
  • Face Set Operators - #118228
    • SCULPT_OT_face_sets_init
    • SCULPT_OT_face_sets_create
    • SCULPT_OT_face_sets_edit
    • SCULPT_OT_face_sets_randomize_colors
    • SCULPT_OT_face_set_change_visibility
    • SCULPT_OT_face_set_box_gesture
    • SCULPT_OT_face_set_lasso_gesture
  • SCULPT_OT_symmetrize
  • SCULPT_OT_set_pivot_position - #118306
  • SCULPT_OT_set_persistent_base
  • SCULPT_OT_project_line_gesture
  • SCULPT_OT_sample_color - #118306
  • SCULPT_OT_detail_flood_fill

Even this isn't fully exhaustive though, as many more operators underneath the Sculpt menu option still need to be checked

Amending my previous comment - there are far more than those that still need to be edited for visibility checking. I went through the list of operators in `sculpt_ops.cc` and came up with the following list: - [x] Filters - #118172 - [x] `SCULPT_OT_mesh_filter` - [x] `SCULPT_OT_color_filter` - [x] `SCULPT_OT_cloth_filter` - [x] Mask Operators - #118173 - [x] `SCULPT_OT_mask_init` - [x] `SCULPT_OT_mask_filter` - [x] `SCULPT_OT_mask_from_cavity` - [x] `SCULPT_OT_mask_by_color` - [x] Face Set Operators - #118228 - [x] `SCULPT_OT_face_sets_init` - [x] `SCULPT_OT_face_sets_create` - [x] `SCULPT_OT_face_sets_edit` - [x] `SCULPT_OT_face_sets_randomize_colors` - [x] `SCULPT_OT_face_set_change_visibility` - [x] `SCULPT_OT_face_set_box_gesture` - [x] `SCULPT_OT_face_set_lasso_gesture` - [ ] `SCULPT_OT_symmetrize` - [x] `SCULPT_OT_set_pivot_position` - #118306 - [ ] `SCULPT_OT_set_persistent_base` - [ ] `SCULPT_OT_project_line_gesture` - [x] `SCULPT_OT_sample_color` - #118306 - [ ] `SCULPT_OT_detail_flood_fill` Even this isn't fully exhaustive though, as many more operators underneath the `Sculpt` menu option still need to be checked
Contributor

Added another small PR: #118182 for operator poll callbacks to use to grey out the corresponding menu item when the object is invisible. This will need to be applied to the SCULPT_OT_Expand operator as well so that its menu items are greyed out accordingly.

Edit: Closed this PR; adding the greyed out menu items is something that might come later, but is outside of the scope of this task

~~Added another small PR: #118182 for operator `poll` callbacks to use to grey out the corresponding menu item when the object is invisible. This will need to be applied to the `SCULPT_OT_Expand` operator as well so that its menu items are greyed out accordingly.~~ Edit: Closed this PR; adding the greyed out menu items is something that might come later, but is outside of the scope of this task
Julien Kaspar added this to the Sculpt, Paint & Texture project 2024-02-13 10:28:51 +01:00
Julien Kaspar added
Type
Bug
and removed
Type
Report
labels 2024-02-13 11:51:34 +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 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#112371
No description provided.