[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26807] trunk/blender/source/blender/ makesrna: Fix #20139: toggling mipmaps in user preferences did not refresh textures.
Brecht Van Lommel
brecht at blender.org
Thu Feb 11 16:45:19 CET 2010
Revision: 26807
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26807
Author: blendix
Date: 2010-02-11 16:45:19 +0100 (Thu, 11 Feb 2010)
Log Message:
-----------
Fix #20139: toggling mipmaps in user preferences did not refresh textures.
Modified Paths:
--------------
trunk/blender/source/blender/makesrna/SConscript
trunk/blender/source/blender/makesrna/intern/CMakeLists.txt
trunk/blender/source/blender/makesrna/intern/Makefile
trunk/blender/source/blender/makesrna/intern/rna_userdef.c
Modified: trunk/blender/source/blender/makesrna/SConscript
===================================================================
--- trunk/blender/source/blender/makesrna/SConscript 2010-02-11 15:43:31 UTC (rev 26806)
+++ trunk/blender/source/blender/makesrna/SConscript 2010-02-11 15:45:19 UTC (rev 26807)
@@ -7,7 +7,7 @@
objs += o
incs = '#/intern/guardedalloc ../blenkernel ../blenlib ../makesdna intern .'
-incs += ' ../windowmanager ../editors/include ../imbuf ../ikplugin'
+incs += ' ../windowmanager ../editors/include ../gpu ../imbuf ../ikplugin'
incs += ' ../render/extern/include'
defs = []
Modified: trunk/blender/source/blender/makesrna/intern/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/makesrna/intern/CMakeLists.txt 2010-02-11 15:43:31 UTC (rev 26806)
+++ trunk/blender/source/blender/makesrna/intern/CMakeLists.txt 2010-02-11 15:45:19 UTC (rev 26807)
@@ -39,7 +39,7 @@
../../../../intern/guardedalloc/intern/mallocn.c
../../../../intern/guardedalloc/intern/mmap_win.c)
-INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../ikplugin ../../windowmanager ../../editors/include ../../imbuf ../../render/extern/include .)
+INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../ikplugin ../../windowmanager ../../editors/include ../../gpu ../../imbuf ../../render/extern/include .)
FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
IF(WITH_PYTHON)
Modified: trunk/blender/source/blender/makesrna/intern/Makefile
===================================================================
--- trunk/blender/source/blender/makesrna/intern/Makefile 2010-02-11 15:43:31 UTC (rev 26806)
+++ trunk/blender/source/blender/makesrna/intern/Makefile 2010-02-11 15:45:19 UTC (rev 26807)
@@ -53,6 +53,7 @@
CPPFLAGS += -I../../makesdna
CPPFLAGS += -I../../windowmanager
CPPFLAGS += -I../../editors/include
+CPPFLAGS += -I../../gpu
CPPFLAGS += -I../../render/extern/include
CPPFLAGS += -I..
CPPFLAGS += -I.
Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2010-02-11 15:43:31 UTC (rev 26806)
+++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2010-02-11 15:45:19 UTC (rev 26807)
@@ -46,13 +46,19 @@
#include "BKE_DerivedMesh.h"
#include "BKE_depsgraph.h"
#include "DNA_object_types.h"
-// #include "GPU_draw.h"
+#include "GPU_draw.h"
static void rna_userdef_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
WM_main_add_notifier(NC_WINDOW, NULL);
}
+static void rna_userdef_mipmap_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ GPU_set_mipmap(!(U.gameflags & USER_DISABLE_MIPMAP));
+ rna_userdef_update(bmain, scene, ptr);
+}
+
#if 0
static void rna_userdef_lmb_select_set(PointerRNA *ptr,int value)
{
@@ -2314,10 +2320,12 @@
RNA_def_property_float_sdna(prop, NULL, "glalphaclip");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clip Alpha", "Clip alpha below this threshold in the 3D textured view");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "use_mipmaps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_MIPMAP);
RNA_def_property_ui_text(prop, "Mipmaps", "Scale textures for the 3D View (looks nicer but uses more memory and slows image reloading)");
+ RNA_def_property_update(prop, 0, "rna_userdef_mipmap_update");
prop= RNA_def_property(srna, "use_vbos", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_VBO);
@@ -2331,6 +2339,7 @@
RNA_def_property_enum_sdna(prop, NULL, "glreslimit");
RNA_def_property_enum_items(prop, gl_texture_clamp_items);
RNA_def_property_ui_text(prop, "GL Texture Limit", "Limit the texture size to save graphics memory");
+ RNA_def_property_update(prop, 0, "rna_userdef_mipmap_update");
prop= RNA_def_property(srna, "texture_time_out", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "textimeout");
@@ -2346,6 +2355,7 @@
RNA_def_property_enum_sdna(prop, NULL, "wmdrawmethod");
RNA_def_property_enum_items(prop, draw_method_items);
RNA_def_property_ui_text(prop, "Window Draw Method", "Drawing method used by the window manager");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "audio_mixing_buffer", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mixbufsize");
More information about the Bf-blender-cvs
mailing list