[Bf-blender-cvs] [a29740e2904] blender2.8: GP: Fix bottom statistics
Antonioya
noreply at git.blender.org
Tue Nov 20 11:42:44 CET 2018
Commit: a29740e2904f12833a1c8d26926979a1cfb293da
Author: Antonioya
Date: Tue Nov 20 11:41:58 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBa29740e2904f12833a1c8d26926979a1cfb293da
GP: Fix bottom statistics
===================================================================
M source/blender/editors/space_info/info_stats.c
===================================================================
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;
}
}
More information about the Bf-blender-cvs
mailing list