WIP: Fix #73333: Paint modes: polygon selection in X-ray mode do not select back faces #116564
No reviewers
Labels
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#116564
Loading…
Reference in New Issue
No description provided.
Delete Branch "mano-wii/blender:fix_73333"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Support box selection of back faces through vertex projection.
Note: this patch only implements this feature for Box Selection.
Since X-ray became supported in Paint Modes, one feature that was missing was the selection of back faces.
In edit mode, this selection is made through the center of the face, where if the projection of the center of the face is inside the selection area, the face is selected.
The solution on this patch performs a different path. In this patch, if the projection of any of the vertices of a face is inside the selection area, the face is selected.
The reason it is different is because:
A better solution would be to test Edge projection selection. But that would also require a lot of changes.
So, as an initial step, this patch implements the selection of back faces through vertex projection.
Later Lasso Selection may also be supported.
Non-functional change:
To deduplicate the code,
do_paintvert_box_select
anddo_paintface_box_select
were merged intodo_paint_box_select
.The overview in the PR description seems reasonable. But I don't think the non-functional deduplication fits in this PR. And I'm not convinced it's really better either. Yes, there was some duplication before, but now the complexity of the remaining code is increased with the
is_face_sel
check in many places. The code would be easier to review without that change too.In fact, deduplication does not fit in this patch, but I still think it is an improvement given the size of the file and the number of similar functions.
In this file we have these similar functions:
paint_facesel_circle_select
paint_vertsel_circle_select
do_lasso_select_paintface
do_lasso_select_paintvert
do_paintvert_box_select
do_paintface_box_select
All these functions call:
editselect_buf_cache_init_with_generic_userdata
,BKE_mesh_mselect_validate
,ED_view3d_init_mats_rv3d
.The ones for vertices call:
paintvert_deselect_all_visible
,edbm_backbuf_check_and_select_verts_obmode
,meshobject_foreachScreenVert
,paintvert_flush_flags
,paintvert_tag_select_update
And something similar happens for faces.
By "Deduplicating" these functions, they better match existing functions that operate in edit mode. These are:
do_mesh_box_select
,do_lasso_select_mesh
andmesh_circle_select
.These edit mode functions support the selection modes
SCE_SELECT_VERTEX
,SCE_SELECT_EDGE
andSCE_SELECT_FACE
mixed together.And if we, by chance, added support for selecting edges, this "deduplication" would avoid having to create:
paint_edgesel_circle_select
,do_lasso_select_paintedge
anddo_paintedge_box_select
.But I can leave this for a later moment.
Fix #73333: Paint modes: polygon selection in X-ray mode do not select back facesto WIP: Fix #73333: Paint modes: polygon selection in X-ray mode do not select back facesCheckout
From your project repository, check out a new branch and test the changes.