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:
-rw-r--r--source/blender/makesrna/SConscript2
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript
index 1558eef713e..07e14379072 100644
--- a/source/blender/makesrna/SConscript
+++ b/source/blender/makesrna/SConscript
@@ -6,7 +6,7 @@ objs = []
o = SConscript('intern/SConscript')
objs += o
-incs = '#/intern/guardedalloc #/intern/audaspace/intern ../blenkernel ../blenlib ../makesdna intern .'
+incs = '#/intern/guardedalloc #/intern/memutil #/intern/audaspace/intern ../blenkernel ../blenlib ../makesdna intern .'
incs += ' ../windowmanager ../editors/include ../gpu ../imbuf ../ikplugin'
incs += ' ../render/extern/include'
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 36c6b9b0a10..f0ec5f8087d 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -51,6 +51,7 @@
#include "BKE_global.h"
#include "MEM_guardedalloc.h"
+#include "MEM_CacheLimiterC-Api.h"
static void rna_userdef_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
@@ -171,6 +172,11 @@ static void rna_UserDef_audio_update(Main *bmain, Scene *scene, PointerRNA *ptr)
sound_init(bmain);
}
+static void rna_Userdef_memcache_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ MEM_CacheLimiter_set_maximum(U.memcachelimit * 1024 * 1024);
+}
+
static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Object *ob;
@@ -2477,6 +2483,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "memcachelimit");
RNA_def_property_range(prop, 0, (sizeof(void *) ==8)? 1024*16: 1024); /* 32 bit 2 GB, 64 bit 16 GB */
RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit in sequencer (megabytes)");
+ RNA_def_property_update(prop, 0, "rna_Userdef_memcache_update");
prop= RNA_def_property(srna, "frame_server_port", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "frameserverport");