Fix #109454: Snapping from Tools doesn't work if Depth option is not 'Surface' #111226

Closed
Germano Cavalcante wants to merge 1 commits from mano-wii/blender:fix_109454 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

Tools and Drag & Drop snap options are edited through Tool Placement
settings.

This can cause confusion, even more so when the Depth option is not
Surface, in which case the Snap Toggle is simply ignored and appears
to be broken.

The solution then is to prioritize Snap Toggle over the Depth option,
so even if it's not Surface, the snap is still done when toggle is
enabled.

Tools and Drag & Drop snap options are edited through Tool Placement settings. This can cause confusion, even more so when the `Depth` option is not `Surface`, in which case the Snap Toggle is simply ignored and appears to be broken. The solution then is to prioritize Snap Toggle over the `Depth` option, so even if it's not `Surface`, the snap is still done when toggle is enabled.
Germano Cavalcante added 1 commit 2023-08-17 14:36:23 +02:00
d4bc77794c Fix #109454: Snapping from Tools doesn't work if Depth option is not `Surface`
Tools and Drag & Drop snap options are edited through Tool Placement
settings.

This can cause confusion, even more so when the `Depth` option is not
`Surface`, in which case the Snap Toggle is simply ignored and appears
to be broken.

The solution then is to prioritize Snap Toggle over the `Depth` option,
so even if it's not `Surface`, the snap is still done when toggle is
enabled.
Germano Cavalcante requested review from Brecht Van Lommel 2023-08-17 14:36:40 +02:00
Germano Cavalcante requested review from Campbell Barton 2023-08-17 14:36:41 +02:00
Germano Cavalcante requested review from Julian Eisel 2023-08-17 14:36:41 +02:00
Germano Cavalcante changed title from Fix #109454: Snapping from Tools doesn't work if Depth option is not `Surface` to Fix #109454: Snapping from Tools doesn't work if Depth option is not 'Surface' 2023-08-17 14:37:09 +02:00

It sounds reasonable but I'm not really familiar with this code or snapping behavior.

It sounds reasonable but I'm not really familiar with this code or snapping behavior.
Brecht Van Lommel refused to review 2023-08-17 17:36:36 +02:00
Author
Member

After testing on version 2.93, I noticed that the proposed behavior here was the previous behavior.

So there was an unintentional change at some point (probably when unifying the tools snapping system on a cursor).

So the review here should only focus on the code, as the current behavior is a regression.

In the code, the only change I'm not very sure about are the changes to view3d_placement.cc. In this file the V3D_SNAPCURSOR_TOGGLE_ALWAYS_TRUE flag is set temporarily forcing snap on click. But this goes against drawing the cursor as it indicates whether the snap should be done or not.

This code was introduced in 721335553c

After testing on version 2.93, I noticed that the proposed behavior here was the previous behavior. So there was an unintentional change at some point (probably when unifying the tools snapping system on a cursor). So the review here should only focus on the code, as the current behavior is a regression. In the code, the only change I'm not very sure about are the changes to `view3d_placement.cc`. In this file the `V3D_SNAPCURSOR_TOGGLE_ALWAYS_TRUE` flag is set temporarily forcing snap on click. But this goes against drawing the cursor as it indicates whether the snap should be done or not. This code was introduced in 721335553ccb5ce4f7a374b958b7d65befa319df

Is this PR still needed? c02f2f4947 fixes #109454, this PR needs to be rebase on top of main.

Is this PR still needed? c02f2f49478487c0eeb94999547c0a128d7bbe60 fixes #109454, this PR needs to be rebase on top of main.
Author
Member

Given the simplicity of the patch, familiarity with the code, priority of the issue, and proximity to Bcon2, I thought it was worth taking a vote of confidence and submitting the fix to main.

But the review could still be done (belatedly).

Apologies if I didn't get in touch sooner :(

I feel I can close this PR then.

Given the simplicity of the patch, familiarity with the code, priority of the issue, and proximity to Bcon2, I thought it was worth taking a vote of confidence and submitting the fix to main. But the review could still be done (belatedly). Apologies if I didn't get in touch sooner :( I feel I can close this PR then.

Pull request closed

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
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.

Reference: blender/blender#111226
No description provided.