Commit: 81a7f6c84844a7eafc33711c1fb792e8e0bbc459 Author: Sebastian Parborg Date: Sun Mar 10 12:05:06 2019 +0100 Branches: master https://developer.blender.org/rB81a7f6c84844a7eafc33711c1fb792e8e0bbc459
Fix T62125: snapping not working if invisible object is between you and the target If we were not in x-ray/wireframe mode, the snapping would treat all objects like they were in solid mode. This were not desirable if you had objects that were in wire or bounding box display mode. Now objects that are in bounding box mode is ignored (unless the object is in edit mode) and objects with wire display mode is treated as if they were in x-ray mode. Reviewed By: Brecht Differential Revision: http://developer.blender.org/D4493 =================================================================== M source/blender/editors/transform/transform_snap_object.c =================================================================== diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index e7c4c2e441c..beb420fd498 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -685,6 +685,11 @@ static bool raycastObj( switch (ob->type) { case OB_MESH: { + if (ob->dt == OB_BOUNDBOX || ob->dt == OB_WIRE) { + /* Do not hit objects that are in wire or bounding box display mode */ + return false; + } + Mesh *me = ob->data; if (BKE_object_is_in_editmode(ob)) { BMEditMesh *em = BKE_editmesh_from_object(ob); @@ -2183,6 +2188,11 @@ static short snapObject( me = em->mesh_eval_final; } } + else if (ob->dt == OB_BOUNDBOX) { + /* Do not snap to objects that are in bounding box display mode */ + return 0; + } + retval = snapMesh( sctx, snapdata, ob, me, obmat, dist_px, _______________________________________________ Bf-blender-cvs mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-blender-cvs
