[Bf-blender-cvs] [3a13b89296a] blender2.8: Cleanup: unused args, indentation

Campbell Barton noreply at git.blender.org
Tue Nov 20 20:29:50 CET 2018


Commit: 3a13b89296a851027ba4cec34f8c36600cfdd1f2
Author: Campbell Barton
Date:   Wed Nov 21 06:21:58 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB3a13b89296a851027ba4cec34f8c36600cfdd1f2

Cleanup: unused args, indentation

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

M	source/blender/draw/engines/gpencil/gpencil_draw_utils.c
M	source/blender/editors/gpencil/gpencil_utils.c
M	source/blender/editors/interface/interface.c
M	source/blender/editors/interface/interface_handlers.c
M	source/blender/editors/interface/interface_layout.c
M	source/blender/editors/interface/interface_region_color_picker.c
M	source/blender/editors/interface/interface_region_menu_pie.c
M	source/blender/editors/interface/interface_style.c
M	source/blender/editors/interface/interface_templates.c

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 9799ab85cfb..40b6a4e5b2b 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -43,7 +43,7 @@
 #include "DNA_view3d_types.h"
 #include "DNA_gpencil_modifier_types.h"
 
- /* If builtin shaders are needed */
+/* If builtin shaders are needed */
 #include "GPU_shader.h"
 #include "GPU_texture.h"
 
@@ -66,10 +66,10 @@
 #define GP_SET_SRC_GPS(src_gps) if (src_gps) src_gps = src_gps->next
 
 /* Get number of vertex for using in GPU VBOs */
-void gpencil_calc_vertex(
-	GPENCIL_StorageList *stl, tGPencilObjectCache *cache_ob,
-	GpencilBatchCache *cache, bGPdata *gpd,
-	int cfra_eval)
+static void gpencil_calc_vertex(
+        GPENCIL_StorageList *stl, tGPencilObjectCache *cache_ob,
+        GpencilBatchCache *cache, bGPdata *gpd,
+        int cfra_eval)
 {
 	Object *ob = cache_ob->ob;
 	const DRWContextState *draw_ctx = DRW_context_state_get();
@@ -88,14 +88,14 @@ void gpencil_calc_vertex(
 		/* verify time modifiers */
 		if ((time_remap) && (!stl->storage->simplify_modif)) {
 			int remap_cfra = BKE_gpencil_time_modifier(
-				draw_ctx->depsgraph, draw_ctx->scene, ob, gpl, cfra_eval,
-				stl->storage->is_render);
+			        draw_ctx->depsgraph, draw_ctx->scene, ob, gpl, cfra_eval,
+			        stl->storage->is_render);
 			gpf = BKE_gpencil_layer_getframe(gpl, remap_cfra, GP_GETFRAME_USE_PREV);
 		}
 		else {
 			gpf = gpl->actframe;
 		}
-		
+
 		if (gpf == NULL) {
 			continue;
 		}
@@ -581,9 +581,9 @@ static void gpencil_add_fill_vertexdata(
 				/* add to list of groups */
 				if (old_len < cache->b_fill.vbo_len) {
 					cache->grp_cache = gpencil_group_cache_add(
-						cache->grp_cache, gpl, gpf, gps, eGpencilBatchGroupType_Fill, onion,
-						cache->b_fill.vbo_len,
-						&cache->grp_size, &cache->grp_used);
+					        cache->grp_cache, gpl, gpf, gps, eGpencilBatchGroupType_Fill, onion,
+					        cache->b_fill.vbo_len,
+					        &cache->grp_size, &cache->grp_used);
 				}
 			}
 		}
@@ -591,10 +591,11 @@ static void gpencil_add_fill_vertexdata(
 }
 
 /* add stroke vertex info */
-static void gpencil_add_stroke_vertexdata(GpencilBatchCache *cache,
-	Object *ob, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps,
-	const float opacity, const float tintcolor[4], const bool onion,
-	const bool custonion)
+static void gpencil_add_stroke_vertexdata(
+        GpencilBatchCache *cache,
+        Object *ob, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps,
+        const float opacity, const float tintcolor[4], const bool onion,
+        const bool custonion)
 {
 	float tcolor[4];
 	float ink[4];
@@ -632,13 +633,13 @@ static void gpencil_add_stroke_vertexdata(GpencilBatchCache *cache,
 			/* create vertex data */
 			const int old_len = cache->b_stroke.vbo_len;
 			DRW_gpencil_get_stroke_geom(&cache->b_stroke, gps, sthickness, ink);
-			
+
 			/* add to list of groups */
 			if (old_len < cache->b_stroke.vbo_len) {
 				cache->grp_cache = gpencil_group_cache_add(
-					cache->grp_cache, gpl, gpf, gps, eGpencilBatchGroupType_Stroke, onion,
-					cache->b_stroke.vbo_len,
-					&cache->grp_size, &cache->grp_used);
+				        cache->grp_cache, gpl, gpf, gps, eGpencilBatchGroupType_Stroke, onion,
+				        cache->b_stroke.vbo_len,
+				        &cache->grp_size, &cache->grp_used);
 			}
 		}
 		else {
@@ -649,9 +650,9 @@ static void gpencil_add_stroke_vertexdata(GpencilBatchCache *cache,
 			/* add to list of groups */
 			if (old_len < cache->b_point.vbo_len) {
 				cache->grp_cache = gpencil_group_cache_add(
-					cache->grp_cache, gpl, gpf, gps, eGpencilBatchGroupType_Point, onion,
-					cache->b_point.vbo_len,
-					&cache->grp_size, &cache->grp_used);
+				        cache->grp_cache, gpl, gpf, gps, eGpencilBatchGroupType_Point, onion,
+				        cache->b_point.vbo_len,
+				        &cache->grp_size, &cache->grp_used);
 			}
 		}
 	}
@@ -659,7 +660,7 @@ static void gpencil_add_stroke_vertexdata(GpencilBatchCache *cache,
 
 /* add edit points vertex info */
 static void gpencil_add_editpoints_vertexdata(
-        GPENCIL_StorageList *stl, GpencilBatchCache *cache, ToolSettings *UNUSED(ts), Object *ob,
+        GPENCIL_StorageList *UNUSED(stl), GpencilBatchCache *cache, ToolSettings *UNUSED(ts), Object *ob,
         bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps)
 {
 	const DRWContextState *draw_ctx = DRW_context_state_get();
@@ -678,17 +679,17 @@ static void gpencil_add_editpoints_vertexdata(
 
 		if (cache->is_dirty) {
 			if ((obact == ob) &&
-				((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
-				(v3d->gp_flag & V3D_GP_SHOW_EDIT_LINES))
+			    ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
+			    (v3d->gp_flag & V3D_GP_SHOW_EDIT_LINES))
 			{
 				/* line of the original stroke */
 				DRW_gpencil_get_edlin_geom(&cache->b_edlin, gps, edit_alpha, gpd->flag);
 
 				/* add to list of groups */
 				cache->grp_cache = gpencil_group_cache_add(
-					cache->grp_cache, gpl, gpf, gps, eGpencilBatchGroupType_Edlin, false,
-					cache->b_edlin.vbo_len,
-					&cache->grp_size, &cache->grp_used);
+				        cache->grp_cache, gpl, gpf, gps, eGpencilBatchGroupType_Edlin, false,
+				        cache->b_edlin.vbo_len,
+				        &cache->grp_size, &cache->grp_used);
 			}
 			/* edit points */
 			if ((gps->flag & GP_STROKE_SELECT) || (is_weight_paint)) {
@@ -698,9 +699,9 @@ static void gpencil_add_editpoints_vertexdata(
 
 						/* add to list of groups */
 						cache->grp_cache = gpencil_group_cache_add(
-							cache->grp_cache, gpl, gpf, gps, eGpencilBatchGroupType_Edit, false,
-							cache->b_edit.vbo_len,
-							&cache->grp_size, &cache->grp_used);
+						        cache->grp_cache, gpl, gpf, gps, eGpencilBatchGroupType_Edit, false,
+						        cache->b_edit.vbo_len,
+						        &cache->grp_size, &cache->grp_used);
 					}
 				}
 			}
@@ -799,7 +800,7 @@ static void gpencil_draw_strokes(
 
 			/* fill */
 			if ((gp_style->flag & GP_STYLE_FILL_SHOW) &&
-				(!stl->storage->simplify_fill))
+			    (!stl->storage->simplify_fill))
 			{
 				gpencil_add_fill_vertexdata(
 				        cache, ob, gpl, derived_gpf, gps,
@@ -807,11 +808,11 @@ static void gpencil_draw_strokes(
 			}
 			/* stroke */
 			if ((gp_style->flag & GP_STYLE_STROKE_SHOW) &&
-				(gp_style->stroke_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH))
+			    (gp_style->stroke_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH))
 			{
 				gpencil_add_stroke_vertexdata(
-					cache, ob, gpl, derived_gpf, gps,
-					opacity, tintcolor, false, custonion);
+				        cache, ob, gpl, derived_gpf, gps,
+				        opacity, tintcolor, false, custonion);
 			}
 		}
 
@@ -856,9 +857,9 @@ static void gpencil_get_onion_alpha(float color[4], bGPdata *gpd)
 
 /* function to draw strokes for onion only */
 static void gpencil_draw_onion_strokes(
-	GpencilBatchCache *cache, GPENCIL_e_data *e_data, void *vedata, Object *ob,
-	bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf,
-	const float opacity, const float tintcolor[4], const bool custonion)
+        GpencilBatchCache *cache, GPENCIL_e_data *UNUSED(e_data), void *vedata, Object *ob,
+        bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf,
+        const float opacity, const float tintcolor[4], const bool custonion)
 {
 	GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
 	Depsgraph *depsgraph = DRW_context_state_get()->depsgraph;
@@ -886,7 +887,7 @@ static void gpencil_draw_onion_strokes(
 
 		/* stroke */
 		gpencil_add_stroke_vertexdata(
-			cache, ob, gpl, gpf, gps, opacity, tintcolor, true, custonion);
+		        cache, ob, gpl, gpf, gps, opacity, tintcolor, true, custonion);
 
 		stl->storage->shgroup_id++;
 	}
@@ -894,8 +895,8 @@ static void gpencil_draw_onion_strokes(
 
 /* draw onion-skinning for a layer */
 static void gpencil_draw_onionskins(
-	GpencilBatchCache *cache, GPENCIL_e_data *e_data, void *vedata,
-	Object *ob, bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf)
+        GpencilBatchCache *cache, GPENCIL_e_data *e_data, void *vedata,
+        Object *ob, bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf)
 {
 
 	const float default_color[3] = { UNPACK3(U.gpencil_new_layer_col) };
@@ -1029,8 +1030,8 @@ static void gpencil_draw_onionskins(
 		if ((last == gpf->framenum) || (gpf->next == NULL)) {
 			gpencil_get_onion_alpha(color, gpd);
 			gpencil_draw_onion_strokes(
-				cache, e_data, vedata, ob, gpd, gpl,
-				gpf_loop, color[3], color, colflag);
+			        cache, e_data, vedata, ob, gpd, gpl,
+			        gpf_loop, color[3], color, colflag);
 		}
 	}
 }
@@ -1165,11 +1166,11 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, void *vedata, T
 			if (gpd->runtime.sbuffer_size > 1) {
 				if ((gp_style) && (gp_style->mode == GP_STYLE_MODE_LINE)) {
 					stl->g_data->shgrps_drawing_stroke = DRW_gpencil_shgroup_stroke_create(
-						e_data, vedata, psl->drawing_pass, e_data->gpencil_stroke_sh, NULL, gpd, gp_style, -1, false);
+					        e_data, vedata, psl->drawing_pass, e_data->gpencil_stroke_sh, NULL, gpd, gp_style, -1, false);
 				}
 				else {
 					stl->g_data->shgrps_drawing_stroke = DRW_gpencil_shgroup_point_create(
-						e_data, vedata, psl->drawing_pass, e_data->gpencil_point_sh, NULL, gpd, gp_style, -1, false);
+					        e_data, vedata, psl->drawing_pass, e_data->gpencil_point_sh, NULL, gpd, gp_style, -1, false);
 				}
 
 				/* clean previous version of the batch */
@@ -1182,32 +1183,32 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, void *vedata, T
 				/* use unit matrix because the buffer is in screen space and does not need conversion */
 				if (gpd->runtime.mode == GP_STYLE_MODE_LINE) {
 					e_data->batch_buffer_stroke = DRW_gpencil_get_buffer_stroke_geom(
-						gpd, lthick);
+					        gpd, lthick);
 				}
 				else {
 					e_data->batch_buffer_stroke = DRW_gpencil_get_buffer_point_geom(
-						gpd, lthick);
+					        gpd, lthick);
 				}
 
 				if (gp_style->flag & GP_STYLE_STROKE_SHOW) {
 					DRW_shgroup_call_add(
-						stl->g_data->shgrps_drawing_stroke,
-						e_data->batch_buffer_stroke,
-						stl->storage->unit_matrix);
+					        stl->g_dat

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list