[Bf-blender-cvs] [317cb1dd650] master: Cleanup: style, duplicate include

Campbell Barton noreply at git.blender.org
Mon Mar 18 04:26:53 CET 2019


Commit: 317cb1dd6507be3e043e32eb1ddaece509bbbbb5
Author: Campbell Barton
Date:   Mon Mar 18 14:13:06 2019 +1100
Branches: master
https://developer.blender.org/rB317cb1dd6507be3e043e32eb1ddaece509bbbbb5

Cleanup: style, duplicate include

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

M	source/blender/draw/engines/gpencil/gpencil_engine.c
M	source/blender/editors/gpencil/gpencil_edit.c
M	source/blender/editors/gpencil/gpencil_fill.c
M	source/blender/editors/gpencil/gpencil_paint.c
M	source/blender/editors/gpencil/gpencil_primitive.c
M	source/blender/editors/gpencil/gpencil_utils.c
M	source/blender/editors/include/ED_gpencil.h
M	source/blender/imbuf/intern/cineon/cineonlib.c
M	source/blender/makesrna/intern/rna_nodetree.c

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 7fbae5e98ea..bfda7098391 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -628,8 +628,8 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
 		    ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) &&
 		    (v3d->gp_flag & V3D_GP_SHOW_GRID) &&
 		    (ob->type == OB_GPENCIL) && (ob == draw_ctx->obact) &&
-			((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_VIEW) == 0) &&
-			((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) == 0))
+		    ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_VIEW) == 0) &&
+		    ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) == 0))
 		{
 			GPU_BATCH_DISCARD_SAFE(e_data.batch_grid);
 			MEM_SAFE_FREE(e_data.batch_grid);
@@ -649,10 +649,11 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
 				case GP_LOCKAXIS_CURSOR:
 				{
 					float scale[3] = { 1.0f, 1.0f, 1.0f };
-					loc_eul_size_to_mat4(stl->storage->grid_matrix,
-										cursor->location,
-										cursor->rotation_euler,
-										scale);
+					loc_eul_size_to_mat4(
+					        stl->storage->grid_matrix,
+					        cursor->location,
+					        cursor->rotation_euler,
+					        scale);
 					break;
 				}
 				default:
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index f14ba3b4f27..e45fedd12e4 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -3337,7 +3337,7 @@ static int gp_strokes_reproject_exec(bContext *C, wmOperator *op)
 
 				/* Project stroke in one axis */
 				if (ELEM(mode, GP_REPROJECT_FRONT, GP_REPROJECT_SIDE,
-							   GP_REPROJECT_TOP, GP_REPROJECT_CURSOR))
+				         GP_REPROJECT_TOP, GP_REPROJECT_CURSOR))
 				{
 					if (mode != GP_REPROJECT_CURSOR) {
 						ED_gp_get_drawing_reference(
@@ -3378,8 +3378,8 @@ static int gp_strokes_reproject_exec(bContext *C, wmOperator *op)
 					}
 
 					ED_gp_project_point_to_plane(
-							scene, ob, rv3d, origin,
-							axis, &pt2);
+					        scene, ob, rv3d, origin,
+					        axis, &pt2);
 
 					copy_v3_v3(&pt->x, &pt2.x);
 
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 32833250d49..c8c57c8ffbf 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -291,8 +291,8 @@ static void gp_draw_datablock(tGPDfill *tgpf, const float ink[4])
 
 			/* normal strokes */
 			if (((tgpf->fill_draw_mode == GP_FILL_DMODE_STROKE) ||
-			    (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH)) &&
-				!textured_stroke)
+			     (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH)) &&
+			    !textured_stroke)
 			{
 				ED_gp_draw_fill(&tgpw);
 			}
@@ -300,7 +300,7 @@ static void gp_draw_datablock(tGPDfill *tgpf, const float ink[4])
 			/* 3D Lines with basic shapes and invisible lines */
 			if ((tgpf->fill_draw_mode == GP_FILL_DMODE_CONTROL) ||
 			    (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH) ||
-				textured_stroke)
+			    textured_stroke)
 			{
 				gp_draw_basic_stroke(
 				        tgpf, gps, tgpw.diff_mat, gps->flag & GP_STROKE_CYCLIC, ink,
@@ -321,7 +321,7 @@ static bool gp_render_offscreen(tGPDfill *tgpf)
 	if (!tgpf->gpd) {
 		return false;
 	}
-	
+
 	/* set temporary new size */
 	tgpf->bwinx = tgpf->ar->winx;
 	tgpf->bwiny = tgpf->ar->winy;
@@ -348,7 +348,7 @@ static bool gp_render_offscreen(tGPDfill *tgpf)
 	char err_out[256] = "unknown";
 	GPUOffScreen *offscreen = GPU_offscreen_create(tgpf->sizex, tgpf->sizey, 0, true, false, err_out);
 	if (offscreen == NULL) {
-		printf("GPencil - Fill - Unable to create fill buffer\n"); 
+		printf("GPencil - Fill - Unable to create fill buffer\n");
 		return false;
 	}
 
@@ -589,7 +589,7 @@ static void gpencil_boundaryfill_area(tGPDfill *tgpf)
 	 */
 	while (!BLI_stack_is_empty(stack)) {
 		int v;
-		
+
 		BLI_stack_pop(stack, &v);
 
 		get_pixel(ibuf, v, rgba);
@@ -1213,8 +1213,8 @@ static tGPDfill *gp_session_init_fill(bContext *C, wmOperator *UNUSED(op))
 	tgpf->fill_threshold = brush->gpencil_settings->fill_threshold;
 	tgpf->fill_simplylvl = brush->gpencil_settings->fill_simplylvl;
 	tgpf->fill_draw_mode = brush->gpencil_settings->fill_draw_mode;
-	tgpf->fill_factor = (short)max_ii(1, min_ii((int)brush->gpencil_settings->fill_factor,8));
-	
+	tgpf->fill_factor = (short)max_ii(1, min_ii((int)brush->gpencil_settings->fill_factor, 8));
+
 	/* get color info */
 	Material *ma = BKE_gpencil_get_material_from_brush(brush);
 	/* if no brush defaults, get material and color info */
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 40f0c0e7b84..24dcf7d4fb4 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -399,8 +399,8 @@ static void gp_reproject_toplane(tGPsdata *p, bGPDstroke *gps)
 	/* get drawing origin */
 	gp_get_3d_reference(p, origin);
 	ED_gp_project_stroke_to_plane(
-								p->scene, obact, rv3d, gps,
-								origin, p->lock_axis - 1);
+	        p->scene, obact, rv3d, gps,
+	        origin, p->lock_axis - 1);
 }
 
 /* convert screen-coordinates to buffer-coordinates */
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index 962442824f9..9c4836c5d33 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -930,13 +930,15 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
 			        ts->gpencil_v3d_align, origin);
 			/* reproject current */
 			ED_gpencil_tpoint_to_point(tgpi->ar, origin, tpt, &spt);
-			ED_gp_project_point_to_plane(tgpi->scene, tgpi->ob, tgpi->rv3d,
-										origin, tgpi->lock_axis - 1, &spt);
+			ED_gp_project_point_to_plane(
+			        tgpi->scene, tgpi->ob, tgpi->rv3d,
+			        origin, tgpi->lock_axis - 1, &spt);
 
 			/* reproject previous */
 			ED_gpencil_tpoint_to_point(tgpi->ar, origin, tptb, &spt2);
-			ED_gp_project_point_to_plane(tgpi->scene, tgpi->ob, tgpi->rv3d,
-										origin, tgpi->lock_axis - 1, &spt2);
+			ED_gp_project_point_to_plane(
+			        tgpi->scene, tgpi->ob, tgpi->rv3d,
+			        origin, tgpi->lock_axis - 1, &spt2);
 			tgpi->totpixlen += len_v3v3(&spt.x, &spt2.x) / pixsize;
 			tpt->uv_fac = tgpi->totpixlen;
 			if ((gp_style) && (gp_style->sima)) {
@@ -995,8 +997,8 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
 		        tgpi->scene, tgpi->ob, tgpi->gpl,
 		        ts->gpencil_v3d_align, origin);
 		ED_gp_project_stroke_to_plane(
-				tgpi->scene, tgpi->ob, tgpi->rv3d, gps,
-				origin, ts->gp_sculpt.lock_axis - 1);
+		        tgpi->scene, tgpi->ob, tgpi->rv3d, gps,
+		        origin, ts->gp_sculpt.lock_axis - 1);
 	}
 
 	/* if parented change position relative to parent object */
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 1605353a156..39c679e4125 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -937,9 +937,9 @@ void ED_gpencil_project_stroke_to_view(bContext *C, bGPDlayer *gpl, bGPDstroke *
  * Reproject all points of the stroke to a plane locked to axis to avoid stroke offset
  */
 void ED_gp_project_stroke_to_plane(
-		const Scene *scene, const Object *ob,
-		const RegionView3D *rv3d, bGPDstroke *gps,
-		const float origin[3], const int axis)
+        const Scene *scene, const Object *ob,
+        const RegionView3D *rv3d, bGPDstroke *gps,
+        const float origin[3], const int axis)
 {
 	const ToolSettings *ts = scene->toolsettings;
 	const View3DCursor *cursor = &scene->cursor;
@@ -1012,9 +1012,9 @@ void ED_gp_project_stroke_to_plane(
  * \param[in, out] pt : Point to affect
  */
 void ED_gp_project_point_to_plane(
-		const Scene *scene, const Object *ob,
-		const RegionView3D *rv3d, const float origin[3],
-		const int axis, bGPDspoint *pt)
+        const Scene *scene, const Object *ob,
+        const RegionView3D *rv3d, const float origin[3],
+        const int axis, bGPDspoint *pt)
 {
 	const ToolSettings *ts = scene->toolsettings;
 	const View3DCursor *cursor = &scene->cursor;
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index fdbb8556891..5d943930522 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -225,11 +225,11 @@ void ED_gpencil_add_defaults(struct bContext *C, struct Object *ob);
 void ED_gpencil_setup_modes(struct bContext *C, struct bGPdata *gpd, int newmode);
 
 void ED_gp_project_stroke_to_plane(
-		const struct Scene *scene,
+        const struct Scene *scene,
         const struct Object *ob, const struct RegionView3D *rv3d,
         struct bGPDstroke *gps, const float origin[3], const int axis);
 void ED_gp_project_point_to_plane(
-		const struct Scene *scene,
+        const struct Scene *scene,
         const struct Object *ob, const struct RegionView3D *rv3d,
         const float origin[3], const int axis, struct bGPDspoint *pt);
 void ED_gp_get_drawing_reference(
diff --git a/source/blender/imbuf/intern/cineon/cineonlib.c b/source/blender/imbuf/intern/cineon/cineonlib.c
index b3e08ba294b..14389a566fd 100644
--- a/source/blender/imbuf/intern/cineon/cineonlib.c
+++ b/source/blender/imbuf/intern/cineon/cineonlib.c
@@ -182,8 +182,10 @@ LogImageFile *cineonOpen(const unsigned char *byteStuff, int fromMemory, size_t
 		if (verbose) printf("Cineon: File is LSB.\n");
 	}
 	else {
-		if (verbose) printf("Cineon: Bad magic number %lu in \"%s\".\n",
-		                    (unsigned long)header.fileHeader.magic_num, byteStuff);
+		if (verbose) {
+			printf("Cineon: Bad magic number %lu in \"%s\".\n",
+			       (unsigned long)header.fileHeader.magic_num, byteStuff);
+		}
 		logImageClose(cineon);
 		return NULL;
 	}
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 591cabac98f..248a1486d48 100

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list