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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-07-18 17:09:19 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-07-18 17:09:19 +0300
commit2604f281b7bd74f396b2479fbdb97cbf9dc27689 (patch)
treec5f25ed3e806afff58dc95441ab12a9a5d1030f6 /intern/cycles/blender/blender_sync.h
parent5fd677c83c80aa33cac9f4fe47dc149e61b96f67 (diff)
Cycles: Fix missing nested particle systems when instanced multiple times
Was only visible when doing command line, since it was happening due to cache-free policy which was aimed to bring memory usage down. The issue is that if object with particle system is used as a nested duplicator multiple times, it will only generate children first time, and after that its caches are freed. After that duplication system can not generate any instances, since the path cache is lost. Now we delay caches free to after all objects are synchronized, which ensures all instances are generated. This will increase a memory peak a bit during object synchronization time, but overall it shouldn't be that bad, since memory footprint after synchronization will stay the same as before this change. The ultimate thing to do here would be to drop the whole dependency graph away, but this will require: - API on engine side, to inform it to drop the dependency graph. - Changes in Cycles report system to NOT use evaluated scene to get scene name (evaluated scene will be gone with dependency graph).
Diffstat (limited to 'intern/cycles/blender/blender_sync.h')
-rw-r--r--intern/cycles/blender/blender_sync.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_sync.h b/intern/cycles/blender/blender_sync.h
index cd1a37d3f13..0465f703c51 100644
--- a/intern/cycles/blender/blender_sync.h
+++ b/intern/cycles/blender/blender_sync.h
@@ -157,6 +157,9 @@ private:
/* Images. */
void sync_images();
+ /* Early data free. */
+ void free_data_after_sync(BL::Depsgraph& b_depsgraph);
+
/* util */
void find_shader(BL::ID& id, vector<Shader*>& used_shaders, Shader *default_shader);
bool BKE_object_is_modified(BL::Object& b_ob);