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

Julian Eisel noreply at git.blender.org
Fri May 8 23:28:50 CEST 2015


Commit: d5f379c8530ac594f170bacc5b1d3f9fb83cd959
Author: Julian Eisel
Date:   Fri May 8 22:42:40 2015 +0200
Branches: wiggly-widgets
https://developer.blender.org/rBd5f379c8530ac594f170bacc5b1d3f9fb83cd959

Merge branch 'master' into wiggly-widgets

Conflicts:
	source/blender/blenloader/intern/versioning_270.c
	source/blender/editors/space_sequencer/sequencer_draw.c
	source/blender/editors/space_view3d/view3d_edit.c

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



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

diff --cc source/blender/blenkernel/intern/object.c
index 470b44d,5b29187..57a2d4f
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@@ -97,9 -96,9 +97,10 @@@
  #include "BKE_editmesh.h"
  #include "BKE_mball.h"
  #include "BKE_modifier.h"
+ #include "BKE_multires.h"
  #include "BKE_node.h"
  #include "BKE_object.h"
 +#include "BKE_object_deform.h"
  #include "BKE_paint.h"
  #include "BKE_particle.h"
  #include "BKE_pointcache.h"
diff --cc source/blender/blenloader/intern/versioning_270.c
index 7e46b5a,df98544..e587896
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@@ -799,42 -799,36 +799,74 @@@ void blo_do_versions_270(FileData *fd, 
  			}
  		}
  	}
+ 
+ 	if (!MAIN_VERSION_ATLEAST(main, 274, 6)) {
+ 		bScreen *screen;
+ 
+ 		if (!DNA_struct_elem_find(fd->filesdna, "FileSelectParams", "int", "thumbnail_size")) {
+ 			for (screen = main->screen.first; screen; screen = screen->id.next) {
+ 				ScrArea *sa;
+ 
+ 				for (sa = screen->areabase.first; sa; sa = sa->next) {
+ 					SpaceLink *sl;
+ 
+ 					for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ 						if (sl->spacetype == SPACE_FILE) {
+ 							SpaceFile *sfile = (SpaceFile *)sl;
+ 
+ 							if (sfile->params) {
+ 								sfile->params->thumbnail_size = 128;
+ 							}
+ 						}
+ 					}
+ 				}
+ 			}
+ 		}
+ 
+ 		if (!DNA_struct_elem_find(fd->filesdna, "RenderData", "short", "simplify_subsurf_render")) {
+ 			Scene *scene;
+ 			for (scene = main->scene.first; scene != NULL; scene = scene->id.next) {
+ 				scene->r.simplify_subsurf_render = scene->r.simplify_subsurf;
+ 				scene->r.simplify_particles_render = scene->r.simplify_particles;
+ 			}
+ 		}
+ 	}
 +	{
 +		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/ED_screen.h
index e23f155,7f6679b..37c5147
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@@ -66,10 -66,8 +66,11 @@@ void    ED_region_header_init(struct AR
  void    ED_region_header(const struct bContext *C, struct ARegion *ar);
  void    ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar);
  void    ED_region_info_draw(struct ARegion *ar, const char *text, int block, float fill_color[4]);
+ void    ED_region_image_metadata_draw(int x, int y, struct ImBuf *ibuf, rctf frame, float zoomx, float zoomy);
  void    ED_region_grid_draw(struct ARegion *ar, float zoomx, float zoomy);
 +void    ED_region_draw_backdrop_view3d(const struct bContext *C, struct Object *camera, const float alpha,
 +                                       const float width, const float height, const float x, const float y,
 +                                       const float zoomx, const float zoomy, const bool draw_background);
  float	ED_region_blend_factor(struct ARegion *ar);
  void	ED_region_visible_rect(struct ARegion *ar, struct rcti *rect);
  
diff --cc source/blender/editors/space_sequencer/sequencer_draw.c
index 9b01dca,0c811ca..0f558fc
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@@ -980,7 -981,77 +981,77 @@@ void sequencer_display_size(Scene *scen
  	}
  }
  
+ static void sequencer_draw_gpencil(const bContext *C)
+ {
+ 	/* draw grease-pencil (image aligned) */
+ 	ED_gpencil_draw_2dimage(C);
+ 
+ 	/* ortho at pixel level */
+ 	UI_view2d_view_restore(C);
+ 
+ 	/* draw grease-pencil (screen aligned) */
+ 	ED_gpencil_draw_view2d(C, 0);
+ }
+ 
+ /* draws content borders plus safety borders if needed */
+ static void sequencer_draw_borders(const SpaceSeq *sseq, const View2D *v2d, const Scene *scene)
+ {
+ 	float x1 = v2d->tot.xmin;
+ 	float y1 = v2d->tot.ymin;
+ 	float x2 = v2d->tot.xmax;
+ 	float y2 = v2d->tot.ymax;
+ 
+ 	/* border */
+ 	setlinestyle(3);
+ 
+ 	UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 1.0, 0);
+ 
+ 	glBegin(GL_LINE_LOOP);
+ 	glVertex2f(x1 - 0.5f, y1 - 0.5f);
+ 	glVertex2f(x1 - 0.5f, y2 + 0.5f);
+ 	glVertex2f(x2 + 0.5f, y2 + 0.5f);
+ 	glVertex2f(x2 + 0.5f, y1 - 0.5f);
+ 	glEnd();
+ 
+ 	/* safety border */
+ 	if (sseq->flag & SEQ_SHOW_SAFE_MARGINS) {
+ 		UI_draw_safe_areas(
+ 		        x1, x2, y1, y2,
+ 		        scene->safe_areas.title,
+ 		        scene->safe_areas.action);
+ 
+ 		if (sseq->flag & SEQ_SHOW_SAFE_CENTER) {
+ 			UI_draw_safe_areas(
+ 			        x1, x2, y1, y2,
+ 			        scene->safe_areas.title_center,
+ 			        scene->safe_areas.action_center);
+ 		}
+ 	}
+ 
+ 	setlinestyle(0);
+ }
+ 
+ /* draws checkerboard background for transparent content */
+ static void sequencer_draw_background(const SpaceSeq *sseq, View2D *v2d, const float viewrect[2])
+ {
+ 	/* setting up the view */
+ 	UI_view2d_totRect_set(v2d, viewrect[0] + 0.5f, viewrect[1] + 0.5f);
+ 	UI_view2d_curRect_validate(v2d);
+ 	UI_view2d_view_ortho(v2d);
+ 
+ 	/* only draw alpha for main buffer */
+ 	if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
+ 		if (sseq->flag & SEQ_USE_ALPHA) {
+ 			glEnable(GL_BLEND);
+ 			glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ 
+ 			fdrawcheckerboard(v2d->tot.xmin, v2d->tot.ymin, v2d->tot.xmax, v2d->tot.ymax);
+ 			glColor4f(1.0, 1.0, 1.0, 1.0);
+ 		}
+ 	}
+ }
+ 
 -void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq, int cfra, int frame_ofs, bool draw_overlay, bool draw_backdrop)
 +void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq, int cfra, int frame_ofs, bool draw_overlay, bool draw_overdrop)
  {
  	struct Main *bmain = CTX_data_main(C);
  	struct ImBuf *ibuf = NULL;
@@@ -1037,7 -1122,7 +1122,7 @@@
  
  	sequencer_display_size(scene, sseq, viewrect);
  
- 	if (sseq->mainb != SEQ_DRAW_IMG_IMBUF || sseq->zebra != 0) {
 -	if (!draw_backdrop && (sseq->mainb != SEQ_DRAW_IMG_IMBUF || sseq->zebra != 0)) {
++	if (!draw_overdrop && (sseq->mainb != SEQ_DRAW_IMG_IMBUF || sseq->zebra != 0)) {
  		SequencerScopes *scopes = &sseq->scopes;
  
  		sequencer_check_scopes(scopes, ibuf);
@@@ -1096,28 -1181,10 +1181,10 @@@
  		}
  	}
  
- 	/* without this colors can flicker from previous opengl state */
- 	glColor4ub(255, 255, 255, 255);
- 
 -	if (!draw_backdrop) {
 +	if (!draw_overdrop) {
- 		UI_view2d_totRect_set(v2d, viewrect[0] + 0.5f, viewrect[1] + 0.5f);
- 		UI_view2d_curRect_validate(v2d);
- 		
- 		/* setting up the view - actual drawing starts here */
- 		UI_view2d_view_ortho(v2d);
- 		
- 		/* only draw alpha for main buffer */
- 		if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
- 			if (sseq->flag & SEQ_USE_ALPHA) {
- 				glEnable(GL_BLEND);
- 				glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- 				
- 				fdrawcheckerboard(v2d->tot.xmin, v2d->tot.ymin, v2d->tot.xmax, v2d->tot.ymax);
- 				glColor4f(1.0, 1.0, 1.0, 1.0);
- 			}
- 		}
+ 		sequencer_draw_background(sseq, v2d, viewrect);
  	}
- 	
+ 
  	if (scope) {
  		IMB_freeImBuf(ibuf);
  		ibuf = scope;
@@@ -1232,18 -1304,30 +1299,20 @@@
  			glTexCoord2f(1.0f, 0.0f); glVertex2f(v2d->tot.xmax, v2d->tot.ymin);
  		}
  	}
 -	else if (draw_backdrop) {
 -		float aspect;
 -		float image_aspect = viewrect[0] / viewrect[1];
 -		float imagex, imagey;
 -
 -		aspect = BLI_rcti_size_x(&ar->winrct) / (float)BLI_rcti_size_y(&ar->winrct);
 -
 -		if (aspect >= image_aspect) {
 -			imagex = image_aspect / aspect;
 -			imagey = 1.0f;
 -		}
 -		else {
 -			imagex = 1.0f;
 -			imagey = aspect / image_aspect;
 -		}
 +	else if (draw_overdrop) {
 +		float imagex = (scene->r.size * scene->r.xsch) / 200.0f * sseq->overdrop_zoom;
 +		float imagey = (scene->r.size * scene->r.ysch) / 200.0f * sseq->overdrop_zoom;
 +		float xofs = BLI_rcti_size_x(&ar->winrct)/2.0f + sseq->overdrop_offset[0];
 +		float yofs = BLI_rcti_size_y(&ar->winrct)/2.0f + sseq->overdrop_offset[1];
- 		
+ 
 -		glTexCoord2f(0.0f, 0.0f); glVertex2f(-imagex, -imagey);
 -		glTexCoord2f(0.0f, 1.0f); glVertex2f(-imagex, imagey);
 -		glTexCoord2f(1.0f, 1.0f); glVertex2f(imagex, imagey);
 -		glTexCoord2f(1.0f, 0.0f); glVertex2f(imagex, -imagey);
 +		glTexCoord2f(0.0f, 0.0f); glVertex2f(-imagex + xofs, -imagey + yofs);
 +		glTexCoord2f(0.0f, 1.0f); glVertex2f(-imagex + xofs, imagey + yofs);
 +		glTexCoord2f(1.0f, 1.0f); glVertex2f(imagex + xofs, imagey + yofs);
 +		glTexCoord2f(1.0f, 0.0f); glVertex2f(imagex + xofs, -imagey + yofs);
  	}
  	else {
+ 		draw_metadata = ((sseq->flag & SEQ_SHOW_METADATA) != 0);
+ 
  		glTexCoord2f(0.0f, 0.0f); glVertex2f(v2d->tot.xmin, v2d->tot.ymin);
  		glTexCoord2f(0.0f, 1.0f); glVertex2f(v2d->tot.xmin, v2d->tot.ymax);
  		glTexCoord2f(1.0f, 1.0f); glVertex2f(v2d->tot.xmax, v2d->tot.ymax);
@@@ -1265,59 -1349,29 +1334,29 @@@
  
  	if (!scope)
  		IMB_freeImBuf(ibuf);
- 	
- 	if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
  
- 		float x1 = v2d->tot.xmin;
- 		float y1 = v2d->tot.ymin;
- 		float x2 = v2d->tot.xmax;
- 		float y2 = v2d->tot.ymax;
- 
- 		/* border */
- 		setlinestyle(3);
- 
- 		UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 1.0, 0);
- 
- 		glBegin(GL_LINE_LOOP);
- 		glVertex2f(x1 - 0.5f, y1 - 0.5f);
- 		glVertex2f(x1 - 0.5f, y2 + 0.5f);
- 		glVertex2f(x2 + 0.5f, y2 + 0.5f);
- 		glVertex2f(x2 + 0.5f, y1 - 0.5f);
- 		glEnd();
+ 	if (draw_metadata) {
+

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list