diff options
author | Antonioya <blendergit@gmail.com> | 2018-11-20 13:41:58 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-11-20 13:42:36 +0300 |
commit | a29740e2904f12833a1c8d26926979a1cfb293da (patch) | |
tree | 573975f4f465130f24fcd5c795cef4a0d0603eda /source/blender/editors/space_info/info_stats.c | |
parent | a19ee4e92665898b88bc8c21b7bf9ea313314e55 (diff) |
GP: Fix bottom statistics
Diffstat (limited to 'source/blender/editors/space_info/info_stats.c')
-rw-r--r-- | source/blender/editors/space_info/info_stats.c | 22 |
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; } } |