[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21072] branches/soc-2009-aligorith/source /blender/editors: NLA SoC: Graph Editor Menus + Operator Name Cleanup

Joshua Leung aligorith at gmail.com
Mon Jun 22 06:23:06 CEST 2009


Revision: 21072
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21072
Author:   aligorith
Date:     2009-06-22 06:23:06 +0200 (Mon, 22 Jun 2009)

Log Message:
-----------
NLA SoC: Graph Editor Menus + Operator Name Cleanup 

As with the DopeSheet, the names of operators in the Graph Editor have been cleaned up, and operators have been added to menus as appropriate to show their availability.

Tweaked a few DopeSheet operator names to be more in line with the Graph Editor equivalents, and vica versa.


TODO: now, the operator poll callbacks here need checking...

Modified Paths:
--------------
    branches/soc-2009-aligorith/source/blender/editors/space_action/action_edit.c
    branches/soc-2009-aligorith/source/blender/editors/space_action/action_header.c
    branches/soc-2009-aligorith/source/blender/editors/space_action/action_intern.h
    branches/soc-2009-aligorith/source/blender/editors/space_action/action_ops.c
    branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_buttons.c
    branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_edit.c
    branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_header.c
    branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_intern.h
    branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_ops.c
    branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_select.c

Modified: branches/soc-2009-aligorith/source/blender/editors/space_action/action_edit.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/space_action/action_edit.c	2009-06-22 04:10:59 UTC (rev 21071)
+++ branches/soc-2009-aligorith/source/blender/editors/space_action/action_edit.c	2009-06-22 04:23:06 UTC (rev 21072)
@@ -853,11 +853,11 @@
 	return OPERATOR_FINISHED;
 }
  
-void ACT_OT_extrapolation_type_set (wmOperatorType *ot)
+void ACT_OT_extrapolation_type (wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Set Keyframe Extrapolation";
-	ot->idname= "ACT_OT_extrapolation_type_set";
+	ot->idname= "ACT_OT_extrapolation_type";
 	
 	/* api callbacks */
 	ot->invoke= WM_menu_invoke;
@@ -923,11 +923,11 @@
 	return OPERATOR_FINISHED;
 }
  
-void ACT_OT_interpolation_type_set (wmOperatorType *ot)
+void ACT_OT_interpolation_type (wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Set Keyframe Interpolation";
-	ot->idname= "ACT_OT_interpolation_type_set";
+	ot->idname= "ACT_OT_interpolation_type";
 	
 	/* api callbacks */
 	ot->invoke= WM_menu_invoke;
@@ -1011,11 +1011,11 @@
 	return OPERATOR_FINISHED;
 }
  
-void ACT_OT_handle_type_set (wmOperatorType *ot)
+void ACT_OT_handle_type (wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Set Keyframe Handle Type";
-	ot->idname= "ACT_OT_handle_type_set";
+	ot->idname= "ACT_OT_handle_type";
 	
 	/* api callbacks */
 	ot->invoke= WM_menu_invoke;

Modified: branches/soc-2009-aligorith/source/blender/editors/space_action/action_header.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/space_action/action_header.c	2009-06-22 04:10:59 UTC (rev 21071)
+++ branches/soc-2009-aligorith/source/blender/editors/space_action/action_header.c	2009-06-22 04:23:06 UTC (rev 21072)
@@ -183,24 +183,24 @@
 
 static void act_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused)
 {
-	uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type_set", "type", HD_FREE);
-	uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type_set", "type", HD_AUTO);
-	uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type_set", "type", HD_VECT);
-	uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type_set", "type", HD_ALIGN);
-	uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type_set", "type", HD_AUTO_ANIM); // xxx?
+	uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_FREE);
+	uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_AUTO);
+	uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_VECT);
+	uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_ALIGN);
+	uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_AUTO_ANIM); // xxx?
 }
 
 static void act_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
 {
-	uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type_set", "type", BEZT_IPO_CONST);
-	uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type_set", "type", BEZT_IPO_LIN);
-	uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type_set", "type", BEZT_IPO_BEZ);
+	uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_CONST);
+	uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_LIN);
+	uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_BEZ);
 }
 
 static void act_edit_expomenu(bContext *C, uiLayout *layout, void *arg_unused)
 {
-	uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type_set", "type", FCURVE_EXTRAPOLATE_CONSTANT);
-	uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type_set", "type", FCURVE_EXTRAPOLATE_LINEAR);
+	uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_CONSTANT);
+	uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_LINEAR);
 }
 
 static void act_editmenu(bContext *C, uiLayout *layout, void *arg_unused)

Modified: branches/soc-2009-aligorith/source/blender/editors/space_action/action_intern.h
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/space_action/action_intern.h	2009-06-22 04:10:59 UTC (rev 21071)
+++ branches/soc-2009-aligorith/source/blender/editors/space_action/action_intern.h	2009-06-22 04:23:06 UTC (rev 21072)
@@ -89,9 +89,9 @@
 void ACT_OT_clean(struct wmOperatorType *ot);
 void ACT_OT_sample(struct wmOperatorType *ot);
 
-void ACT_OT_handle_type_set(struct wmOperatorType *ot);
-void ACT_OT_interpolation_type_set(struct wmOperatorType *ot);
-void ACT_OT_extrapolation_type_set(struct wmOperatorType *ot);
+void ACT_OT_handle_type(struct wmOperatorType *ot);
+void ACT_OT_interpolation_type(struct wmOperatorType *ot);
+void ACT_OT_extrapolation_type(struct wmOperatorType *ot);
 
 void ACT_OT_frame_jump(struct wmOperatorType *ot);
 

Modified: branches/soc-2009-aligorith/source/blender/editors/space_action/action_ops.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/space_action/action_ops.c	2009-06-22 04:10:59 UTC (rev 21071)
+++ branches/soc-2009-aligorith/source/blender/editors/space_action/action_ops.c	2009-06-22 04:23:06 UTC (rev 21072)
@@ -72,9 +72,9 @@
 	WM_operatortype_append(ACT_OT_snap);
 	WM_operatortype_append(ACT_OT_mirror);
 	WM_operatortype_append(ACT_OT_frame_jump);
-	WM_operatortype_append(ACT_OT_handle_type_set);
-	WM_operatortype_append(ACT_OT_interpolation_type_set);
-	WM_operatortype_append(ACT_OT_extrapolation_type_set);
+	WM_operatortype_append(ACT_OT_handle_type);
+	WM_operatortype_append(ACT_OT_interpolation_type);
+	WM_operatortype_append(ACT_OT_extrapolation_type);
 	WM_operatortype_append(ACT_OT_sample);
 	WM_operatortype_append(ACT_OT_clean);
 	WM_operatortype_append(ACT_OT_delete);
@@ -130,9 +130,9 @@
 	WM_keymap_add_item(keymap, "ACT_OT_mirror", MKEY, KM_PRESS, KM_SHIFT, 0);
 	
 		/* menu + set setting */
-	WM_keymap_add_item(keymap, "ACT_OT_handle_type_set", HKEY, KM_PRESS, 0, 0);
-	WM_keymap_add_item(keymap, "ACT_OT_interpolation_type_set", TKEY, KM_PRESS, KM_SHIFT, 0);
-	WM_keymap_add_item(keymap, "ACT_OT_extrapolation_type_set", EKEY, KM_PRESS, KM_SHIFT, 0); 
+	WM_keymap_add_item(keymap, "ACT_OT_handle_type", HKEY, KM_PRESS, 0, 0);
+	WM_keymap_add_item(keymap, "ACT_OT_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0);
+	WM_keymap_add_item(keymap, "ACT_OT_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0); 
 	
 		/* destructive */
 	WM_keymap_add_item(keymap, "ACT_OT_clean", OKEY, KM_PRESS, 0, 0);

Modified: branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_buttons.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_buttons.c	2009-06-22 04:10:59 UTC (rev 21071)
+++ branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_buttons.c	2009-06-22 04:23:06 UTC (rev 21072)
@@ -989,7 +989,7 @@
 	
 	/* 'add modifier' button at top of panel */
 	// XXX for now, this will be a operator button which calls a temporary 'add modifier' operator
-	uiDefButO(block, BUT, "GRAPHEDIT_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, "Add Modifier", 10, 225, 150, 20, "Adds a new F-Curve Modifier for the active F-Curve");
+	uiDefButO(block, BUT, "GRAPH_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, "Add Modifier", 10, 225, 150, 20, "Adds a new F-Curve Modifier for the active F-Curve");
 	
 	/* draw each modifier */
 	for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next)
@@ -1069,10 +1069,10 @@
 	return OPERATOR_FINISHED;
 }
 
-void GRAPHEDIT_OT_properties(wmOperatorType *ot)
+void GRAPH_OT_properties(wmOperatorType *ot)
 {
 	ot->name= "Properties";
-	ot->idname= "GRAPHEDIT_OT_properties";
+	ot->idname= "GRAPH_OT_properties";
 	
 	ot->exec= graph_properties;
 	ot->poll= ED_operator_ipo_active; // xxx

Modified: branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_edit.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_edit.c	2009-06-22 04:10:59 UTC (rev 21071)
+++ branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_edit.c	2009-06-22 04:23:06 UTC (rev 21072)
@@ -180,11 +180,11 @@
 	return OPERATOR_FINISHED;
 }
  
-void GRAPHEDIT_OT_previewrange_set (wmOperatorType *ot)
+void GRAPH_OT_previewrange_set (wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Auto-Set Preview Range";
-	ot->idname= "GRAPHEDIT_OT_previewrange_set";
+	ot->idname= "GRAPH_OT_previewrange_set";
 	
 	/* api callbacks */
 	ot->exec= graphkeys_previewrange_exec;
@@ -227,11 +227,11 @@
 	return OPERATOR_FINISHED;
 }
  
-void GRAPHEDIT_OT_view_all (wmOperatorType *ot)
+void GRAPH_OT_view_all (wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "View All";
-	ot->idname= "GRAPHEDIT_OT_view_all";
+	ot->idname= "GRAPH_OT_view_all";
 	
 	/* api callbacks */
 	ot->exec= graphkeys_viewall_exec;
@@ -334,11 +334,11 @@
 	return OPERATOR_FINISHED;
 }
  
-void GRAPHEDIT_OT_ghost_curves_create (wmOperatorType *ot)
+void GRAPH_OT_ghost_curves_create (wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Create Ghost Curves";
-	ot->idname= "GRAPHEDIT_OT_ghost_curves_create";
+	ot->idname= "GRAPH_OT_ghost_curves_create";
 	ot->description= "Create snapshot (Ghosts) of selected F-Curves as background aid for active Graph Editor.";
 	
 	/* api callbacks */
@@ -377,11 +377,11 @@
 	return OPERATOR_FINISHED;
 }
  
-void GRAPHEDIT_OT_ghost_curves_clear (wmOperatorType *ot)
+void GRAPH_OT_ghost_curves_clear (wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Create Ghost Curves";
-	ot->idname= "GRAPHEDIT_OT_ghost_curves_clear";
+	ot->idname= "GRAPH_OT_ghost_curves_clear";
 	ot->description= "Clear F-Curve snapshots (Ghosts) for active Graph Editor.";
 	
 	/* api callbacks */
@@ -461,11 +461,11 @@
 	return graphkeys_click_insert_exec(C, op);
 }
 
-void GRAPHEDIT_OT_keyframes_click_insert (wmOperatorType *ot)
+void GRAPH_OT_click_insert (wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Click-Insert Keyframes";
-	ot->idname= "GRAPHEDIT_OT_keyframes_click_insert";
+	ot->idname= "GRAPH_OT_click_insert";
 	
 	/* api callbacks */
 	ot->invoke= graphkeys_click_insert_invoke;
@@ -544,11 +544,11 @@
 	return OPERATOR_FINISHED;
 }
  
-void GRAPHEDIT_OT_keyframes_copy (wmOperatorType *ot)
+void GRAPH_OT_copy (wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Copy Keyframes";

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list