From 2f72b91a54faa7cfbdfd97eff608c8911df1d221 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 7 Feb 2010 23:39:44 +0000 Subject: Operator Execution Contexts Bugfix: This commit adds a few more execution contexts for operators, given the increasing tendency for some special regiontypes to exist within areas that must have their own set of special operators. Examples of these include the "channel" operators in the Animation Editors (i.e. those in the 'Channels' menu), and the "Fit to Preview Window" operator for the Sequencer. Previously, operators such as these would not function when clicked on from the menus, and they would not show the hotkeys they were mapped to. Also, fixed a few operator definitions in the Animation Editors which were missing ot->prop defines. This meant that some hotkeys (mainly selection) were shown incorrectly in the menus. --- source/blender/editors/space_action/action_edit.c | 2 +- source/blender/editors/space_action/action_select.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_action') diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 22f5989f3aa..d91f2788ecd 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -733,7 +733,7 @@ void ACTION_OT_clean (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 1000.0f); + ot->prop= RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 1000.0f); } /* ******************** Sample Keyframes Operator *********************** */ diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 1939057b654..c22533f9d45 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -196,7 +196,7 @@ void ACTION_OT_select_all_toggle (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "invert", 0, "Invert", ""); + ot->prop= RNA_def_boolean(ot->srna, "invert", 0, "Invert", ""); } /* ******************** Border Select Operator **************************** */ @@ -362,7 +362,7 @@ void ACTION_OT_select_border(wmOperatorType *ot) /* rna */ WM_operator_properties_gesture_border(ot, FALSE); - RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); + ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); } /* ******************** Column Select Operator **************************** */ @@ -571,7 +571,7 @@ void ACTION_OT_select_column (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", ""); + ot->prop= RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", ""); } /* ******************** Select More/Less Operators *********************** */ -- cgit v1.2.3