[Bf-blender-cvs] [d121071a0fc] greasepencil-object: GP: Cleanup unused variable

Antonioya noreply at git.blender.org
Fri Nov 23 17:01:48 CET 2018


Commit: d121071a0fc02b7d5d677904c1d427f757276ec9
Author: Antonioya
Date:   Fri Nov 23 17:01:38 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBd121071a0fc02b7d5d677904c1d427f757276ec9

GP: Cleanup unused variable

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

M	source/blender/draw/engines/gpencil/gpencil_cache_utils.c
M	source/blender/draw/engines/gpencil/gpencil_draw_utils.c
M	source/blender/draw/engines/gpencil/gpencil_engine.h

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
index 91553681ae2..5478c4a60b9 100644
--- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
@@ -124,7 +124,7 @@ tGPencilObjectCache *gpencil_object_cache_add(
 
 /* add a shading group to the cache to create later */
 GpencilBatchGroup *gpencil_group_cache_add(
-	GpencilBatchGroup *cache_array, bGPdata *gpd,
+	GpencilBatchGroup *cache_array,
 	bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps,
 	const short type, const bool onion,
 	const int vertex_idx,
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index ad54f0cc113..4fa6c11ab03 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -554,7 +554,6 @@ static void gpencil_add_fill_vertexdata(
         float opacity, const float tintcolor[4], const bool onion, const bool custonion)
 {
 	MaterialGPencilStyle *gp_style = BKE_material_gpencil_settings_get(ob, gps->mat_nr + 1);
-	bGPdata *gpd = (bGPdata *)ob->data;
 
 	if (gps->totpoints >= 3) {
 		float tfill[4];
@@ -583,7 +582,7 @@ 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, gpd, gpl, gpf, gps,
+					        cache->grp_cache, gpl, gpf, gps,
 							eGpencilBatchGroupType_Fill, onion,
 					        cache->b_fill.vbo_len,
 					        &cache->grp_size, &cache->grp_used);
@@ -604,7 +603,6 @@ static void gpencil_add_stroke_vertexdata(
 	float ink[4];
 	short sthickness;
 	MaterialGPencilStyle *gp_style = BKE_material_gpencil_settings_get(ob, gps->mat_nr + 1);
-	bGPdata *gpd = (bGPdata *)ob->data;
 
 	/* set color using base color, tint color and opacity */
 	if (cache->is_dirty) {
@@ -641,7 +639,7 @@ static void gpencil_add_stroke_vertexdata(
 			/* add to list of groups */
 			if (old_len < cache->b_stroke.vbo_len) {
 				cache->grp_cache = gpencil_group_cache_add(
-				        cache->grp_cache, gpd, gpl, gpf, gps,
+				        cache->grp_cache, gpl, gpf, gps,
 						eGpencilBatchGroupType_Stroke, onion,
 				        cache->b_stroke.vbo_len,
 				        &cache->grp_size, &cache->grp_used);
@@ -655,7 +653,7 @@ static void gpencil_add_stroke_vertexdata(
 			/* add to list of groups */
 			if (old_len < cache->b_point.vbo_len) {
 				cache->grp_cache = gpencil_group_cache_add(
-				        cache->grp_cache, gpd, gpl, gpf, gps, eGpencilBatchGroupType_Point, onion,
+				        cache->grp_cache, gpl, gpf, gps, eGpencilBatchGroupType_Point, onion,
 				        cache->b_point.vbo_len,
 				        &cache->grp_size, &cache->grp_used);
 			}
@@ -692,7 +690,7 @@ static void gpencil_add_editpoints_vertexdata(
 
 				/* add to list of groups */
 				cache->grp_cache = gpencil_group_cache_add(
-				        cache->grp_cache, gpd, gpl, gpf, gps,
+				        cache->grp_cache, gpl, gpf, gps,
 						eGpencilBatchGroupType_Edlin, false,
 				        cache->b_edlin.vbo_len,
 				        &cache->grp_size, &cache->grp_used);
@@ -705,7 +703,7 @@ static void gpencil_add_editpoints_vertexdata(
 
 						/* add to list of groups */
 						cache->grp_cache = gpencil_group_cache_add(
-						        cache->grp_cache,gpd, gpl, gpf, gps,
+						        cache->grp_cache, gpl, gpf, gps,
 								eGpencilBatchGroupType_Edit, false,
 						        cache->b_edit.vbo_len,
 						        &cache->grp_size, &cache->grp_used);
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h
index 6514a6a0278..9bc6f26174d 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.h
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.h
@@ -381,7 +381,7 @@ struct tGPencilObjectCache *gpencil_object_cache_add(
 
 /* shading groups cache functions */
 struct GpencilBatchGroup *gpencil_group_cache_add(
-	struct GpencilBatchGroup *cache_array, struct bGPdata *gpd,
+	struct GpencilBatchGroup *cache_array,
 	struct bGPDlayer *gpl, struct bGPDframe *gpf, struct bGPDstroke *gps,
 	const short type, const bool onion,
 	const int vertex_idx,



More information about the Bf-blender-cvs mailing list