diff options
author | Elia Sarti <vekoon@gmail.com> | 2010-11-22 03:10:32 +0300 |
---|---|---|
committer | Elia Sarti <vekoon@gmail.com> | 2010-11-22 03:10:32 +0300 |
commit | 19e091ec5effed52f59dcdf92acce4ef7b837ac6 (patch) | |
tree | 09950e53fc0d8475c712186f6aac42161350ce24 /source/blender/editors | |
parent | 8f657c174d7b9759251b8c5a4fcf91e6740f002b (diff) |
User preference to hide Python references in Tooltips.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_regions.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 247fa62b51c..d67d63423f2 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -403,9 +403,11 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) } /* rna info */ - BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Python: %s.%s", RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop)); - data->color[data->totline]= 0x888888; - data->totline++; + if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) { + BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Python: %s.%s", RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop)); + data->color[data->totline]= 0x888888; + data->totline++; + } if(but->rnapoin.id.data) { ID *id= but->rnapoin.id.data; @@ -424,9 +426,11 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) str= WM_operator_pystring(C, but->optype, opptr, 0); /* operator info */ - BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Python: %s", str); - data->color[data->totline]= 0x888888; - data->totline++; + if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) { + BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Python: %s", str); + data->color[data->totline]= 0x888888; + data->totline++; + } MEM_freeN(str); |