[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58201] trunk/blender/source/blender/ editors/transform/transform_manipulator.c: Fix #35827: object selection through camera view not working in some cases.

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Jul 12 21:32:37 CEST 2013


Revision: 58201
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58201
Author:   blendix
Date:     2013-07-12 19:32:36 +0000 (Fri, 12 Jul 2013)
Log Message:
-----------
Fix #35827: object selection through camera view not working in some cases.

The problem was that when the camera is selected, the transform manipulator
is located exactly at the camera view location, and this was blocking selection
of other objects with some OpenGL implementations.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/transform/transform_manipulator.c

Modified: trunk/blender/source/blender/editors/transform/transform_manipulator.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_manipulator.c	2013-07-12 16:33:37 UTC (rev 58200)
+++ trunk/blender/source/blender/editors/transform/transform_manipulator.c	2013-07-12 19:32:36 UTC (rev 58201)
@@ -1641,6 +1641,11 @@
 		mul_mat3_m4_fl(rv3d->twmat, ED_view3d_pixel_size(rv3d, rv3d->twmat[3]) * U.tw_size * 5.0f);
 	}
 
+	/* when looking through a selected camera, the manipulator can be at the
+	 * exact same position as the view, skip so we don't break selection */
+	if (fabsf(mat4_to_scale(rv3d->twmat)) < 1e-7f)
+		return;
+
 	test_manipulator_axis(C);
 	drawflags = rv3d->twdrawflag;    /* set in calc_manipulator_stats */
 
@@ -1679,6 +1684,11 @@
 	short hits;
 	extern void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); // XXX check a bit later on this... (ton)
 
+	/* when looking through a selected camera, the manipulator can be at the
+	 * exact same position as the view, skip so we don't break selection */
+	if (fabsf(mat4_to_scale(rv3d->twmat)) < 1e-7f)
+		return 0;
+
 	G.f |= G_PICKSEL;
 
 	rect.xmin = mval[0] - hotspot;




More information about the Bf-blender-cvs mailing list