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-11-09 18:14:15 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-11-09 19:53:02 +0300
commit549468365157a075949f2d4b8d9496ff719cefbf (patch)
treef564368fe509f46e4ec13b350b62aaace571c093 /source/blender/makesrna/intern/rna_render.c
parentcbbf991f62b7f1546771a71b3b9f14a46d1b6b61 (diff)
Cycles: Free Blender side data as soon as we don't need it
Currently this is possible after built-in images are loaded in memory. Allows to save memory used by dependency graph and copy-on-write. In practice this lowers peak system memory usage from 52GB to 42GB on a production file of spring 03_035_A.lighting. Note, that this only applies to F12 and command line renders. Bigger note, that this optimization is currently only possible if there are no grease pencil objects to be rendered.
Diffstat (limited to 'source/blender/makesrna/intern/rna_render.c')
-rw-r--r--source/blender/makesrna/intern/rna_render.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 1e9f68c577b..46b77b80d49 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -685,6 +685,9 @@ static void rna_def_render_engine(BlenderRNA *brna)
parm = RNA_def_int(func, "pixel_size", 0, 1, 8, "Pixel Size", "", 1, 8);
RNA_def_function_return(func, parm);
+ RNA_def_function(srna, "free_blender_memory", "RE_engine_free_blender_memory");
+ RNA_def_function_ui_description(func, "Free Blender side memory of render engine");
+
RNA_define_verify_sdna(0);
prop = RNA_def_property(srna, "is_animation", PROP_BOOLEAN, PROP_NONE);