[Bf-blender-cvs] [346699bc9fe] greasepencil-object: Cleanup - Remove unused var

Joshua Leung noreply at git.blender.org
Sat Nov 4 05:47:49 CET 2017


Commit: 346699bc9fed56be7919b425ddf5f41729419369
Author: Joshua Leung
Date:   Mon Oct 30 01:59:07 2017 +1300
Branches: greasepencil-object
https://developer.blender.org/rB346699bc9fed56be7919b425ddf5f41729419369

Cleanup - Remove unused var

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

M	source/blender/draw/engines/gpencil/gpencil_geom.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

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_geom.c b/source/blender/draw/engines/gpencil/gpencil_geom.c
index f374f040102..de1c487f3ee 100644
--- a/source/blender/draw/engines/gpencil/gpencil_geom.c
+++ b/source/blender/draw/engines/gpencil/gpencil_geom.c
@@ -237,7 +237,7 @@ Gwn_Batch *DRW_gpencil_get_buffer_stroke_geom(bGPdata *gpd, float matrix[4][4],
 	/* get origin to reproject point */
 	float origin[3];
 	bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd);
-	ED_gp_get_drawing_reference(ts, v3d, scene, ob, gpl, ts->gpencil_v3d_align, origin);
+	ED_gp_get_drawing_reference(v3d, scene, ob, gpl, ts->gpencil_v3d_align, origin);
 
 	for (int i = 0; i < totpoints; i++, tpt++) {
 		gpencil_tpoint_to_point(scene, ar, v3d, tpt, &pt);
@@ -292,7 +292,7 @@ Gwn_Batch *DRW_gpencil_get_buffer_point_geom(bGPdata *gpd, float matrix[4][4], s
 	/* get origin to reproject point */
 	float origin[3];
 	bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd);
-	ED_gp_get_drawing_reference(ts, v3d, scene, ob, gpl, ts->gpencil_v3d_align, origin);
+	ED_gp_get_drawing_reference(v3d, scene, ob, gpl, ts->gpencil_v3d_align, origin);
 
 	for (int i = 0; i < totpoints; i++, tpt++) {
 		gpencil_tpoint_to_point(scene, ar, v3d, tpt, &pt);
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 01ffc24fc9b..48766f8846b 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -265,12 +265,11 @@ static bool gpencil_project_check(tGPsdata *p)
 static void gp_get_3d_reference(tGPsdata *p, float vec[3])
 {
 	View3D *v3d = p->sa->spacedata.first;
-	ToolSettings *ts = p->scene->toolsettings;
 	Object *ob = NULL;
 	if (p->ownerPtr.type == &RNA_Object) {
 		ob = (Object *)p->ownerPtr.data;
 	}
-	ED_gp_get_drawing_reference(ts, v3d, p->scene, ob, p->gpl, *p->align_flag, vec);
+	ED_gp_get_drawing_reference(v3d, p->scene, ob, p->gpl, *p->align_flag, vec);
 }
 
 /* Stroke Editing ---------------------------- */
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index 8609084a888..965bac3904d 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -288,7 +288,7 @@ static void gp_primitive_rectangle(tGPDprimitive *tgpi, bGPDstroke *gps)
 	if (tgpi->lock_axis > GP_LOCKAXIS_NONE) {
 		float origin[3];
 		bGPDspoint *tpt = gps->points;
-		ED_gp_get_drawing_reference(ts, tgpi->v3d, tgpi->scene, tgpi->ob, tgpi->gpl, 
+		ED_gp_get_drawing_reference(tgpi->v3d, tgpi->scene, tgpi->ob, tgpi->gpl, 
 			                        ts->gpencil_v3d_align, origin);
 
 		for (int i = 0; i < gps->totpoints; i++, tpt++) {
@@ -344,13 +344,13 @@ static void gp_primitive_circle(tGPDprimitive *tgpi, bGPDstroke *gps)
 	if (tgpi->lock_axis > GP_LOCKAXIS_NONE) {
 		float origin[3];
 		bGPDspoint *tpt = gps->points;
-		ED_gp_get_drawing_reference(ts, tgpi->v3d, tgpi->scene, tgpi->ob, tgpi->gpl,
-			ts->gpencil_v3d_align, origin);
+		ED_gp_get_drawing_reference(tgpi->v3d, tgpi->scene, tgpi->ob, tgpi->gpl,
+		                            ts->gpencil_v3d_align, origin);
 
 		for (int i = 0; i < gps->totpoints; i++, tpt++) {
 			ED_gp_project_point_to_plane(tgpi->ob, tgpi->rv3d, origin,
-				ts->gp_sculpt.lock_axis - 1,
-				ts->gpencil_src, tpt);
+			                             ts->gp_sculpt.lock_axis - 1,
+			                             ts->gpencil_src, tpt);
 		}
 	}
 
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 1039dc07d7f..abf0ea8e86e 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -1260,7 +1260,7 @@ void ED_gp_project_point_to_plane(Object *ob, RegionView3D *rv3d, const float or
 
 /* get drawing reference for conversion or projection of the stroke */
 // FIXME: Remove ts arg
-void ED_gp_get_drawing_reference(ToolSettings *UNUSED(ts), View3D *v3d, Scene *scene, Object *ob, bGPDlayer *gpl, char align_flag, float vec[3])
+void ED_gp_get_drawing_reference(View3D *v3d, Scene *scene, Object *ob, bGPDlayer *gpl, char align_flag, float vec[3])
 {
 	const float *fp = ED_view3d_cursor3d_get(scene, v3d);
 
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 11e18c9026c..f83ca04d8a8 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -251,7 +251,7 @@ void ED_gpencil_add_to_cache(struct tGPencilSort *cache, struct RegionView3D *rv
 
 void ED_gp_project_stroke_to_plane(struct Object *ob, struct RegionView3D *rv3d, struct bGPDstroke *gps, const float origin[3], const int axis, char type);
 void ED_gp_project_point_to_plane(struct Object *ob, struct RegionView3D *rv3d, const float origin[3], const int axis, char type, struct bGPDspoint *pt);
-void ED_gp_get_drawing_reference(struct ToolSettings *ts, struct View3D *v3d, struct Scene *scene, struct Object *ob, struct bGPDlayer *gpl, char align_flag, float vec[3]);
+void ED_gp_get_drawing_reference(struct View3D *v3d, struct Scene *scene, struct Object *ob, struct bGPDlayer *gpl, char align_flag, float vec[3]);
 
 /* set sculpt cursor */
 void ED_gpencil_toggle_brush_cursor(struct bContext *C, bool enable);



More information about the Bf-blender-cvs mailing list