[Bf-blender-cvs] [96f88511eed] master: Fix T98688: Snapping not working in curve objects with evaluated geometry

Germano Cavalcante noreply at git.blender.org
Thu Jun 9 02:50:34 CEST 2022


Commit: 96f88511eed52028007e28934e9f56fa42134d96
Author: Germano Cavalcante
Date:   Wed Jun 8 21:16:45 2022 -0300
Branches: master
https://developer.blender.org/rB96f88511eed52028007e28934e9f56fa42134d96

Fix T98688: Snapping not working in curve objects with evaluated geometry

It's an old behavior. Not really considered a bug.

But snapping to faces is already supported in this case.
And allowing snapping to other elements is not disruptive.

===================================================================

M	source/blender/editors/transform/transform_snap_object.cc

===================================================================

diff --git a/source/blender/editors/transform/transform_snap_object.cc b/source/blender/editors/transform/transform_snap_object.cc
index 40d1714f94f..cf99d4b2ef3 100644
--- a/source/blender/editors/transform/transform_snap_object.cc
+++ b/source/blender/editors/transform/transform_snap_object.cc
@@ -2745,11 +2745,8 @@ static void snap_obj_fn(SnapObjectContext *sctx,
                             dt->r_index);
       break;
     case OB_CURVES_LEGACY:
-      retval = snapCurve(
-          sctx, params, ob_eval, obmat, dt->dist_px, dt->r_loc, dt->r_no, dt->r_index);
-      break; /* Use ATTR_FALLTHROUGH if we want to snap to the generated mesh. */
     case OB_SURF:
-      if (BKE_object_is_in_editmode(ob_eval)) {
+      if (ob_eval->type == OB_CURVES_LEGACY || BKE_object_is_in_editmode(ob_eval)) {
         retval = snapCurve(
             sctx, params, ob_eval, obmat, dt->dist_px, dt->r_loc, dt->r_no, dt->r_index);
         if (params->edit_mode_type != SNAP_GEOM_FINAL) {



More information about the Bf-blender-cvs mailing list