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

Antony Riakiotakis noreply at git.blender.org
Mon Mar 9 12:41:14 CET 2015


Commit: 02c142e58295be63681e7c593179fce2e9d43311
Author: Antony Riakiotakis
Date:   Mon Mar 9 12:40:59 2015 +0100
Branches: wiggly-widgets
https://developer.blender.org/rB02c142e58295be63681e7c593179fce2e9d43311

Merge branch 'master' into wiggly-widgets

Conflicts:
	source/blender/blenloader/intern/versioning_270.c
	source/blender/editors/include/ED_view3d.h
	source/blender/editors/space_sequencer/sequencer_draw.c
	source/blender/editors/space_view3d/view3d_draw.c
	source/blender/makesdna/DNA_view3d_types.h

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



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

diff --cc source/blender/blenloader/intern/versioning_270.c
index 81c2776,ab5c8ac..24c1ff7
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@@ -592,25 -604,55 +604,76 @@@ void blo_do_versions_270(FileData *fd, 
  		}
  	}
  
+ 	if (!MAIN_VERSION_ATLEAST(main, 273, 8)) {
+ 		Object *ob;
+ 		for (ob = main->object.first; ob != NULL; ob = ob->id.next) {
+ 			ModifierData *md;
+ 			for (md = ob->modifiers.last; md != NULL; md = md->prev) {
+ 				if (modifier_unique_name(&ob->modifiers, md)) {
+ 					printf("Warning: Object '%s' had several modifiers with the "
+ 					       "same name, renamed one of them to '%s'.\n",
+ 					       ob->id.name + 2, md->name);
+ 				}
+ 			}
+ 		}
+ 
+ 		if (!DNA_struct_elem_find(fd->filesdna, "bSteeringActuator", "float", "acceleration")) {
+ 			for (ob = main->object.first; ob; ob = ob->id.next) {
+ 				bActuator *act;
+ 				for (act = ob->actuators.first; act; act = act->next) {
+ 					if (act->type == ACT_STEERING) {
+ 						bSteeringActuator *sact = act->data;
+ 						sact->acceleration = 1000.f;
+ 					}
+ 				}
+ 			}
+ 		}
+ 	}
+ 
+ 	if (!MAIN_VERSION_ATLEAST(main, 273, 9)) {
+ 		bScreen *scr;
+ 		ScrArea *sa;
+ 		SpaceLink *sl;
+ 		ARegion *ar;
+ 
+ 		/* Make sure sequencer preview area limits zoom */
+ 		for (scr = main->screen.first; scr; scr = scr->id.next) {
+ 			for (sa = scr->areabase.first; sa; sa = sa->next) {
+ 				for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ 					if (sl->spacetype == SPACE_SEQ) {
+ 						for (ar = sl->regionbase.first; ar; ar = ar->next) {
+ 							if (ar->regiontype == RGN_TYPE_PREVIEW) {
+ 								ar->v2d.keepzoom |= V2D_LIMITZOOM;
+ 								ar->v2d.minzoom = 0.001f;
+ 								ar->v2d.maxzoom = 1000.0f;
+ 								break;
+ 							}
+ 						}
+ 					}
+ 				}
+ 			}
+ 		}
+ 	}
+ 
 +	if (!MAIN_VERSION_ATLEAST(main, 274, 0)) {
 +		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;
 +						}
 +					}
 +				}
 +			}
 +		}
 +	}
  }
diff --cc source/blender/editors/include/ED_view3d.h
index ae9271d,5bf077b..ba93e2f
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@@ -62,9 -61,10 +62,13 @@@ struct rcti
  struct wmOperator;
  struct wmOperatorType;
  struct wmWindow;
 +struct wmWidget;
 +struct wmWidgetGroup;
 +struct wmWidgetGroupType;
+ struct GPUFX;
+ struct GPUOffScreen;
+ struct GPUFXSettings;
+ enum eGPUFXFlags;
  
  /* for derivedmesh drawing callbacks, for view3d_select, .... */
  typedef struct ViewContext {
@@@ -305,12 -306,13 +310,15 @@@ void ED_view3d_check_mats_rv3d(struct R
  #endif
  int ED_view3d_scene_layer_set(int lay, const int *values, int *active);
  
 +void ED_draw_object_facemap(struct Scene *scene, struct Object *ob, int facemap);
 +
  bool ED_view3d_context_activate(struct bContext *C);
  void ED_view3d_draw_offscreen_init(struct Scene *scene, struct View3D *v3d);
- void ED_view3d_draw_offscreen(struct Scene *scene, struct View3D *v3d, struct ARegion *ar,
-                               int winx, int winy, float viewmat[4][4], float winmat[4][4], bool do_bgpic, bool do_sky);
+ void ED_view3d_draw_offscreen(
+         struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int winx, int winy, float viewmat[4][4],
+         float winmat[4][4], bool do_bgpic, bool do_sky, bool is_persp,
+         struct GPUOffScreen *ofs,
+         struct GPUFX *fx, struct GPUFXSettings *fx_settings);
  
  struct ImBuf *ED_view3d_draw_offscreen_imbuf(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int sizex, int sizey, unsigned int flag,
                                               bool draw_background, int alpha_mode, char err_out[256]);
diff --cc source/blender/editors/space_sequencer/sequencer_draw.c
index d6fc5c4,b63c46c..95c775d
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@@ -952,7 -952,33 +952,33 @@@ static ImBuf *sequencer_make_scope(Scen
  	return scope;
  }
  
+ static void sequencer_display_size(Scene *scene, SpaceSeq *sseq, float r_viewrect[2])
+ {
+ 	float render_size, proxy_size;
+ 
+ 	if (sseq->render_size == SEQ_PROXY_RENDER_SIZE_SCENE) {
+ 		render_size = (float)scene->r.size / 100.0f;
+ 		proxy_size = 1.0f;
+ 	}
+ 	else {
+ 		render_size = (float)sseq->render_size / 100.0f;
+ 		proxy_size = render_size;
+ 	}
+ 
+ 	r_viewrect[0] = (render_size * (float)scene->r.xsch);
+ 	r_viewrect[1] = (render_size * (float)scene->r.ysch);
+ 
+ 	/* rectx = viewrectx + 0.5f; */ /* UNUSED */
+ 	/* recty = viewrecty + 0.5f; */ /* UNUSED */
+ 
+ 	if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
+ 		r_viewrect[0] *= scene->r.xasp / scene->r.yasp;
+ 		r_viewrect[0] /= proxy_size;
+ 		r_viewrect[1] /= proxy_size;
+ 	}
+ }
+ 
 -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;
@@@ -985,30 -1009,7 +1009,7 @@@
  		}
  	}
  
- 	render_size = sseq->render_size;
- 	if (render_size == 0) {
- 		render_size = scene->r.size;
- 	}
- 	else {
- 		proxy_size = render_size;
- 	}
- 	if (render_size < 0) {
- 		return;
- 	}
- 
- 	viewrectx = (render_size * (float)scene->r.xsch) / 100.0f;
- 	viewrecty = (render_size * (float)scene->r.ysch) / 100.0f;
- 
- 	/* rectx = viewrectx + 0.5f; */ /* UNUSED */
- 	/* recty = viewrecty + 0.5f; */ /* UNUSED */
- 
- 	if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
- 		viewrectx *= scene->r.xasp / scene->r.yasp;
- 		viewrectx /= proxy_size / 100.0f;
- 		viewrecty /= proxy_size / 100.0f;
- 	}
- 
 -	if ((!draw_overlay || sseq->overlay_type == SEQ_DRAW_OVERLAY_REFERENCE) && !draw_backdrop) {
 +	if ((!draw_overlay || sseq->overlay_type == SEQ_DRAW_OVERLAY_REFERENCE) && !draw_overdrop) {
  		UI_GetThemeColor3fv(TH_SEQ_PREVIEW, col);
  		glClearColor(col[0], col[1], col[2], 0.0);
  		glClear(GL_COLOR_BUFFER_BIT);
@@@ -1083,8 -1090,8 +1090,8 @@@
  	/* 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, viewrectx + 0.5f, viewrecty + 0.5f);
+ 		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 */
diff --cc source/blender/editors/space_view3d/view3d_draw.c
index 20f77c2,8e516e1..fb8e2ac
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@@ -3486,10 -3563,13 +3559,15 @@@ static void view3d_main_area_draw_objec
  	}
  
  	/* main drawing call */
- 	view3d_draw_objects(C, scene, v3d, ar, grid_unit, true, false);
- 	
+ 	view3d_draw_objects(C, scene, v3d, ar, grid_unit, true, false, do_compositing ? rv3d->compositor : NULL);
+ 
 +	WM_widgets_draw(C, ar->widgetmaps.first, true);
 +
+ 	/* post process */
+ 	if (do_compositing) {
+ 		GPU_fx_do_composite_pass(rv3d->compositor, rv3d->winmat, rv3d->is_persp, scene, NULL);
+ 	}
+ 
  	/* Disable back anti-aliasing */
  	if (U.ogl_multisamples != USER_MULTISAMPLE_NONE) {
  		glDisable(GL_MULTISAMPLE_ARB);
diff --cc source/blender/windowmanager/intern/wm_generic_widgets.c
index 7f48acc,0000000..557fa7d
mode 100644,000000..100644
--- a/source/blender/windowmanager/intern/wm_generic_widgets.c
+++ b/source/blender/windowmanager/intern/wm_generic_widgets.c
@@@ -1,1113 -1,0 +1,1113 @@@
 +/*
 + * ***** BEGIN GPL LICENSE BLOCK *****
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
 + * as published by the Free Software Foundation; either version 2
 + * of the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software Foundation,
 + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 + *
 + * The Original Code is Copyright (C) 2009 Blender Foundation.
 + * All rights reserved.
 + *
 + * Contributor(s): Blender Foundation
 + *
 + * ***** END GPL LICENSE BLOCK *****
 + */
 +
 +/** \file blender/editors/interface/interface_generic_widgets.c
 + *  \ingroup edinterface
 + */
 +
 +#include "RNA_types.h"
 +#include "RNA_access.h"
 +
 +#include "DNA_scene_types.h"
 +#include "DNA_screen_types.h"
 +#include "DNA_object_types.h"
 +#include "DNA_view3d_types.h"
 +#include "DNA_windowmanager_types.h"
 +#include "DNA_userdef_types.h"
 +#include "DNA_widget_types.h"
 +
 +#include "BLI_utildefines.h"
 +#include "BLI_math_matrix.h"
 +#include "BLI_math.h"
 +#include "BLI_rect.h"
 +
 +#include "BKE_context.h"
 +#include "BKE_depsgraph.h"
 +#include "BKE_object.h"
 +
 +#include "ED_view3d.h"
 +#include "ED_screen.h"
 +
 +#include "WM_types.h"
 +#include "WM_api.h"
 +
 +#include "GL/glew.h"
 +#include "GPU_select.h"
 +
 +#include "BIF_glutil.h"
 +
 +#include "MEM_guardedalloc.h"
 +
 +#include "UI_interface.h"
 +
 +#include "3d_widgets/ui_widget_library.h"
 +
 +#include "wm.h"
 +#include "WM_types.h"
 +
 +
 +/******************************************************
 + *            GENERIC WIDGET LIBRARY                  *
 + ***************************************

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list