[Bf-blender-cvs] [531f833491f] greasepencil-object: Cleanup: unused vars & comment block that doesn't run

Campbell Barton noreply at git.blender.org
Sun Jul 1 19:10:07 CEST 2018


Commit: 531f833491f017b1b2212a63877cf4447ee650df
Author: Campbell Barton
Date:   Sun Jul 1 19:09:21 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB531f833491f017b1b2212a63877cf4447ee650df

Cleanup: unused vars & comment block that doesn't run

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

M	source/blender/editors/gpencil/annotate_paint.c
M	source/blender/editors/gpencil/gpencil_paint.c
M	source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c

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

diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c
index 2d532633d55..fb33ed87aca 100644
--- a/source/blender/editors/gpencil/annotate_paint.c
+++ b/source/blender/editors/gpencil/annotate_paint.c
@@ -457,7 +457,9 @@ static short gp_stroke_addpoint(
 			return GP_STROKEADD_NORMAL;
 	}
 	else if (p->paintmode == GP_PAINTMODE_DRAW_POLY) {
+#if 0
 		bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd);
+#endif
 		/* get pointer to destination point */
 		pt = (tGPspoint *)(gpd->runtime.sbuffer);
 
@@ -822,8 +824,6 @@ static bool gp_stroke_eraser_is_occluded(tGPsdata *p, const bGPDspoint *pt, cons
 	    (p->flags & GP_PAINTFLAG_V3D_ERASER_DEPTH))
 	{
 		RegionView3D *rv3d = p->ar->regiondata;
-		bGPDlayer *gpl = p->gpl;
-
 		const int mval[2] = {x, y};
 		float mval_3d[3];
 
@@ -859,7 +859,7 @@ static float gp_stroke_eraser_calc_influence(tGPsdata *p, const int mval[2], con
 /* eraser tool - evaluation per stroke */
 /* TODO: this could really do with some optimization (KD-Tree/BVH?) */
 static void gp_stroke_eraser_dostroke(tGPsdata *p,
-                                      bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps,
+                                      bGPDlayer *UNUSED(gpl), bGPDframe *gpf, bGPDstroke *gps,
                                       const int mval[2], const int mvalo[2],
                                       const int radius, const rcti *rect)
 {
@@ -880,7 +880,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p,
 		/* only process if it hasn't been masked out... */
 		if (!(p->flags & GP_PAINTFLAG_SELECTMASK) || (gps->points->flag & GP_SPOINT_SELECT)) {
 			gp_point_to_xy(&p->gsc, gps, gps->points, &pc1[0], &pc1[1]);
-	
+
 			/* do boundbox check first */
 			if ((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) {
 				/* only check if point is inside */
@@ -2114,7 +2114,6 @@ static void gpencil_move_last_stroke_to_back(bContext *C)
 static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
 {
 	tGPsdata *p = op->customdata;
-	ToolSettings *ts = CTX_data_tool_settings(C);
 	int estate = OPERATOR_PASS_THROUGH; /* default exit state - pass through to support MMB view nav, etc. */
 
 	/* if (event->type == NDOF_MOTION)
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 7b0b9ec0536..997a86d33ec 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -2371,6 +2371,8 @@ static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p)
 {
 	/* header prints */
 	switch (p->status) {
+
+#if 0 /* FIXME, this never runs! */
 		switch (p->paintmode) {
 				case GP_PAINTMODE_DRAW_POLY:
 					/* Provide usage tips, since this is modal, and unintuitive without hints */
@@ -2383,6 +2385,7 @@ static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p)
 					 */
 					break;
 			}
+#endif
 
 		case GP_STATUS_IDLING:
 			/* print status info */
@@ -2414,6 +2417,8 @@ static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p)
 			/* clear status string */
 			ED_workspace_status_text(C, NULL);
 			break;
+		case GP_STATUS_PAINTING:
+			break;
 	}
 }
 
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
index e10b5d605e3..37c8bf0b0f0 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
@@ -105,7 +105,9 @@ static void deformStroke(
 	float shift, vran, vdir;
 	float normal[3];
 	float vec1[3], vec2[3];
+#if 0
 	Scene *scene = DEG_get_evaluated_scene(depsgraph);
+#endif
 	int sc_frame = 0;
 	int sc_diff = 0;
 	int vindex = defgroup_name_index(ob, mmd->vgname);



More information about the Bf-blender-cvs mailing list