diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-11 18:45:19 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-11 18:45:19 +0300 |
commit | 9ee81473f8ce2e08027a50c8b0f42c49fbc3499e (patch) | |
tree | 542561982aaee1f8fc8f92b92d452024574e413d /source/blender | |
parent | d98603129ca30aabe29f17f28f4ac72dbc0ca4ac (diff) |
Fix #20139: toggling mipmaps in user preferences did not refresh textures.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/SConscript | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/Makefile | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 12 |
4 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript index 4be35a9fe12..f78f931b669 100644 --- a/source/blender/makesrna/SConscript +++ b/source/blender/makesrna/SConscript @@ -7,7 +7,7 @@ o = SConscript('intern/SConscript') 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 = [] diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 38dd83c39d7..474102ebe7a 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -39,7 +39,7 @@ SET(SRC ../../../../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) diff --git a/source/blender/makesrna/intern/Makefile b/source/blender/makesrna/intern/Makefile index 5fefb2ae15b..5afe55bb319 100644 --- a/source/blender/makesrna/intern/Makefile +++ b/source/blender/makesrna/intern/Makefile @@ -53,6 +53,7 @@ CPPFLAGS += -I../../ikplugin CPPFLAGS += -I../../makesdna CPPFLAGS += -I../../windowmanager CPPFLAGS += -I../../editors/include +CPPFLAGS += -I../../gpu CPPFLAGS += -I../../render/extern/include CPPFLAGS += -I.. CPPFLAGS += -I. diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 80f2d076b7a..eff40cdbb36 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -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 @@ static void rna_def_userdef_system(BlenderRNA *brna) 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 @@ static void rna_def_userdef_system(BlenderRNA *brna) 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 @@ static void rna_def_userdef_system(BlenderRNA *brna) 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"); |