Revision: 43487
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43487
Author:   mfoxdogg
Date:     2012-01-18 10:41:38 +0000 (Wed, 18 Jan 2012)
Log Message:
-----------
small usability edit, now there is some feedback on when the camera is locked 
to view.

A warnign will now appear in the top left corner and the camera outline becomes 
red, this warning only appears in camera view

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/view3d_draw.c

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_draw.c     
2012-01-18 10:39:07 UTC (rev 43486)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_draw.c     
2012-01-18 10:41:38 UTC (rev 43487)
@@ -829,6 +829,16 @@
        }
 }
 
+static void draw_camera_view_locked(ARegion *ar, View3D *v3d)
+{
+       RegionView3D *rv3d= ar->regiondata;
+
+       if (v3d->flag2 & V3D_LOCK_CAMERA && rv3d->persp==RV3D_CAMOB) {
+               UI_ThemeColor(TH_REDALERT);
+               BLF_draw_default_ascii(22,  ar->winy-28, 0.0f, "Camera is 
LOCKED to view", BLF_DRAW_STR_DUMMY_MAX);
+       }
+}
+
 /* draw info beside axes in bottom left-corner: 
 *      framenum, object name, bone name (if available), marker name (if 
available)
 */
@@ -1097,7 +1107,12 @@
        glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);      
 
        setlinestyle(0);
-       UI_ThemeColor(TH_BACK);
+       
+       if (v3d->flag2 & V3D_LOCK_CAMERA)
+               UI_ThemeColor(TH_REDALERT);
+       else 
+               UI_ThemeColor(TH_BACK);
+               
        glRectf(x1i, y1i, x2i, y2i);
 
 #ifdef VIEW3D_CAMERA_BORDER_HACK
@@ -2889,6 +2904,9 @@
        else if(U.uiflag & USER_SHOW_VIEWPORTNAME) {
                draw_viewport_name(ar, v3d);
        }
+
+       draw_camera_view_locked(ar, v3d);
+
        if (grid_unit) { /* draw below the viewport name */
                char numstr[32]= "";
 

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to