Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/startup/bl_operators/wm.py29
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/util/undo.c2
-rw-r--r--source/blender/makesrna/intern/rna_wm.c3
-rw-r--r--source/blender/windowmanager/WM_types.h4
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c7
6 files changed, 30 insertions, 17 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 3f4a061c4ac..fcc30ecbb4b 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -106,7 +106,7 @@ class WM_OT_context_set_boolean(bpy.types.Operator):
'''Set a context value.'''
bl_idname = "wm.context_set_boolean"
bl_label = "Context Set Boolean"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
value = BoolProperty(name="Value",
@@ -119,7 +119,7 @@ class WM_OT_context_set_int(bpy.types.Operator): # same as enum
'''Set a context value.'''
bl_idname = "wm.context_set_int"
bl_label = "Context Set"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
value = IntProperty(name="Value", description="Assign value", default=0)
@@ -132,7 +132,7 @@ class WM_OT_context_scale_int(bpy.types.Operator):
'''Scale an int context value.'''
bl_idname = "wm.context_scale_int"
bl_label = "Context Set"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
value = FloatProperty(name="Value", description="Assign value", default=1.0)
@@ -168,7 +168,7 @@ class WM_OT_context_set_float(bpy.types.Operator): # same as enum
'''Set a context value.'''
bl_idname = "wm.context_set_float"
bl_label = "Context Set Float"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
value = FloatProperty(name="Value",
@@ -182,7 +182,7 @@ class WM_OT_context_set_string(bpy.types.Operator): # same as enum
'''Set a context value.'''
bl_idname = "wm.context_set_string"
bl_label = "Context Set String"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
value = StringProperty(name="Value",
@@ -195,7 +195,7 @@ class WM_OT_context_set_enum(bpy.types.Operator):
'''Set a context value.'''
bl_idname = "wm.context_set_enum"
bl_label = "Context Set Enum"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
value = StringProperty(name="Value",
@@ -209,7 +209,7 @@ class WM_OT_context_set_value(bpy.types.Operator):
'''Set a context value.'''
bl_idname = "wm.context_set_value"
bl_label = "Context Set Value"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
value = StringProperty(name="Value",
@@ -227,7 +227,7 @@ class WM_OT_context_toggle(bpy.types.Operator):
'''Toggle a context value.'''
bl_idname = "wm.context_toggle"
bl_label = "Context Toggle"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
@@ -246,7 +246,7 @@ class WM_OT_context_toggle_enum(bpy.types.Operator):
'''Toggle a context value.'''
bl_idname = "wm.context_toggle_enum"
bl_label = "Context Toggle Values"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
value_1 = StringProperty(name="Value", \
@@ -273,7 +273,7 @@ class WM_OT_context_cycle_int(bpy.types.Operator):
'''vertex keys, groups' etc.'''
bl_idname = "wm.context_cycle_int"
bl_label = "Context Int Cycle"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
reverse = rna_reverse_prop
@@ -307,7 +307,7 @@ class WM_OT_context_cycle_enum(bpy.types.Operator):
'''Toggle a context value.'''
bl_idname = "wm.context_cycle_enum"
bl_label = "Context Enum Cycle"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
reverse = rna_reverse_prop
@@ -360,7 +360,7 @@ class WM_OT_context_cycle_array(bpy.types.Operator):
Useful for cycling the active mesh edit mode.'''
bl_idname = "wm.context_cycle_array"
bl_label = "Context Array Cycle"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
reverse = rna_reverse_prop
@@ -406,7 +406,7 @@ class WM_MT_context_menu_enum(bpy.types.Menu):
class WM_OT_context_menu_enum(bpy.types.Operator):
bl_idname = "wm.context_menu_enum"
bl_label = "Context Enum Menu"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
def execute(self, context):
@@ -420,7 +420,7 @@ class WM_OT_context_set_id(bpy.types.Operator):
'''Toggle a context value.'''
bl_idname = "wm.context_set_id"
bl_label = "Set Library ID"
- bl_options = {'UNDO'}
+ bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
value = StringProperty(name="Value",
@@ -462,6 +462,7 @@ class WM_OT_context_modal_mouse(bpy.types.Operator):
'''Adjust arbitrary values with mouse input'''
bl_idname = "wm.context_modal_mouse"
bl_label = "Context Modal Mouse"
+ bl_options = {'INTERNAL'}
data_path_iter = StringProperty(description="The data path relative to the context, must point to an iterable.")
data_path_item = StringProperty(description="The data path from each iterable to the value (int or float)")
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");
}