[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36373] trunk/blender/source/blender: Added tooltip note that parent curve 'Follow' needs to be enabled for track axis to do anything.

Campbell Barton ideasman42 at gmail.com
Thu Apr 28 15:01:29 CEST 2011


Revision: 36373
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36373
Author:   campbellbarton
Date:     2011-04-28 13:01:29 +0000 (Thu, 28 Apr 2011)
Log Message:
-----------
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).

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/interface_regions.c
    trunk/blender/source/blender/makesrna/intern/rna_object.c

Modified: trunk/blender/source/blender/editors/interface/interface_regions.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_regions.c	2011-04-28 12:43:28 UTC (rev 36372)
+++ trunk/blender/source/blender/editors/interface/interface_regions.c	2011-04-28 13:01:29 UTC (rev 36373)
@@ -362,6 +362,16 @@
 	/* 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;

Modified: trunk/blender/source/blender/makesrna/intern/rna_object.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_object.c	2011-04-28 12:43:28 UTC (rev 36372)
+++ trunk/blender/source/blender/makesrna/intern/rna_object.c	2011-04-28 13:01:29 UTC (rev 36373)
@@ -1826,13 +1826,13 @@
 	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 */




More information about the Bf-blender-cvs mailing list