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;
                }
        }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to