[Bf-blender-cvs] [230d089a300] greasepencil-object: Cleanup: Improve debug messages

Antonio Vazquez noreply at git.blender.org
Tue Jun 27 17:43:32 CEST 2017


Commit: 230d089a30006f37cfa9df8471fa3f39dc22bee4
Author: Antonio Vazquez
Date:   Tue Jun 27 17:43:21 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB230d089a30006f37cfa9df8471fa3f39dc22bee4

Cleanup: Improve debug messages

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

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

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

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 912789ab958..a3d86ce8320 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -132,7 +132,7 @@ static void gpencil_batch_cache_check_free_slots(bGPdata *gpd)
 static void gpencil_batch_cache_init(bGPdata *gpd, int cfra)
 {
 	if (G.debug_value == 668) {
-		printf("gpencil_batch_cache_init for %s\n", gpd->id.name);
+		printf("gpencil_batch_cache_init: %s\n", gpd->id.name);
 	}
 	GpencilBatchCache *cache = gpd->batch_cache;
 
@@ -167,7 +167,7 @@ void gpencil_batch_cache_clear(bGPdata *gpd)
 		return;
 	}
 	if (G.debug_value == 668) {
-		printf("gpencil_batch_cache_clear for %s\n", gpd->id.name);
+		printf("gpencil_batch_cache_clear: %s\n", gpd->id.name);
 	}
 
 	if (cache->cache_size > 0) {
@@ -595,7 +595,7 @@ static void gpencil_draw_onionskins(GpencilBatchCache *cache, GPENCIL_e_data *e_
 void DRW_gpencil_populate_datablock(GPENCIL_e_data *e_data, void *vedata, Scene *scene, Object *ob, ToolSettings *ts, bGPdata *gpd)
 {
 	if (G.debug_value == 668) {
-		printf("DRW_gpencil_populate_datablock for %s\n", gpd->id.name);
+		printf("DRW_gpencil_populate_datablock: %s\n", gpd->id.name);
 	}
 	
 	GpencilBatchCache *cache = gpencil_batch_cache_get(gpd, CFRA);
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 00251ff8bc8..07b7311ffcd 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -177,7 +177,7 @@ static void GPENCIL_cache_populate(void *vedata, Object *ob)
 	/* object datablock (this is not draw now) */
 	if (ob->type == OB_GPENCIL && ob->gpd) {
 		if (G.debug_value == 668) {
-			printf("GPENCIL_cache_populate: Object\n");
+			printf("GPENCIL_cache_populate: %s\n", ob->id.name);
 		}
 		/* allocate memory for saving gp objects */
 		stl->g_data->gp_object_cache = gpencil_object_cache_allocate(stl->g_data->gp_object_cache, &stl->g_data->gp_cache_size, &stl->g_data->gp_cache_used);
@@ -203,6 +203,10 @@ static void GPENCIL_cache_finish(void *vedata)
 			DRW_gpencil_populate_datablock(&e_data, vedata, scene, ob, ts, ob->gpd);
 			/* save end shading group */
 			stl->g_data->gp_object_cache[i].end_grp = stl->storage->shgroup_id - 1;
+			if (G.debug_value == 668) {
+				printf("GPENCIL_cache_finish: %s %d->%d\n", ob->id.name, 
+					stl->g_data->gp_object_cache[i].init_grp, stl->g_data->gp_object_cache[i].end_grp);
+			}
 		}
 	}
 }
@@ -238,7 +242,10 @@ static void GPENCIL_draw_scene(void *vedata)
 				/* Stroke Pass: DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND | DRW_STATE_WRITE_DEPTH
 				 * draw only a subset that always start with a fill and end with stroke because the
 				 * shading groups are created by pairs */
-				DRW_draw_pass_subset(psl->stroke_pass, 
+				if (G.debug_value == 668) {
+					printf("GPENCIL_draw_scene: %s %d->%d\n", ob->id.name, init_grp, end_grp);
+				}
+				DRW_draw_pass_subset(psl->stroke_pass,
 					stl->shgroups[init_grp].shgrps_fill, 
 					stl->shgroups[end_grp].shgrps_stroke);




More information about the Bf-blender-cvs mailing list