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

Julian Eisel noreply at git.blender.org
Thu Jul 14 11:53:43 CEST 2016


Commit: 01929e87e0e9d3a0c8314d6883fee14683607d8a
Author: Julian Eisel
Date:   Thu Jul 14 11:53:25 2016 +0200
Branches: wiggly-widgets
https://developer.blender.org/rB01929e87e0e9d3a0c8314d6883fee14683607d8a

Merge branch 'master' into wiggly-widgets

Conflicts:
	intern/cycles/blender/addon/ui.py
	source/blender/editors/transform/transform_manipulator.c

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



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

diff --cc source/blender/blenkernel/intern/library_query.c
index ea5bb41,f86f5fa..ac18d2c
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@@ -449,8 -462,9 +462,10 @@@ void BKE_library_foreach_ID_link(ID *id
  
  				if (object->pose) {
  					bPoseChannel *pchan;
+ 
+ 					data.cd_flag |= proxy_cd_flag;
  					for (pchan = object->pose->chanbase.first; pchan; pchan = pchan->next) {
 +						CALLBACK_INVOKE(pchan->fmap_object, IDWALK_USER);
  						CALLBACK_INVOKE(pchan->custom, IDWALK_USER);
  						BKE_constraints_id_loop(&pchan->constraints, library_foreach_constraintObjectLooper, &data);
  					}
diff --cc source/blender/blenloader/intern/readfile.c
index 79ad906,4ef30fe..6948aa2
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -6614,7 -6607,6 +6619,7 @@@ void blo_lib_link_screen_restore(Main *
  						if (ads->filter_grp)
  							ads->filter_grp = restore_pointer_by_name(id_map, (ID *)ads->filter_grp, USER_IGNORE);
  					}
- 					sipo->backdrop_camera = restore_pointer_by_name(newmain, (ID *)sipo->backdrop_camera, USER_IGNORE);
++					sipo->backdrop_camera = restore_pointer_by_name(id_map, (ID *)sipo->backdrop_camera, USER_IGNORE);
  					
  					/* force recalc of list of channels (i.e. includes calculating F-Curve colors)
  					 * thus preventing the "black curves" problem post-undo
diff --cc source/blender/blenloader/intern/versioning_270.c
index f8c6c30,ac2811a..01fa1be
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@@ -1212,44 -1212,18 +1212,57 @@@ void blo_do_versions_270(FileData *fd, 
  				}
  			}
  		}
+ 
+ 		if (!DNA_struct_elem_find(fd->filesdna, "BooleanModifierData", "float", "double_threshold")) {
+ 			Object *ob;
+ 			for (ob = main->object.first; ob; ob = ob->id.next) {
+ 				ModifierData *md;
+ 				for (md = ob->modifiers.first; md; md = md->next) {
+ 					if (md->type == eModifierType_Boolean) {
+ 						BooleanModifierData *bmd = (BooleanModifierData *)md;
+ 						bmd->double_threshold = 1e-6f;
+ 					}
+ 				}
+ 			}
+ 		}
  	}
 +
 +	{
 +		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/interface/resources.c
index 557dd83,c8ff335..a2f00e5
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@@ -2694,16 -2725,15 +2720,24 @@@ void init_userdef_do_versions(void
  			}
  		}
  	}
+ 	
+ 	if (!USER_VERSION_ATLEAST(277, 2)) {
+ 		bTheme *btheme;
+ 		for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+ 			if (btheme->tact.keyframe_scale_fac < 0.1f)
+ 				btheme->tact.keyframe_scale_fac = 1.0f;
+ 		}
+ 	}
  
 +	if (!USER_VERSION_ATLEAST(277, 0)) {
 +		bTheme *btheme;
 +		for (btheme = U.themes.first; btheme; btheme = btheme->next) {
 +			rgba_char_args_set_fl(btheme->tui.xaxis, 1.0f, 0.27f, 0.27f, 1.0f); /* red */
 +			rgba_char_args_set_fl(btheme->tui.yaxis, 0.27f, 1.0f, 0.27f, 1.0f); /* green */
 +			rgba_char_args_set_fl(btheme->tui.zaxis, 0.27f, 0.27f, 1.0f, 1.0f); /* blue */
 +		}
 +	}
 +
  	/**
  	 * Include next version bump.
  	 *
diff --cc source/blender/editors/space_graph/space_graph.c
index 0aea3ac,2582ba4..bb77584
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@@ -590,130 -676,9 +708,18 @@@ static void graph_refresh(const bContex
  	}
  	
  	/* init/adjust F-Curve colors */
- 	if (ANIM_animdata_get_context(C, &ac)) {
- 		ListBase anim_data = {NULL, NULL};
- 		bAnimListElem *ale;
- 		size_t items;
- 		int filter;
- 		int i;
- 		
- 		UI_SetTheme(SPACE_IPO, RGN_TYPE_WINDOW);
- 
- 		/* build list of F-Curves which will be visible as channels in channel-region
- 		 *  - we don't include ANIMFILTER_CURVEVISIBLE filter, as that will result in a
- 		 *    mismatch between channel-colors and the drawn curves
- 		 */
- 		filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_NODUPLIS);
- 		items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- 		
- 		/* loop over F-Curves, assigning colors */
- 		for (ale = anim_data.first, i = 0; ale; ale = ale->next, i++) {
- 			FCurve *fcu = (FCurve *)ale->data;
- 			
- 			/* set color of curve here */
- 			switch (fcu->color_mode) {
- 				case FCURVE_COLOR_CUSTOM:
- 				{
- 					/* User has defined a custom color for this curve already (we assume it's not going to cause clashes with text colors),
- 					 * which should be left alone... Nothing needs to be done here.
- 					 */
- 					break;
- 				}
- 				case FCURVE_COLOR_AUTO_RGB:
- 				{
- 					/* F-Curve's array index is automatically mapped to RGB values. This works best of 3-value vectors. 
- 					 * TODO: find a way to module the hue so that not all curves have same color...
- 					 */
- 					float *col = fcu->color;
- 					
- 					switch (fcu->array_index) {
- 						case 0:
- 							UI_GetThemeColor3fv(TH_AXIS_X, col);
- 							break;
- 						case 1:
- 							UI_GetThemeColor3fv(TH_AXIS_Y, col);
- 							break;
- 						case 2:
- 							UI_GetThemeColor3fv(TH_AXIS_Z, col);
- 							break;
- 						default:
- 							/* 'unknown' color - bluish so as to not conflict with handles */
- 							col[0] = 0.3f; col[1] = 0.8f; col[2] = 1.0f;
- 							break;
- 					}
- 					break;
- 				}
- 				case FCURVE_COLOR_AUTO_YRGB:
- 				{
- 					/* Like FCURVE_COLOR_AUTO_RGB, except this is for quaternions... */
- 					float *col = fcu->color;
- 					
- 					switch (fcu->array_index) {
- 						case 1:
- 							UI_GetThemeColor3fv(TH_AXIS_X, col);
- 							break;
- 						case 2:
- 							UI_GetThemeColor3fv(TH_AXIS_Y, col);
- 							break;
- 						case 3:
- 							UI_GetThemeColor3fv(TH_AXIS_Z, col);
- 							break;
- 						
- 						case 0:
- 						{
- 							/* Special Case: "W" channel should be yellowish, so blend X and Y channel colors... */
- 							float c1[3], c2[3];
- 							float h1[3], h2[3];
- 							float hresult[3];
- 							
- 							/* - get colors (rgb) */
- 							UI_GetThemeColor3fv(TH_AXIS_X, c1);
- 							UI_GetThemeColor3fv(TH_AXIS_Y, c2);
- 							
- 							/* - perform blending in HSV space (to keep brightness similar) */
- 							rgb_to_hsv_v(c1, h1);
- 							rgb_to_hsv_v(c2, h2);
- 							
- 							interp_v3_v3v3(hresult, h1, h2, 0.5f);
- 							
- 							/* - convert back to RGB for display */
- 							hsv_to_rgb_v(hresult, col);
- 							break;
- 						}
- 						
- 						default:
- 							/* 'unknown' color - bluish so as to not conflict with handles */
- 							col[0] = 0.3f; col[1] = 0.8f; col[2] = 1.0f;
- 							break;
- 					}
- 					break;
- 				}
- 				case FCURVE_COLOR_AUTO_RAINBOW:
- 				default:
- 				{
- 					/* determine color 'automatically' using 'magic function' which uses the given args
- 					 * of current item index + total items to determine some RGB color
- 					 */
- 					getcolor_fcurve_rainbow(i, items, fcu->color);
- 					break;
- 				}
- 			}
- 		}
- 		
- 		/* free temp list */
- 		ANIM_animdata_freelist(&anim_data);
- 	}
+ 	graph_refresh_fcurve_colors(C);
  }
  
 +/* ************************************* */
 +
 +static void graph_widgets(void)
 +{
 +	/* create the widgetmap for the area here */
 +	WM_widgetmaptype_ensure(&(const struct wmWidgetMapType_Params) {
 +	        "Graph_Canvas", SPACE_IPO, RGN_TYPE_WINDOW, 0});
 +}
 +
  static void graph_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID *new_id)
  {
  	SpaceIpo *sgraph = (SpaceIpo *)slink;




More information about the Bf-blender-cvs mailing list