diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-06 15:56:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-06 15:56:54 +0400 |
commit | fc6dcdf17f6f3c313a9c15fbfd38754edbf8ab64 (patch) | |
tree | c12ed169d40b0b133230d1afd484cb72be07a2ff /source/blender | |
parent | a43309e8d4fc09d31acb4030b13f1c22c9ddf22a (diff) |
bug [#27582] Screen Editing > Split and Join area don't work.
added 'INTERNAL' operator flag so operators which are only meant to be called by other operators or internal use are not displayed to the user.
Currently only use this flag for the operator search toolbox, is ignored in debug mode.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/util/undo.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 3 | ||||
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 7 |
5 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 4e67069185e..f016fb6822a 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2277,7 +2277,7 @@ static void SCREEN_OT_area_join(wmOperatorType *ot) ot->poll= screen_active_editable; ot->cancel= area_join_cancel; - ot->flag= OPTYPE_BLOCKING; + ot->flag= OPTYPE_BLOCKING|OPTYPE_INTERNAL; /* rna */ RNA_def_int(ot->srna, "min_x", -100, INT_MIN, INT_MAX, "X 1", "", INT_MIN, INT_MAX); diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 692a19a7198..24a868891de 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -307,6 +307,8 @@ void ED_OT_undo_push(wmOperatorType *ot) /* api callbacks */ ot->exec= ed_undo_push_exec; + ot->flag= OPTYPE_INTERNAL; + RNA_def_string(ot->srna, "message", "Add an undo step *function may be moved*", MAXUNDONAME, "Undo Message", ""); } diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 406ee6b3f3e..fc3039c8752 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -272,10 +272,11 @@ EnumPropertyItem keymap_modifiers_items[] = { EnumPropertyItem operator_flag_items[] = { {OPTYPE_REGISTER, "REGISTER", 0, "Register", ""}, {OPTYPE_UNDO, "UNDO", 0, "Undo", ""}, - {OPTYPE_BLOCKING, "BLOCKING", 0, "Finished", ""}, + {OPTYPE_BLOCKING, "BLOCKING", 0, "Blocking", ""}, {OPTYPE_MACRO, "MACRO", 0, "Macro", ""}, {OPTYPE_GRAB_POINTER, "GRAB_POINTER", 0, "Grab Pointer", ""}, {OPTYPE_PRESET, "PRESET", 0, "Preset", ""}, + {OPTYPE_INTERNAL, "INTERNAL", 0, "Internal", ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem operator_return_items[] = { diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index ab68c6ef4d4..49bd3ede37d 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -61,6 +61,10 @@ struct ImBuf; #define OPTYPE_MACRO 8 #define OPTYPE_GRAB_POINTER 16 /* */ #define OPTYPE_PRESET 32 /* show preset menu */ +#define OPTYPE_INTERNAL 64 /* some operators are mainly for internal use + * and don't make sense to be accessed from the + * search menu, even if poll() returns TRUE. + * currently only used for the search toolbox */ /* context to call operator in for WM_operator_name_call */ /* rna_ui.c contains EnumPropertyItem's of these, keep in sync */ diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 07739982763..1b7333024e7 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1277,7 +1277,10 @@ static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), cons wmOperatorType *ot = WM_operatortype_first(); for(; ot; ot= ot->next) { - + + if((ot->flag & OPTYPE_INTERNAL) && (G.f & G_DEBUG) == 0) + continue; + if(BLI_strcasestr(ot->name, str)) { if(WM_operator_poll((bContext*)C, ot)) { char name[256]; @@ -1389,6 +1392,8 @@ static void WM_OT_call_menu(wmOperatorType *ot) ot->exec= wm_call_menu_exec; ot->poll= WM_operator_winactive; + ot->flag= OPTYPE_INTERNAL; + RNA_def_string(ot->srna, "name", "", BKE_ST_MAXNAME, "Name", "Name of the menu"); } |