[Bf-blender-cvs] [e182f7b] wiggly-widgets: Merge branch 'master' into wiggly-widgets

Julian Eisel noreply at git.blender.org
Mon May 9 23:58:53 CEST 2016


Commit: e182f7b8e20466af914ae386932d44333d3c6b23
Author: Julian Eisel
Date:   Mon May 9 23:57:14 2016 +0200
Branches: wiggly-widgets
https://developer.blender.org/rBe182f7b8e20466af914ae386932d44333d3c6b23

Merge branch 'master' into wiggly-widgets

Conflicts:
	source/blender/editors/include/BIF_glutil.h
	source/blender/editors/screen/glutil.c
	source/blender/editors/space_image/image_draw.c

===================================================================



===================================================================

diff --cc source/blender/blenloader/intern/versioning_270.c
index f22399b,efd167d..57ee141
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@@ -1100,44 -1133,22 +1133,61 @@@ void blo_do_versions_270(FileData *fd, 
  			SEQ_END
  		}
  
+ 		/* Adding "Properties" region to DopeSheet */
+ 		for (bScreen *screen = main->screen.first; screen; screen = screen->id.next) {
+ 			for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
+ 				/* handle pushed-back space data first */
+ 				for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
+ 					if (sl->spacetype == SPACE_ACTION) {
+ 						SpaceAction *saction = (SpaceAction *)sl;
+ 						do_version_action_editor_properties_region(&saction->regionbase);
+ 					}
+ 				}
+ 				
+ 				/* active spacedata info must be handled too... */
+ 				if (sa->spacetype == SPACE_ACTION) {
+ 					do_version_action_editor_properties_region(&sa->regionbase);
+ 				}
+ 			}
+ 		}
  	}
 +
 +	{
 +		if (!DNA_struct_elem_find(fd->filesdna, "SpaceNode", "float", "backdrop_zoom")) {
 +			bScreen *sc;
 +			for (sc = main->screen.first; sc; sc = sc->id.next) {
 +				ScrArea *sa;
 +				for (sa = sc->areabase.first; sa; sa = sa->next) {
 +					SpaceLink *sl;
 +					for (sl = sa->spacedata.first; sl; sl = sl->next) {
 +						if (sl->spacetype == SPACE_NODE) {
 +							SpaceNode *snode = (SpaceNode *)sl;
 +							snode->backdrop_zoom = 1.0;
 +						}
 +						if (sl->spacetype == SPACE_SEQ) {
 +							SpaceSeq *sseq = (SpaceSeq *)sl;
 +							sseq->overdrop_zoom = 1.0;
 +						}
 +					}
 +				}
 +			}
 +		}
 +
 +		if (!DNA_struct_elem_find(fd->filesdna, "SpaceIpo", "float", "backdrop_zoom")) {
 +			bScreen *sc;
 +			for (sc = main->screen.first; sc; sc = sc->id.next) {
 +				ScrArea *sa;
 +				for (sa = sc->areabase.first; sa; sa = sa->next) {
 +					SpaceLink *sl;
 +					for (sl = sa->spacedata.first; sl; sl = sl->next) {
 +						if (sl->spacetype == SPACE_IPO) {
 +							SpaceIpo *sipo = (SpaceIpo *)sl;
 +							sipo->backdrop_zoom = 1.0f;
 +							sipo->backdrop_opacity = 0.7f;
 +						}
 +					}
 +				}
 +			}
 +		}
 +	}
  }
diff --cc source/blender/editors/include/BIF_glutil.h
index 12afdf2,0ac5c17..932d5d8
--- a/source/blender/editors/include/BIF_glutil.h
+++ b/source/blender/editors/include/BIF_glutil.h
@@@ -149,8 -151,9 +151,9 @@@ void glaDrawPixelsTex_clipping(float x
   * only RGBA
   * needs glaDefine2DArea to be set.
   */
- void glaDrawPixelsAuto(float x, float y, int img_w, int img_h, int format,
-                        int type, int zoomfilter, float alpha, void *rect);
 -void glaDrawPixelsAuto(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, void *rect);
 -void glaDrawPixelsAuto_clipping(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, void *rect,
++void glaDrawPixelsAuto(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, float alpha, void *rect);
++void glaDrawPixelsAuto_clipping(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, float alpha, void *rect,
+                                 float clip_min_x, float clip_min_y, float clip_max_x, float clip_max_y);
  
  
  void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, void *rect, float scaleX, float scaleY);
@@@ -203,12 -208,24 +208,24 @@@ void bgl_get_mats(bglMats *mats)
  /* **** Color management helper functions for GLSL display/transform ***** */
  
  /* Draw imbuf on a screen, preferably using GLSL display transform */
 -void glaDrawImBuf_glsl(struct ImBuf *ibuf, float x, float y, int zoomfilter,
 +void glaDrawImBuf_glsl(struct ImBuf *ibuf, float x, float y, int zoomfilter, float alpha,
                         struct ColorManagedViewSettings *view_settings,
                         struct ColorManagedDisplaySettings *display_settings);
 -void glaDrawImBuf_glsl_clipping(struct ImBuf *ibuf, float x, float y, int zoomfilter,
++void glaDrawImBuf_glsl_clipping(struct ImBuf *ibuf, float x, float y, int zoomfilter, float alpha,
+                                 struct ColorManagedViewSettings *view_settings,
+                                 struct ColorManagedDisplaySettings *display_settings,
+                                 float clip_min_x, float clip_min_y,
+                                 float clip_max_x, float clip_max_y);
+ 
  
  /* Draw imbuf on a screen, preferably using GLSL display transform */
 -void glaDrawImBuf_glsl_ctx(const struct bContext *C, struct ImBuf *ibuf, float x, float y, int zoomfilter);
 +void glaDrawImBuf_glsl_ctx(const struct bContext *C, struct ImBuf *ibuf, float x, float y, int zoomfilter, float alpha);
+ void glaDrawImBuf_glsl_ctx_clipping(const struct bContext *C,
+                                     struct ImBuf *ibuf,
+                                     float x, float y,
 -                                    int zoomfilter,
++                                    int zoomfilter, float alpha,
+                                     float clip_min_x, float clip_min_y,
+                                     float clip_max_x, float clip_max_y);
  
  void glaDrawBorderCorners(const struct rcti *border, float zoomx, float zoomy);
  
diff --cc source/blender/editors/screen/glutil.c
index c1436d4,cbf8706..a15b830
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@@ -580,18 -614,27 +614,27 @@@ void glaDrawPixelsSafe(float x, float y
  }
  
  /* uses either DrawPixelsSafe or DrawPixelsTex, based on user defined maximum */
- void glaDrawPixelsAuto(float x, float y, int img_w, int img_h, int format,
-                        int type, int zoomfilter, float alpha, void *rect)
+ void glaDrawPixelsAuto_clipping(float x, float y, int img_w, int img_h,
 -                                int format, int type, int zoomfilter, void *rect,
++                                int format, int type, int zoomfilter, float alpha, void *rect,
+                                 float clip_min_x, float clip_min_y,
+                                 float clip_max_x, float clip_max_y)
  {
  	if (U.image_draw_method != IMAGE_DRAW_METHOD_DRAWPIXELS) {
 -		glColor4f(1.0, 1.0, 1.0, 1.0);
 +		glColor4f(1.0, 1.0, 1.0, alpha);
- 		glaDrawPixelsTex(x, y, img_w, img_h, format, type, zoomfilter, rect);
+ 		glaDrawPixelsTex_clipping(x, y, img_w, img_h, format, type, zoomfilter, rect,
+ 		                          clip_min_x, clip_min_y, clip_max_x, clip_max_y);
  	}
  	else {
  		glaDrawPixelsSafe(x, y, img_w, img_h, img_w, format, type, rect);
  	}
  }
  
 -void glaDrawPixelsAuto(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, void *rect)
++void glaDrawPixelsAuto(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, float alpha, void *rect)
+ {
 -	glaDrawPixelsAuto_clipping(x, y, img_w, img_h, format, type, zoomfilter, rect,
++	glaDrawPixelsAuto_clipping(x, y, img_w, img_h, format, type, zoomfilter, alpha, rect,
+ 	                           0.0f, 0.0f, 0.0f, 0.0f);
+ }
+ 
  /* 2D Drawing Assistance */
  
  void glaDefine2DArea(rcti *screen_rect)
@@@ -823,9 -866,11 +866,11 @@@ void bglPolygonOffset(float viewdist, f
  /* **** Color management helper functions for GLSL display/transform ***** */
  
  /* Draw given image buffer on a screen using GLSL for display transform */
- void glaDrawImBuf_glsl(ImBuf *ibuf, float x, float y, int zoomfilter, float alpha,
-                        ColorManagedViewSettings *view_settings,
-                        ColorManagedDisplaySettings *display_settings)
 -void glaDrawImBuf_glsl_clipping(ImBuf *ibuf, float x, float y, int zoomfilter,
++void glaDrawImBuf_glsl_clipping(ImBuf *ibuf, float x, float y, int zoomfilter, float alpha,
+                                 ColorManagedViewSettings *view_settings,
+                                 ColorManagedDisplaySettings *display_settings,
+                                 float clip_min_x, float clip_min_y,
+                                 float clip_max_x, float clip_max_y)
  {
  	bool force_fallback = false;
  	bool need_fallback = true;
@@@ -898,22 -945,43 +945,43 @@@
  
  		display_buffer = IMB_display_buffer_acquire(ibuf, view_settings, display_settings, &cache_handle);
  
- 		if (display_buffer)
- 			glaDrawPixelsAuto(x, y, ibuf->x, ibuf->y, GL_RGBA, GL_UNSIGNED_BYTE,
- 			                  zoomfilter, alpha, display_buffer);
+ 		if (display_buffer) {
+ 			glaDrawPixelsAuto_clipping(x, y, ibuf->x, ibuf->y, GL_RGBA, GL_UNSIGNED_BYTE,
 -			                           zoomfilter, display_buffer,
++			                           zoomfilter, alpha, display_buffer,
+ 			                           clip_min_x, clip_min_y, clip_max_x, clip_max_y);
+ 		}
  
  		IMB_display_buffer_release(cache_handle);
  	}
  }
  
- void glaDrawImBuf_glsl_ctx(const bContext *C, ImBuf *ibuf, float x, float y, int zoomfilter, float alpha)
 -void glaDrawImBuf_glsl(ImBuf *ibuf, float x, float y, int zoomfilter,
++void glaDrawImBuf_glsl(ImBuf *ibuf, float x, float y, int zoomfilter, float alpha,
+                        ColorManagedViewSettings *view_settings,
+                        ColorManagedDisplaySettings *display_settings)
+ {
 -	glaDrawImBuf_glsl_clipping(ibuf, x, y, zoomfilter, view_settings, display_settings,
++	glaDrawImBuf_glsl_clipping(ibuf, x, y, zoomfilter, alpha, view_settings, display_settings,
+ 	                           0.0f, 0.0f, 0.0f, 0.0f);
+ }
+ 
+ void glaDrawImBuf_glsl_ctx_clipping(const bContext *C,
+                                     ImBuf *ibuf,
+                                     float x, float y,
 -                                    int zoomfilter,
++                                    int zoomfilter, float alpha,
+                                     float clip_min_x, float clip_min_y,
+                                     float clip_max_x, float clip_max_y)
  {
  	ColorManagedViewSettings *view_settings;
  	ColorManagedDisplaySettings *display_settings;
  
  	IMB_colormanagement_display_settings_from_ctx(C, &view_settings, &display_settings);
  
- 	glaDrawImBuf_glsl(ibuf, x, y, zoomfilter, alpha, view_settings, display_settings);
 -	glaDrawImBuf_

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list