[Bf-blender-cvs] [cd9ec95130a] greasepencil-object: Add debug information
Antonio Vazquez
noreply at git.blender.org
Wed May 17 16:50:36 CEST 2017
Commit: cd9ec95130a8aa78cf6065abfcb8c5a4b1b2820b
Author: Antonio Vazquez
Date: Wed May 17 16:50:25 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBcd9ec95130a8aa78cf6065abfcb8c5a4b1b2820b
Add debug information
===================================================================
M source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.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 6736859714f..53488341e03 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -27,6 +27,7 @@
#include "DRW_render.h"
#include "BKE_main.h"
+#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "BKE_image.h"
#include "ED_gpencil.h"
@@ -97,6 +98,9 @@ static void gpencil_batch_cache_check_free_slots(bGPdata *gpd)
/* cache init */
static void gpencil_batch_cache_init(bGPdata *gpd, int cfra)
{
+ if (G.debug & G_DEBUG) {
+ printf("GPencil_Cache init for %s\n", gpd->id.name);
+ }
GpencilBatchCache *cache = gpd->batch_cache;
if (!cache) {
@@ -129,6 +133,9 @@ void gpencil_batch_cache_clear(bGPdata *gpd)
if (gpd->flag & GP_DATA_CACHE_IS_DIRTY) {
return;
}
+ if (G.debug & G_DEBUG) {
+ printf("GPencil_Cache clear for %s\n", gpd->id.name);
+ }
if (cache->cache_size > 0) {
for (int i = 0; i < cache->cache_size; ++i) {
@@ -535,6 +542,10 @@ static void gpencil_draw_onionskins(GpencilBatchCache *cache, GPENCIL_e_data *e_
/* helper for populate a complete grease pencil datablock */
void DRW_gpencil_populate_datablock(GPENCIL_e_data *e_data, void *vedata, Scene *scene, Object *ob, ToolSettings *ts, bGPdata *gpd)
{
+ if (G.debug & G_DEBUG) {
+ printf("GPencil_Cache populate for %s\n", gpd->id.name);
+ }
+
GpencilBatchCache *cache = gpencil_batch_cache_get(gpd, CFRA);
cache->cache_idx = 0;
/* draw normal strokes */
More information about the Bf-blender-cvs
mailing list