svn merge -r38500:38600 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / editors / space_view3d / drawobject.c
index b308368e72b7231cb3da968bff0ba3f51d9b4a33..c3b8e3de6a3b7c69801674cf47cadf3970c3e6e0 100644 (file)
@@ -1338,6 +1338,11 @@ static void draw_focus_cross(float dist, float size)
        glEnd();
 }
 
+#ifdef VIEW3D_CAMERA_BORDER_HACK
+float view3d_camera_border_hack_col[4];
+short view3d_camera_border_hack_test= FALSE;
+#endif
+
 /* flag similar to draw_object() */
 static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, int flag)
 {
@@ -1351,7 +1356,15 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob
        const float scax= 1.0f / len_v3(ob->obmat[0]);
        const float scay= 1.0f / len_v3(ob->obmat[1]);
        const float scaz= 1.0f / len_v3(ob->obmat[2]);
-       
+
+#ifdef VIEW3D_CAMERA_BORDER_HACK
+       if(is_view && !(G.f & G_PICKSEL)) {
+               glGetFloatv(GL_CURRENT_COLOR, view3d_camera_border_hack_col);
+               view3d_camera_border_hack_test= TRUE;
+               return;
+       }
+#endif
+
        cam= ob->data;
        aspx= (float) scene->r.xsch*scene->r.xasp;
        aspy= (float) scene->r.ysch*scene->r.yasp;