[Bf-blender-cvs] [71fa7dbda97] greasepencil-object: Cleanup: Rename field

Antonio Vazquez noreply at git.blender.org
Sat Jun 24 12:10:22 CEST 2017


Commit: 71fa7dbda973f3839fe776f677f5de80bb194eb8
Author: Antonio Vazquez
Date:   Sat Jun 24 11:28:07 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB71fa7dbda973f3839fe776f677f5de80bb194eb8

Cleanup: Rename field

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

M	source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
M	source/blender/draw/engines/gpencil/gpencil_engine.c
M	source/blender/draw/engines/gpencil/gpencil_engine.h

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index 909b31e31c5..50354161091 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -449,24 +449,24 @@ static void gpencil_draw_strokes(GpencilBatchCache *cache, GPENCIL_e_data *e_dat
 			continue;
 		}
 		/* limit the number of shading groups */
-		if (stl->storage->pal_id >= GPENCIL_MAX_SHGROUPS) {
+		if (stl->storage->shgroup_id >= GPENCIL_MAX_SHGROUPS) {
 			continue;
 		}
 #if 0   /* if we use the reallocate the shading group is doing weird thing, so disable while find a solution 
 		   and allocate the max size on cache_init */
 		/* realloc memory */
 		GPENCIL_shgroup *p = NULL;
-		int size = stl->storage->pal_id + 1;
+		int size = stl->storage->shgroup_id + 1;
 		p = MEM_recallocN(stl->shgroups, sizeof(struct GPENCIL_shgroup) * size);
 		if (p != NULL) {
 			stl->shgroups = p;
 		}
 #endif
 		if (gps->totpoints > 1) {
-			int id = stl->storage->pal_id;
+			int id = stl->storage->shgroup_id;
 			stl->shgroups[id].shgrps_fill = DRW_gpencil_shgroup_fill_create(e_data, vedata, psl->stroke_pass, e_data->gpencil_fill_sh, ob, gpd, gps->palcolor, id);
 			stl->shgroups[id].shgrps_stroke = DRW_gpencil_shgroup_stroke_create(vedata, psl->stroke_pass, e_data->gpencil_stroke_sh, ob, gpd, id);
-			++stl->storage->pal_id;
+			++stl->storage->shgroup_id;
 
 			fillgrp = stl->shgroups[id].shgrps_fill;
 			strokegrp = stl->shgroups[id].shgrps_stroke;
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 1f9131fecc3..1a2d3895cfa 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -147,7 +147,7 @@ static void GPENCIL_cache_init(void *vedata)
 	{
 		/* Stroke pass */
 		psl->stroke_pass = DRW_pass_create("Gpencil Stroke Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS | DRW_STATE_BLEND);
-		stl->storage->pal_id = 0;
+		stl->storage->shgroup_id = 0;
 		stl->g_data->shgrps_point_volumetric = DRW_gpencil_shgroup_point_volumetric_create(psl->stroke_pass, e_data.gpencil_volumetric_sh);
 
 		/* edit pass */
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h
index 29193c7f443..633d34c1a70 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.h
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.h
@@ -54,7 +54,7 @@ typedef struct GPENCIL_shgroup {
 } GPENCIL_shgroup;
 
 typedef struct GPENCIL_Storage {
-	int pal_id; /* total elements */
+	int shgroup_id; /* total elements */
 	float unit_matrix[4][4];
 	int xray;
 	int keep_size;




More information about the Bf-blender-cvs mailing list