diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-28 17:01:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-28 17:01:29 +0400 |
commit | 696512f8ccb43b685b24a8b5188538abe0615148 (patch) | |
tree | 8ed1f77724c084fee661159f025d05cda402858c /source | |
parent | e6604d77f5c456e4dacc6b224ce28e4023f52ada (diff) |
Added tooltip note that parent curve 'Follow' needs to be enabled for track axis to do anything.
also show both enum descriptions in the tooltip (the enum properties description and the individual enums).
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_regions.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 1a240f34757..0e951eb15c7 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -362,6 +362,16 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) /* create tooltip data */ data= MEM_callocN(sizeof(uiTooltipData), "uiTooltipData"); + /* special case, enum rna buttons only have enum item description, use general enum description too before the spesific one */ + if(but->rnaprop && RNA_property_type(but->rnaprop) == PROP_ENUM) { + const char *descr= RNA_property_description(but->rnaprop); + if(descr) { + BLI_strncpy(data->lines[data->totline], descr, sizeof(data->lines[0])); + data->color[data->totline]= 0xFFFFFF; + data->totline++; + } + } + if(but->tip && strlen(but->tip)) { BLI_strncpy(data->lines[data->totline], but->tip, sizeof(data->lines[0])); data->color[data->totline]= 0xFFFFFF; diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 436418324e2..2ff72c90042 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1826,13 +1826,13 @@ static void rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "trackflag"); RNA_def_property_enum_items(prop, track_items); - RNA_def_property_ui_text(prop, "Track Axis", "Axis that points in 'forward' direction"); + RNA_def_property_ui_text(prop, "Track Axis", "Axis that points in 'forward' direction (applies to DupliFrame when parent 'Follow' is enabled)"); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); prop= RNA_def_property(srna, "up_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "upflag"); RNA_def_property_enum_items(prop, up_items); - RNA_def_property_ui_text(prop, "Up Axis", "Axis that points in the upward direction"); + RNA_def_property_ui_text(prop, "Up Axis", "Axis that points in the upward direction (applies to DupliFrame when parent 'Follow' is enabled)"); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); /* proxy */ |