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:
authorDalai Felinto <dfelinto@gmail.com>2017-05-16 12:23:14 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-05-16 13:50:23 +0300
commit1e311279336841aa313e690aca17a092b933ba05 (patch)
tree58b2f4eedb28e546d8ce31a249c828cf6a100626 /source/blender/blenkernel
parent961927572956eab83ce6f99ad1f5bc5ec0987f7e (diff)
Fix info header stats to iterator over layer instead of scene
Although this is working fine, there are two changes expected in the new future once depsgraph copy on write is implemented: 1) To call ED_info_stats_clear a callback from depsgraph, instead of the notifier system. (that would also allow us to clear only one SceneLayer). 2) To store/get stats from the evaluated SceneLayer, as well as iterate over the evaluated objects as well.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/layer.c2
-rw-r--r--source/blender/blenkernel/intern/scene.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 5942e575fd2..fddffa63a59 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -175,6 +175,8 @@ void BKE_scene_layer_free(SceneLayer *sl)
IDP_FreeProperty(sl->properties_evaluated);
MEM_freeN(sl->properties_evaluated);
}
+
+ MEM_SAFE_FREE(sl->stats);
}
/**
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index b8d69c6077b..ff29affd6d9 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -254,7 +254,6 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type)
scen->theDag = NULL;
scen->depsgraph = NULL;
scen->obedit = NULL;
- scen->stats = NULL;
scen->fps_info = NULL;
if (sce->rigidbody_world)
@@ -317,6 +316,7 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type)
BLI_duplicatelist(&scen->render_layers, &sce->render_layers);
SceneLayer *new_sl = scen->render_layers.first;
for (SceneLayer *sl = sce->render_layers.first; sl; sl = sl->next) {
+ new_sl->stats = NULL;
new_sl->properties = IDP_New(IDP_GROUP, (const IDPropertyTemplate *){0}, ROOT_PROP);
new_sl->properties_evaluated = NULL;
@@ -571,8 +571,7 @@ void BKE_scene_free(Scene *sce)
DEG_scene_graph_free(sce);
if (sce->depsgraph)
DEG_graph_free(sce->depsgraph);
-
- MEM_SAFE_FREE(sce->stats);
+
MEM_SAFE_FREE(sce->fps_info);
BKE_sound_destroy_scene(sce);