Edit Mode - 3D Cursor Snapping not working correctly #55202

Closed
opened 2018-05-25 14:54:25 +02:00 by Julien Kaspar · 10 comments
Member

Blender Version
Broken: Blender 2.8 dc26ef081b

Short description of error
Once you start changing a mesh in edit mode the 3D cursor becomes confused on where it is supposed to snap to when left clicking.
Sometimes it snaps on the initial position of the polygons or it instead snaps slightly inside or outside of the surface of the mesh or doesn't snap at all. Once you switch into object mode the snapping works like normal again.
This can already be seen by just going into edit mode on the standard cube, moving/rotating/scaling it in any way and trying to left click on any surface of that cube.

**Blender Version** Broken: Blender 2.8 dc26ef081b9 **Short description of error** Once you start changing a mesh in edit mode the 3D cursor becomes confused on where it is supposed to snap to when left clicking. Sometimes it snaps on the initial position of the polygons or it instead snaps slightly inside or outside of the surface of the mesh or doesn't snap at all. Once you switch into object mode the snapping works like normal again. This can already be seen by just going into edit mode on the standard cube, moving/rotating/scaling it in any way and trying to left click on any surface of that cube.
Author
Member

Added subscriber: @JulienKaspar

Added subscriber: @JulienKaspar

Added subscribers: @brita, @mont29

Added subscribers: @brita, @mont29

Iirc @brita was working on that operator?

Iirc @brita was working on that operator?

Added subscriber: @adamlatchem-2

Added subscriber: @adamlatchem-2

One solution (allowing the ray cast algorithm to see the edited mesh when available) is:

index 66eaf34865f..d89d425f95b 100644
    - a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -4614,7 +4614,7 @@ void ED_view3d_cursor3d_update(bContext *C, const int mval[2])
                  SCE_SNAP_MODE_FACE,
                  &(const struct SnapObjectParams){
                      .snap_select = SNAP_ALL,
- .use_object_edit_cage = false,
+                           .use_object_edit_cage = true,
                  },
                  mval_fl, &dist_px,
                  cursor_curr->location, ray_no, NULL,```
One solution (allowing the ray cast algorithm to see the edited mesh when available) is: ```diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 66eaf34865f..d89d425f95b 100644 - a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -4614,7 +4614,7 @@ void ED_view3d_cursor3d_update(bContext *C, const int mval[2]) ``` SCE_SNAP_MODE_FACE, &(const struct SnapObjectParams){ .snap_select = SNAP_ALL, ``` - .use_object_edit_cage = false, + .use_object_edit_cage = true, ``` }, mval_fl, &dist_px, cursor_curr->location, ray_no, NULL,```
Inês Almeida self-assigned this 2018-05-28 19:02:51 +02:00

Added subscribers: @mano-wii, @ideasman42

Added subscribers: @mano-wii, @ideasman42

@adamlatchem-2, setting use_object_edit_cage = true doesn't fix the issue. Although I think this is the correct solution, it's just that the option isn't working at the moment.

From looking at the code the editmesh bvh isn't cached, so every time you snap the cursor it will generate a new BVH for all edit-meshes.

@mano-wii could you look into this?

@adamlatchem-2, setting `use_object_edit_cage = true` doesn't fix the issue. Although I think this is the correct solution, it's just that the option isn't working at the moment. From looking at the code the editmesh bvh isn't cached, so every time you snap the cursor it will generate a new BVH for all edit-meshes. @mano-wii could you look into this?
Inês Almeida removed their assignment 2018-07-27 23:08:35 +02:00
Germano Cavalcante was assigned by Inês Almeida 2018-07-27 23:08:35 +02:00
Member

Re-assigning to mano-wii who is actually doing the work on this one :)

Re-assigning to mano-wii who is actually doing the work on this one :)

This issue was referenced by f81e8903b4

This issue was referenced by f81e8903b407e8faa5f6c78a90bd802bb85fb13e

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
7 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#55202
No description provided.