diff options
author | Michael Fox <mfoxdogg@gmail.com> | 2010-11-27 01:12:46 +0300 |
---|---|---|
committer | Michael Fox <mfoxdogg@gmail.com> | 2010-11-27 01:12:46 +0300 |
commit | d47a519cbb70fabe7a105fee31be86d181541dbb (patch) | |
tree | d42b3159e66784d1aa4dd6bf72148f923ee7dd54 /source/blender/makesrna | |
parent | 8f4d8ad5bc173ab38a18c380dc5a5161eab6aa17 (diff) |
added option to turn off Text anti-aliasing in the UI
(userpref->system), with a great help from brecht (its been way too long
for me).
However as brecht pointed out that the non-AA text is slightly lareger
then AA'ed Text :S, i did not do anything about this as this commit was
just the option not the text drawing.
this commit also makes it possible to do all kinds of UI textrender options
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/SConscript | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/Makefile | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/SConscript | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 23 |
5 files changed, 23 insertions, 6 deletions
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript index d03d7c66dea..993fa6adde5 100644 --- a/source/blender/makesrna/SConscript +++ b/source/blender/makesrna/SConscript @@ -7,7 +7,7 @@ o = SConscript('intern/SConscript') objs += o incs = '#/intern/guardedalloc #/intern/memutil #/intern/audaspace/intern ../blenkernel ../blenlib ../makesdna intern .' -incs += ' ../windowmanager ../editors/include ../gpu ../imbuf ../ikplugin' +incs += ' ../windowmanager ../editors/include ../gpu ../imbuf ../ikplugin ../blenfont' incs += ' ../render/extern/include' defs = [] diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 4880572d1e5..0a0b555a12e 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -54,6 +54,7 @@ INCLUDE_DIRECTORIES( ../../makesdna ../../blenkernel ../../blenlib + ../../blenfont ../../ikplugin ../../windowmanager ../../editors/include diff --git a/source/blender/makesrna/intern/Makefile b/source/blender/makesrna/intern/Makefile index 69d5581184d..2ff2c0d7eb3 100644 --- a/source/blender/makesrna/intern/Makefile +++ b/source/blender/makesrna/intern/Makefile @@ -52,6 +52,7 @@ CPPFLAGS += -I$(NAN_MEMUTIL)/include CPPFLAGS += -I../../../../intern/audaspace/intern CPPFLAGS += -I../../blenlib CPPFLAGS += -I../../blenkernel +CPPFLAGS += -I../../blenfont CPPFLAGS += -I../../imbuf CPPFLAGS += -I../../ikplugin CPPFLAGS += -I../../makesdna diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index ec588319eae..ac71e292552 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -31,7 +31,7 @@ defs = [] incs = '#/intern/guardedalloc ../../blenlib ../../blenkernel' incs += ' ../../imbuf ../../makesdna ../../makesrna ../../ikplugin' -incs += ' ../../windowmanager ../../editors/include' +incs += ' ../../windowmanager ../../editors/include ../../blenfont' incs += ' ../../render/extern/include' incs += ' #/intern/audaspace/intern ' diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 8d5483efcb3..116e25030d6 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -44,13 +44,17 @@ #ifdef RNA_RUNTIME -#include "BKE_main.h" -#include "BKE_DerivedMesh.h" -#include "BKE_depsgraph.h" #include "DNA_object_types.h" #include "DNA_screen_types.h" -#include "GPU_draw.h" + +#include "BKE_DerivedMesh.h" +#include "BKE_depsgraph.h" #include "BKE_global.h" +#include "BKE_main.h" + +#include "GPU_draw.h" + +#include "BLF_api.h" #include "MEM_guardedalloc.h" #include "MEM_CacheLimiterC-Api.h" @@ -254,6 +258,12 @@ static void rna_userdef_temp_update(Main *bmain, Scene *scene, PointerRNA *ptr) BLI_where_is_temp(btempdir, 1); } +static void rna_userdef_text_update(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + BLF_cache_clear(); + WM_main_add_notifier(NC_WINDOW, NULL); +} + #else static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna) @@ -2575,6 +2585,11 @@ static void rna_def_userdef_system(BlenderRNA *brna) RNA_def_property_range(prop, 50, 1000); RNA_def_property_ui_text(prop, "Wait Timer (ms)", "Time in milliseconds between each frame recorded for screencast"); + prop= RNA_def_property(srna, "use_text_antialiasing", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "text_render", USER_TEXT_DISABLE_AA); + RNA_def_property_ui_text(prop, "Text Anti-aliasing", "Draw user interface text anti-aliased"); + RNA_def_property_update(prop, 0, "rna_userdef_text_update"); + #if 0 prop= RNA_def_property(srna, "verse_master", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "versemaster"); |