Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-11-20 13:41:58 +0300
committerAntonioya <blendergit@gmail.com>2018-11-20 13:42:36 +0300
commita29740e2904f12833a1c8d26926979a1cfb293da (patch)
tree573975f4f465130f24fcd5c795cef4a0d0603eda /source/blender/editors/space_info
parenta19ee4e92665898b88bc8c21b7bf9ea313314e55 (diff)
GP: Fix bottom statistics
Diffstat (limited to 'source/blender/editors/space_info')
-rw-r--r--source/blender/editors/space_info/info_stats.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index a6e94e0875d..1848a22a619 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -154,16 +154,18 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
}
case OB_GPENCIL:
{
- bGPdata *gpd = (bGPdata *)ob->data;
- /* GPXX Review if we can move to other place when object change
- * maybe to depsgraph evaluation
- */
- BKE_gpencil_stats_update(gpd);
-
- stats->totgplayer = gpd->totlayer;
- stats->totgpframe = gpd->totframe;
- stats->totgpstroke = gpd->totstroke;
- stats->totgppoint = gpd->totpoint;
+ if (sel) {
+ bGPdata *gpd = (bGPdata *)ob->data;
+ /* GPXX Review if we can move to other place when object change
+ * maybe to depsgraph evaluation
+ */
+ BKE_gpencil_stats_update(gpd);
+
+ stats->totgplayer += gpd->totlayer;
+ stats->totgpframe += gpd->totframe;
+ stats->totgpstroke += gpd->totstroke;
+ stats->totgppoint += gpd->totpoint;
+ }
break;
}
}