Added tooltip note that parent curve 'Follow' needs to be enabled for track axis...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 28 Apr 2011 13:01:29 +0000 (13:01 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 28 Apr 2011 13:01:29 +0000 (13:01 +0000)
also show both enum descriptions in the tooltip (the enum properties description and the individual enums).

source/blender/editors/interface/interface_regions.c
source/blender/makesrna/intern/rna_object.c

index 1a240f347575aa3e26cdc4644a77e522fc373162..0e951eb15c7f569f92c372ab9e1c67ab036ce77c 100644 (file)
@@ -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;
index 436418324e26a9a0e054762159110243fed875b3..2ff72c900422560a25ce29c14cbe89342209da0f 100644 (file)
@@ -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 */