From 5272991e8b91c527fbe3923d75ae2c5148dd7177 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 15 Jan 2010 22:40:33 +0000 Subject: generic operator menu was searching for "type" and using the first enum property if it wasnt found. this is too arbitrary and could break if roperty order is changed. store the property in the operator type that is to be used for menu and enum search func's. python function for searching operator enums on invoke. (just need dynamic python enums now) wm.invoke_search_popup(self) --- source/blender/editors/space_graph/graph_edit.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/space_graph') diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 2adf783b338..db63499d645 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -497,7 +497,7 @@ void GRAPH_OT_keyframe_insert (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_enum(ot->srna, "type", prop_graphkeys_insertkey_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_insertkey_types, 0, "Type", ""); } /* ******************** Click-Insert Keyframes Operator ************************* */ @@ -1270,7 +1270,7 @@ void GRAPH_OT_extrapolation_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_enum(ot->srna, "type", prop_graphkeys_expo_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_expo_types, 0, "Type", ""); } /* ******************** Set Interpolation-Type Operator *********************** */ @@ -1339,7 +1339,7 @@ void GRAPH_OT_interpolation_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", ""); } /* ******************** Set Handle-Type Operator *********************** */ @@ -1427,7 +1427,7 @@ void GRAPH_OT_handle_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_enum(ot->srna, "type", beztriple_handle_type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", beztriple_handle_type_items, 0, "Type", ""); } /* ************************************************************************** */ @@ -1697,7 +1697,7 @@ void GRAPH_OT_snap (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_enum(ot->srna, "type", prop_graphkeys_snap_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_snap_types, 0, "Type", ""); } /* ******************** Mirror Keyframes Operator *********************** */ @@ -1814,7 +1814,7 @@ void GRAPH_OT_mirror (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_enum(ot->srna, "type", prop_graphkeys_mirror_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_mirror_types, 0, "Type", ""); } /* ******************** Smooth Keyframes Operator *********************** */ -- cgit v1.2.3