diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-20 08:11:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-20 08:11:10 +0300 |
commit | 35014aa741251e79c4cb4dffbe84580789059c5c (patch) | |
tree | a28df20a964824edd7be94f605a53330666d8ff4 | |
parent | 593815b23f1eedbeb959067f08d810f35f9e3633 (diff) |
- add python/rna function region.tag_redraw()
- removed print which was before NULL check, (possible crash)
- add execute hooks for the python console (not used by any scripts yet)
-rw-r--r-- | release/scripts/op/console_python.py | 6 | ||||
-rw-r--r-- | source/blender/editors/curve/editfont.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_screen.c | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/release/scripts/op/console_python.py b/release/scripts/op/console_python.py index 7a969cbe9f5..2ce6ede8f76 100644 --- a/release/scripts/op/console_python.py +++ b/release/scripts/op/console_python.py @@ -186,9 +186,15 @@ def execute(context): # restore the stdin sys.stdin = stdin_backup + + # execute any hooks + for func, args in execute.hooks: + func(*args) return {'FINISHED'} +execute.hooks = [] + def autocomplete(context): from console import intellisense diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index ed8b1dae430..19a8030c6be 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -1696,7 +1696,7 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) cu = ob->data; font = cu->vfont; } - printf("%s\n", font->name); + path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0)? font->name: U.fontdir; if(RNA_property_is_set(op->ptr, "filepath")) diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index d6964f5d569..197a7266fea 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -176,6 +176,8 @@ static void rna_def_region(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "winy"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Height", "Region height"); + + RNA_def_function(srna, "tag_redraw", "ED_region_tag_redraw"); } static void rna_def_screen(BlenderRNA *brna) |