[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43373] trunk/blender/source/blender: - opengl render in quadview wasn't using camera.

Campbell Barton ideasman42 at gmail.com
Sat Jan 14 12:21:11 CET 2012


Revision: 43373
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43373
Author:   campbellbarton
Date:     2012-01-14 11:21:00 +0000 (Sat, 14 Jan 2012)
Log Message:
-----------
- opengl render in quadview wasn't using camera.
- minor change to FTOCHAR use.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/tracking.c
    trunk/blender/source/blender/editors/interface/interface_widgets.c
    trunk/blender/source/blender/editors/render/render_opengl.c

Modified: trunk/blender/source/blender/blenkernel/intern/tracking.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/tracking.c	2012-01-14 10:33:16 UTC (rev 43372)
+++ trunk/blender/source/blender/blenkernel/intern/tracking.c	2012-01-14 11:21:00 UTC (rev 43373)
@@ -1180,10 +1180,11 @@
 			int pixel= ibuf->x*y + x;
 
 			if(ibuf->rect_float) {
-				float *rrgbf= ibuf->rect_float + pixel*4;
-				*cp= FTOCHAR(0.2126f*rrgbf[0] + 0.7152f*rrgbf[1] + 0.0722f*rrgbf[2]);
+				const float *rrgbf= ibuf->rect_float + pixel*4;
+				const float grey_f= 0.2126f*rrgbf[0] + 0.7152f*rrgbf[1] + 0.0722f*rrgbf[2];
+				*cp= FTOCHAR(grey_f);
 			} else {
-				unsigned char *rrgb= (unsigned char*)ibuf->rect + pixel*4;
+				const unsigned char *rrgb= (unsigned char*)ibuf->rect + pixel*4;
 				*cp= 0.2126f*rrgb[0] + 0.7152f*rrgb[1] + 0.0722f*rrgb[2];
 			}
 			cp++;

Modified: trunk/blender/source/blender/editors/interface/interface_widgets.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_widgets.c	2012-01-14 10:33:16 UTC (rev 43372)
+++ trunk/blender/source/blender/editors/interface/interface_widgets.c	2012-01-14 11:21:00 UTC (rev 43373)
@@ -2501,10 +2501,8 @@
 	if (color_profile)
 		linearrgb_to_srgb_v3_v3(col, col);
 	
-	wcol->inner[0]= FTOCHAR(col[0]);
-	wcol->inner[1]= FTOCHAR(col[1]);
-	wcol->inner[2]= FTOCHAR(col[2]);
-	wcol->inner[3]= FTOCHAR(col[3]);
+	F4TOCHAR4(col, wcol->inner);
+
 	wcol->shaded = 0;
 	wcol->alpha_check = (wcol->inner[3] < 255);
 

Modified: trunk/blender/source/blender/editors/render/render_opengl.c
===================================================================
--- trunk/blender/source/blender/editors/render/render_opengl.c	2012-01-14 10:33:16 UTC (rev 43372)
+++ trunk/blender/source/blender/editors/render/render_opengl.c	2012-01-14 11:21:00 UTC (rev 43373)
@@ -328,8 +328,8 @@
 
 	if(is_view_context) {
 		oglrender->v3d= CTX_wm_view3d(C);
-		oglrender->ar= CTX_wm_region(C);
-		oglrender->rv3d= CTX_wm_region_view3d(C);
+		oglrender->ar= ED_view3d_context_region_unlock(C); /* so quad view renders camera */
+		oglrender->rv3d= oglrender->ar->regiondata;
 
 		/* MUST be cleared on exit */
 		oglrender->scene->customdata_mask_modal = (ED_view3d_datamask(oglrender->scene, oglrender->v3d) |



More information about the Bf-blender-cvs mailing list