[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51166] trunk/blender/source/blender/ editors/space_view3d: Bugfix: No enum tooltips displayed for many 3D view navigation tools (+ Code

Joshua Leung aligorith at gmail.com
Mon Oct 8 08:21:36 CEST 2012


Revision: 51166
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51166
Author:   aligorith
Date:     2012-10-08 06:21:36 +0000 (Mon, 08 Oct 2012)
Log Message:
-----------
Bugfix: No enum tooltips displayed for many 3D view navigation tools (+ Code
cleanup)

* Enum tooltips will only be detected in the case that we assign that as the
default property (ot->prop) of the operator. Set all of the offending properties
to get this status, since those operators would be useless without that property
anyway

* Improved the wording/capitalisation of a few of these tooltips and labels

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
    trunk/blender/source/blender/editors/space_view3d/view3d_view.c

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_edit.c	2012-10-08 06:07:36 UTC (rev 51165)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_edit.c	2012-10-08 06:21:36 UTC (rev 51166)
@@ -966,7 +966,6 @@
 
 void VIEW3D_OT_rotate(wmOperatorType *ot)
 {
-
 	/* identifiers */
 	ot->name = "Rotate view";
 	ot->description = "Rotate the view";
@@ -2901,7 +2900,7 @@
 	{RV3D_VIEW_RIGHT, "RIGHT", 0, "Right", "View From the Right"},
 	{RV3D_VIEW_TOP, "TOP", 0, "Top", "View From the Top"},
 	{RV3D_VIEW_BOTTOM, "BOTTOM", 0, "Bottom", "View From the Bottom"},
-	{RV3D_VIEW_CAMERA, "CAMERA", 0, "Camera", "View From the active camera"},
+	{RV3D_VIEW_CAMERA, "CAMERA", 0, "Camera", "View From the Active Camera"},
 	{0, NULL, 0, NULL, NULL}
 };
 
@@ -3125,7 +3124,7 @@
 
 	/* identifiers */
 	ot->name = "View numpad";
-	ot->description = "Set the view";
+	ot->description = "Use a preset viewpoint";
 	ot->idname = "VIEW3D_OT_viewnumpad";
 
 	/* api callbacks */
@@ -3135,8 +3134,8 @@
 	/* flags */
 	ot->flag = 0;
 
-	prop = RNA_def_enum(ot->srna, "type", prop_view_items, 0, "View", "The Type of view");
-	RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+	ot->prop = RNA_def_enum(ot->srna, "type", prop_view_items, 0, "View", "Preset viewpoint to use");
+	RNA_def_property_flag(ot->prop, PROP_SKIP_SAVE);
 	prop = RNA_def_boolean(ot->srna, "align_active", 0, "Align Active", "Align to the active object's axis");
 	RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
@@ -3213,7 +3212,9 @@
 
 	/* flags */
 	ot->flag = 0;
-	RNA_def_enum(ot->srna, "type", prop_view_orbit_items, 0, "Orbit", "Direction of View Orbit");
+	
+	/* properties */
+	ot->prop = RNA_def_enum(ot->srna, "type", prop_view_orbit_items, 0, "Orbit", "Direction of View Orbit");
 }
 
 static EnumPropertyItem prop_view_pan_items[] = {
@@ -3262,7 +3263,9 @@
 
 	/* flags */
 	ot->flag = 0;
-	RNA_def_enum(ot->srna, "type", prop_view_pan_items, 0, "Pan", "Direction of View Pan");
+	
+	/* Properties */
+	ot->prop = RNA_def_enum(ot->srna, "type", prop_view_pan_items, 0, "Pan", "Direction of View Pan");
 }
 
 static int viewpersportho_exec(bContext *C, wmOperator *UNUSED(op))
@@ -3290,7 +3293,7 @@
 {
 	/* identifiers */
 	ot->name = "View Persp/Ortho";
-	ot->description = "Switch the current view from perspective/orthographic";
+	ot->description = "Switch the current view from perspective/orthographic projection";
 	ot->idname = "VIEW3D_OT_view_persportho";
 
 	/* api callbacks */
@@ -3406,7 +3409,8 @@
 
 	/* flags */
 	ot->flag   = 0;
-
+	
+	/* properties */
 	RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "Background image index to remove", 0, INT_MAX);
 }
 

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_view.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_view.c	2012-10-08 06:07:36 UTC (rev 51165)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_view.c	2012-10-08 06:21:36 UTC (rev 51166)
@@ -1647,7 +1647,6 @@
 
 void VIEW3D_OT_localview(wmOperatorType *ot)
 {
-	
 	/* identifiers */
 	ot->name = "Local View";
 	ot->description = "Toggle display of selected object(s) separately and centered in view";




More information about the Bf-blender-cvs mailing list