diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-06-05 23:22:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-06-05 23:22:23 +0400 |
commit | 04ccb0caf847b29542618a903f0e4243270f8c82 (patch) | |
tree | 362384466dea4c16176f8df8f17edf7f8c76ffe3 /source | |
parent | 868f31754cca607d3b3142e645e4f13176f73a70 (diff) |
bpy.config.sequenceMemCacheLimit is the only way to set the memcache in background mode and it didnt work.
removed some unused vars from KX_Scene
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/api2_2x/bpy_config.c | 11 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 3 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.h | 5 |
3 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/python/api2_2x/bpy_config.c b/source/blender/python/api2_2x/bpy_config.c index 0e6f9741751..1bbf04b8331 100644 --- a/source/blender/python/api2_2x/bpy_config.c +++ b/source/blender/python/api2_2x/bpy_config.c @@ -32,6 +32,7 @@ #include "../api2_2x/gen_utils.h" #include "bpy_config.h" #include "BKE_utildefines.h" +#include "../../../../intern/memutil/MEM_CacheLimiterC-Api.h" enum conf_consts { /*string*/ @@ -219,7 +220,7 @@ static PyObject *getIntAttr( BPy_Config *self, void *type ) static int setIntAttrClamp( BPy_Config *self, PyObject *value, void *type ) { void *param; - int min, max, size; + int min, max, size, ret; switch( GET_INT_FROM_POINTER(type) ) { case EXPP_CONF_ATTR_UNDOSTEPS: @@ -257,7 +258,13 @@ static int setIntAttrClamp( BPy_Config *self, PyObject *value, void *type ) return EXPP_ReturnIntError( PyExc_RuntimeError, "undefined type in setIntAttrClamp"); } - return EXPP_setIValueClamped( value, param, min, max, size ); + + ret = EXPP_setIValueClamped( value, param, min, max, size ); + + if(GET_INT_FROM_POINTER(type) == EXPP_CONF_ATTR_MEM_CACHE_LIMIT) + MEM_CacheLimiter_set_maximum(U.memcachelimit * 1024 * 1024); + + return ret; } static PyGetSetDef Config_getseters[] = { diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 2c74c88dc14..b57a07779cb 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -207,9 +207,6 @@ KX_Scene::KX_Scene(class SCA_IInputDevice* keyboarddevice, m_rootnode = NULL; m_bucketmanager=new RAS_BucketManager(); - - m_canvasDesignWidth = 0; - m_canvasDesignHeight = 0; m_attr_dict = PyDict_New(); /* new ref */ } diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index 5191ea9f23f..79d3f7fd828 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -189,11 +189,6 @@ protected: */ KX_Camera* m_active_camera; - /** Desired canvas width set at design time. */ - unsigned int m_canvasDesignWidth; - /** Desired canvas height set at design time. */ - unsigned int m_canvasDesignHeight; - /** * Another temporary variable outstaying its welcome * used in AddReplicaObject to map game objects to their |