[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46325] trunk/blender/source/blender: Fix related to [#31157]: Tips (descriptions) of macro operators were not set into underlying RNA struct, hence did not show up in UI.

Bastien Montagne montagne29 at wanadoo.fr
Sat May 5 21:26:53 CEST 2012


Revision: 46325
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46325
Author:   mont29
Date:     2012-05-05 19:26:53 +0000 (Sat, 05 May 2012)
Log Message:
-----------
Fix related to [#31157]: Tips (descriptions) of macro operators were not set into underlying RNA struct, hence did not show up in UI.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/armature/armature_ops.c
    trunk/blender/source/blender/editors/curve/curve_ops.c
    trunk/blender/source/blender/editors/mesh/mesh_ops.c
    trunk/blender/source/blender/editors/object/object_ops.c
    trunk/blender/source/blender/editors/space_action/action_ops.c
    trunk/blender/source/blender/editors/space_clip/clip_ops.c
    trunk/blender/source/blender/editors/space_graph/graph_ops.c
    trunk/blender/source/blender/editors/space_node/node_ops.c
    trunk/blender/source/blender/windowmanager/WM_api.h
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/editors/armature/armature_ops.c
===================================================================
--- trunk/blender/source/blender/editors/armature/armature_ops.c	2012-05-05 19:15:33 UTC (rev 46324)
+++ trunk/blender/source/blender/editors/armature/armature_ops.c	2012-05-05 19:26:53 UTC (rev 46325)
@@ -171,17 +171,19 @@
 	wmOperatorType *ot;
 	wmOperatorTypeMacro *otmacro;
 	
-	ot = WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+	ot = WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate",
+	                                  "Make copies of the selected bones within the same armature and move them",
+	                                  OPTYPE_UNDO|OPTYPE_REGISTER);
 	if (ot) {
-		ot->description = "Make copies of the selected bones within the same armature and move them";
 		WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate");
 		otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
 		RNA_enum_set(otmacro->ptr, "proportional", 0);
 	}
 
-	ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER);
+	ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude",
+	                                  "Create new bones from the selected joints and move them",
+	                                  OPTYPE_UNDO|OPTYPE_REGISTER);
 	if (ot) {
-		ot->description = "Create new bones from the selected joints and move them";
 		otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
 		RNA_boolean_set(otmacro->ptr, "forked", FALSE);
 		otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
@@ -190,9 +192,10 @@
 	
 	// XXX would it be nicer to just be able to have standard extrude_move, but set the forked property separate?
 	// that would require fixing a properties bug 19733
-	ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked", OPTYPE_UNDO|OPTYPE_REGISTER);
+	ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked",
+	                                  "Create new bones from the selected joints and move them",
+	                                  OPTYPE_UNDO|OPTYPE_REGISTER);
 	if (ot) {
-		ot->description = "Create new bones from the selected joints and move them";
 		otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
 		RNA_boolean_set(otmacro->ptr, "forked", TRUE);
 		otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");

Modified: trunk/blender/source/blender/editors/curve/curve_ops.c
===================================================================
--- trunk/blender/source/blender/editors/curve/curve_ops.c	2012-05-05 19:15:33 UTC (rev 46324)
+++ trunk/blender/source/blender/editors/curve/curve_ops.c	2012-05-05 19:26:53 UTC (rev 46325)
@@ -140,15 +140,15 @@
 	wmOperatorType *ot;
 	wmOperatorTypeMacro *otmacro;
 
-	ot = WM_operatortype_append_macro("CURVE_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
-	ot->description = "Duplicate curve and move";
+	ot = WM_operatortype_append_macro("CURVE_OT_duplicate_move", "Add Duplicate", "Duplicate curve and move",
+	                                  OPTYPE_UNDO|OPTYPE_REGISTER);
 	WM_operatortype_macro_define(ot, "CURVE_OT_duplicate");
 	otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
 	RNA_enum_set(otmacro->ptr, "proportional", 0);
 	RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
-	ot = WM_operatortype_append_macro("CURVE_OT_extrude_move", "Extrude Curve and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
-	ot->description = "Extrude curve and move result";
+	ot = WM_operatortype_append_macro("CURVE_OT_extrude_move", "Extrude Curve and Move",
+	                                  "Extrude curve and move result", OPTYPE_UNDO|OPTYPE_REGISTER);
 	WM_operatortype_macro_define(ot, "CURVE_OT_extrude");
 	otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
 	RNA_enum_set(otmacro->ptr, "proportional", 0);

Modified: trunk/blender/source/blender/editors/mesh/mesh_ops.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/mesh_ops.c	2012-05-05 19:15:33 UTC (rev 46324)
+++ trunk/blender/source/blender/editors/mesh/mesh_ops.c	2012-05-05 19:26:53 UTC (rev 46325)
@@ -197,49 +197,49 @@
 	wmOperatorType *ot;
 	wmOperatorTypeMacro *otmacro;
 	
-	ot = WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut and Slide", OPTYPE_UNDO | OPTYPE_REGISTER);
-	ot->description = "Cut mesh loop and slide it";
+	ot = WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut and Slide", "Cut mesh loop and slide it",
+	                                  OPTYPE_UNDO | OPTYPE_REGISTER);
 	WM_operatortype_macro_define(ot, "MESH_OT_loopcut");
 	otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_edge_slide");
 	RNA_struct_idprops_unset(otmacro->ptr, "release_confirm");
 
-	ot = WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO | OPTYPE_REGISTER);
-	ot->description = "Duplicate mesh and move";
+	ot = WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", "Duplicate mesh and move",
+	                                  OPTYPE_UNDO | OPTYPE_REGISTER);
 	WM_operatortype_macro_define(ot, "MESH_OT_duplicate");
 	otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
 	RNA_enum_set(otmacro->ptr, "proportional", 0);
 	RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
-	ot = WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", OPTYPE_UNDO | OPTYPE_REGISTER);
-	ot->description = "Rip polygons and move the result";
+	ot = WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", "Rip polygons and move the result",
+	                                  OPTYPE_UNDO | OPTYPE_REGISTER);
 	WM_operatortype_macro_define(ot, "MESH_OT_rip");
 	otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
 	RNA_enum_set(otmacro->ptr, "proportional", 0);
 	RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
-	ot = WM_operatortype_append_macro("MESH_OT_extrude_region_move", "Extrude Region and Move", OPTYPE_UNDO | OPTYPE_REGISTER);
-	ot->description = "Extrude region and move result";
+	ot = WM_operatortype_append_macro("MESH_OT_extrude_region_move", "Extrude Region and Move",
+	                                  "Extrude region and move result", OPTYPE_UNDO | OPTYPE_REGISTER);
 	otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_region");
 	otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
 	RNA_enum_set(otmacro->ptr, "proportional", 0);
 	RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
-	ot = WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move", OPTYPE_UNDO | OPTYPE_REGISTER);
-	ot->description = "Extrude faces and move result";
+	ot = WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move",
+	                                  "Extrude faces and move result", OPTYPE_UNDO | OPTYPE_REGISTER);
 	otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_faces_indiv");
 	otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten");
 	RNA_enum_set(otmacro->ptr, "proportional", 0);
 	RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
-	ot = WM_operatortype_append_macro("MESH_OT_extrude_edges_move", "Extrude Only Edges and Move", OPTYPE_UNDO | OPTYPE_REGISTER);
-	ot->description = "Extrude edges and move result";
+	ot = WM_operatortype_append_macro("MESH_OT_extrude_edges_move", "Extrude Only Edges and Move",
+	                                  "Extrude edges and move result", OPTYPE_UNDO | OPTYPE_REGISTER);
 	otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_edges_indiv");
 	otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
 	RNA_enum_set(otmacro->ptr, "proportional", 0);
 	RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
-	ot = WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", "Extrude Only Vertices and Move", OPTYPE_UNDO | OPTYPE_REGISTER);
-	ot->description = "Extrude vertices and move result";
+	ot = WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", "Extrude Only Vertices and Move",
+	                                  "Extrude vertices and move result", OPTYPE_UNDO | OPTYPE_REGISTER);
 	otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_verts_indiv");
 	otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
 	RNA_enum_set(otmacro->ptr, "proportional", 0);

Modified: trunk/blender/source/blender/editors/object/object_ops.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_ops.c	2012-05-05 19:15:33 UTC (rev 46324)
+++ trunk/blender/source/blender/editors/object/object_ops.c	2012-05-05 19:26:53 UTC (rev 46325)
@@ -222,18 +222,18 @@
 	wmOperatorType *ot;
 	wmOperatorTypeMacro *otmacro;
 	
-	ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate Objects", OPTYPE_UNDO | OPTYPE_REGISTER);
+	ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate Objects",
+	                                  "Duplicate selected objects and move them", OPTYPE_UNDO | OPTYPE_REGISTER);
 	if (ot) {
-		ot->description = "Duplicate selected objects and move them";
 		WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
 		otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
 		RNA_enum_set(otmacro->ptr, "proportional", PROP_EDIT_OFF);
 	}
 
 	/* grr, should be able to pass options on... */
-	ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", "Duplicate Linked", OPTYPE_UNDO | OPTYPE_REGISTER);
+	ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", "Duplicate Linked",
+	                                  "Duplicate selected objects and move them", OPTYPE_UNDO | OPTYPE_REGISTER);
 	if (ot) {
-		ot->description = "Duplicate selected objects and move them";
 		otmacro = WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
 		RNA_boolean_set(otmacro->ptr, "linked", TRUE);
 		otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
@@ -241,9 +241,9 @@
 	}
 	
 	/* XXX */
-	ot = WM_operatortype_append_macro("OBJECT_OT_add_named_cursor", "Add named object at cursor", OPTYPE_UNDO | OPTYPE_REGISTER);

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list