- 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)
This commit is contained in:
2010-11-20 05:11:10 +00:00
parent 593815b23f
commit 35014aa741
3 changed files with 9 additions and 1 deletions

View File

@@ -186,9 +186,15 @@ def execute(context):
# restore the stdin # restore the stdin
sys.stdin = stdin_backup sys.stdin = stdin_backup
# execute any hooks
for func, args in execute.hooks:
func(*args)
return {'FINISHED'} return {'FINISHED'}
execute.hooks = []
def autocomplete(context): def autocomplete(context):
from console import intellisense from console import intellisense

View File

@@ -1696,7 +1696,7 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
cu = ob->data; cu = ob->data;
font = cu->vfont; font = cu->vfont;
} }
printf("%s\n", font->name);
path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0)? font->name: U.fontdir; path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0)? font->name: U.fontdir;
if(RNA_property_is_set(op->ptr, "filepath")) if(RNA_property_is_set(op->ptr, "filepath"))

View File

@@ -176,6 +176,8 @@ static void rna_def_region(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "winy"); RNA_def_property_int_sdna(prop, NULL, "winy");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Height", "Region height"); 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) static void rna_def_screen(BlenderRNA *brna)