[Bf-blender-cvs] [fa937dc] temp-ui-refactor: cleanup after ui batch replace

Campbell Barton noreply at git.blender.org
Sun Nov 9 22:56:29 CET 2014


Commit: fa937dc652e9aaa8074524dcc83f1825d5eed586
Author: Campbell Barton
Date:   Sun Nov 9 22:42:46 2014 +0100
Branches: temp-ui-refactor
https://developer.blender.org/rBfa937dc652e9aaa8074524dcc83f1825d5eed586

cleanup after ui batch replace

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

M	source/blender/editors/animation/anim_channels_defines.c
M	source/blender/editors/animation/anim_filter.c
M	source/blender/editors/armature/editarmature_retarget.c
M	source/blender/editors/gpencil/gpencil_paint.c
M	source/blender/editors/include/UI_icons.h
M	source/blender/editors/include/UI_interface.h
M	source/blender/editors/include/UI_resources.h
M	source/blender/editors/interface/interface.c
M	source/blender/editors/interface/interface_draw.c
M	source/blender/editors/interface/interface_templates.c
M	source/blender/editors/interface/resources.c
M	source/blender/editors/object/object_relations.c
M	source/blender/editors/object/object_select.c
M	source/blender/editors/space_api/spacetypes.c
M	source/blender/editors/space_clip/tracking_select.c
M	source/blender/editors/space_nla/nla_edit.c
M	source/blender/editors/space_node/node_draw.c
M	source/blender/editors/space_node/node_select.c
M	source/blender/editors/space_outliner/outliner_draw.c
M	source/blender/editors/space_outliner/outliner_tools.c
M	source/blender/editors/space_sequencer/sequencer_edit.c
M	source/blender/editors/space_view3d/drawmesh.c
M	source/blender/editors/space_view3d/drawvolume.c
M	source/blender/editors/space_view3d/view3d_ruler.c
M	source/blender/editors/transform/transform_generics.c
M	source/blender/windowmanager/intern/wm_cursors.c

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

diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 4d93a7c..ef71d9c 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -2999,7 +2999,7 @@ static void acf_nlaaction_backdrop(bAnimContext *ac, bAnimListElem *ale, float y
 	nla_action_get_color(adt, (bAction *)ale->data, color);
 	
 	if (adt && (adt->flag & ADT_NLA_EDIT_ON)) {
-		/* Yes, the color vector has 4 components, UI_BTYPE_BUT we only want to be using 3 of them! */
+		/* Yes, the color vector has 4 components, BUT we only want to be using 3 of them! */
 		glColor3fv(color);
 	}
 	else {
@@ -3590,7 +3590,7 @@ static void achannel_nlatrack_solo_widget_cb(bContext *C, void *adt_poin, void *
 	/* Toggle 'solo' mode. There are several complications here which need explaining:
 	 * - The method call is needed to perform a few additional validation operations
 	 *   to ensure that the mode is applied properly
-	 * - UI_BTYPE_BUT, since the button already toggles the value, we need to un-toggle it
+	 * - BUT, since the button already toggles the value, we need to un-toggle it
 	 *   before the API call gets to it, otherwise it will end up clearing the result
 	 *   again!
 	 */
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index df3b2fe..cedaea7 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -370,7 +370,7 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
  *	   dealt with by the recursive detection idiom in place.
  *
  * Implementation Note:
- *  YES the _doSubChannels variable is NOT read anywhere. UI_BTYPE_BUT, this is NOT an excuse
+ *  YES the _doSubChannels variable is NOT read anywhere. BUT, this is NOT an excuse
  *  to go steamrolling the logic into a single-line expression as from experience,
  *  those are notoriously difficult to read + debug when extending later on. The code
  *  below is purposefully laid out so that each case noted above corresponds clearly to
@@ -1005,7 +1005,7 @@ static bool fcurve_has_errors(FCurve *fcu)
 		DriverVar *dvar;
 		
 		/* error flag on driver usually means that there is an error
-		 * UI_BTYPE_BUT this may not hold with PyDrivers as this flag gets cleared
+		 * BUT this may not hold with PyDrivers as this flag gets cleared
 		 *     if no critical errors prevent the driver from working...
 		 */
 		if (driver->flag & DRIVER_FLAG_INVALID)
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 55fadb8..647b640 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -1522,7 +1522,7 @@ static void finalizeControl(RigGraph *rigg, RigControl *ctrl, float resize)
 		RigControl *ctrl_child;
 
 #if 0		
-		printf("CTRL: %s UI_BTYPE_LINK: %s", ctrl->bone->name, ctrl->link->name);
+		printf("CTRL: %s LINK: %s", ctrl->bone->name, ctrl->link->name);
 		
 		if (ctrl->link_tail)
 		{
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index f908a5d..7c1976d 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1899,7 +1899,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
 			int sketch = 0;
 			
 			/* basically, this should be mouse-button up = end stroke 
-			 * UI_BTYPE_BUT what happens next depends on whether we 'painting sessions' is enabled
+			 * BUT what happens next depends on whether we 'painting sessions' is enabled
 			 */
 			sketch |= GPENCIL_SKETCH_SESSIONS_ON(p->scene);
 			/* polyline drawing is also 'sketching' -- all knots should be added during one session */
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index 65e1d94..618fa44 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -49,7 +49,7 @@ DEF_ICON(RADIOBUT_OFF)
 DEF_ICON(RADIOBUT_ON)
 DEF_ICON(MENU_PANEL)
 DEF_ICON(BLENDER)
-DEF_ICON(UI_BTYPE_GRIP)
+DEF_ICON(GRIP)
 DEF_ICON(DOT)
 DEF_ICON(COLLAPSEMENU)
 DEF_ICON(X)
@@ -86,14 +86,14 @@ DEF_ICON(RIGHTARROW)
 DEF_ICON(DOWNARROW_HLT)
 DEF_ICON(DOTSUP)
 DEF_ICON(DOTSDOWN)
-DEF_ICON(UI_BTYPE_LINK)
-DEF_ICON(UI_BTYPE_INLINK)
+DEF_ICON(LINK)
+DEF_ICON(INLINK)
 DEF_ICON(PLUGIN)
 	
 	/* various ui */
 DEF_ICON(HELP)
 DEF_ICON(GHOST_ENABLED)
-DEF_ICON(UI_BTYPE_COLOR)  /* see COLOR_RED/GREEN/BLUE */
+DEF_ICON(COLOR)  /* see COLOR_RED/GREEN/BLUE */
 DEF_ICON(LINKED)
 DEF_ICON(UNLINKED)
 DEF_ICON(HAND)
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index a96fb30..9d2df1e 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -307,7 +307,7 @@ void UI_draw_roundbox_unfilled(float minx, float miny, float maxx, float maxy, f
 void UI_draw_box_shadow(unsigned char alpha, float minx, float miny, float maxx, float maxy);
 void UI_draw_roundbox_gl_mode(int mode, float minx, float miny, float maxx, float maxy, float rad);
 void UI_draw_roundbox_shade_x(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadetop, float shadedown);
-void UI_draw_roundbox_share_y(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadeLeft, float shadeRight);
+void UI_draw_roundbox_shade_y(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadeLeft, float shadeRight);
 
 /* state for scrolldrawing */
 #define UI_SCROLL_PRESSED       (1 << 0)
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index 2279b5a..8e37e87 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -1,5 +1,5 @@
 /*
- * ***** BEGIN GPL/BL DUAL LICENSE UI_BTYPE_BLOCK *****
+ * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -22,7 +22,7 @@
  *
  * Contributor(s): none yet.
  * 
- * ***** END GPL/BL DUAL LICENSE UI_BTYPE_BLOCK *****
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
  */
 
 /** \file UI_resources.h
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index e13157a..8fb674c 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -341,8 +341,9 @@ static void ui_block_bounds_calc_centered_pie(uiBlock *block)
 	ui_block_bounds_calc(block);
 }
 
-static void ui_block_bounds_calc_popup(wmWindow *window, uiBlock *block,
-                                  eBlockBoundsCalc bounds_calc, const int xy[2])
+static void ui_block_bounds_calc_popup(
+        wmWindow *window, uiBlock *block,
+        eBlockBoundsCalc bounds_calc, const int xy[2])
 {
 	int startx, starty, endx, endy, width, height, oldwidth, oldheight;
 	int oldbounds, xmax, ymax;
@@ -475,7 +476,7 @@ static int ui_but_calc_float_precision(uiBut *but, double value)
 	return UI_calc_float_precision(prec, value);
 }
 
-/* ************** UI_BTYPE_LINK LINE DRAWING  ************* */
+/* ************** LINK LINE DRAWING  ************* */
 
 /* link line drawing is not part of buttons or theme.. so we stick with it here */
 
@@ -555,7 +556,7 @@ static void ui_draw_links(uiBlock *block)
 	}
 }
 
-/* ************** UI_BTYPE_BLOCK ENDING FUNCTION ************* */
+/* ************** BLOCK ENDING FUNCTION ************* */
 
 /* NOTE: if but->poin is allocated memory for every defbut, things fail... */
 static bool ui_but_equals_old(const uiBut *but, const uiBut *oldbut)
@@ -1265,7 +1266,7 @@ void UI_block_end(const bContext *C, uiBlock *block)
 	UI_block_end_ex(C, block, &window->eventstate->x);
 }
 
-/* ************** UI_BTYPE_BLOCK DRAWING FUNCTION ************* */
+/* ************** BLOCK DRAWING FUNCTION ************* */
 
 void ui_fontscale(short *points, float aspect)
 {
@@ -2591,7 +2592,7 @@ void ui_but_update(uiBut *but)
 		case UI_BTYPE_SCROLL:
 		case UI_BTYPE_NUM_SLIDER:
 			UI_GET_BUT_VALUE_INIT(but, value);
-			if (value < (double)but->hardmin) ui_but_value_set(but, but->hardmin);
+			if      (value < (double)but->hardmin) ui_but_value_set(but, but->hardmin);
 			else if (value > (double)but->hardmax) ui_but_value_set(but, but->hardmax);
 			break;
 			
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index bbe7a35..4dd952f 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -152,7 +152,9 @@ static void round_box_shade_col(const float col1[3], float const col2[3], const
 
 /* linear horizontal shade within button or in outline */
 /* view2d scrollers use it */
-void UI_draw_roundbox_shade_x(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadetop, float shadedown)
+void UI_draw_roundbox_shade_x(
+        int mode, float minx, float miny, float maxx, float maxy,
+        float rad, float shadetop, float shadedown)
 {
 	float vec[7][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293},
 	                   {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}};
@@ -260,8 +262,9 @@ void UI_draw_roundbox_shade_x(int mode, float minx, float miny, float maxx, floa
 
 /* linear vertical shade within button or in outline */
 /* view2d scrollers use it */
-void UI_draw_roundbox_share_y(int mode, float minx, float miny, float maxx, float maxy,
-                            float rad, float shadeLeft, float shadeRight)
+void UI_draw_roundbox_shade_y(
+        int mode, float minx, float miny, float maxx, float maxy,
+        float rad, float shadeLeft, float shadeRight)
 {
 	float vec[7][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293},
 	                   {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}};
diff --git a/sourc

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list