[Bf-blender-cvs] [d2548f5] master: WM: hide screen management and ndof operators from seach popup

Campbell Barton noreply at git.blender.org
Wed Feb 26 03:50:02 CET 2014


Commit: d2548f561cd6499f22e4710fdddeab606b726af5
Author: Campbell Barton
Date:   Wed Feb 26 13:48:41 2014 +1100
https://developer.blender.org/rBd2548f561cd6499f22e4710fdddeab606b726af5

WM: hide screen management and ndof operators from seach popup

===================================================================

M	release/scripts/startup/bl_operators/wm.py
M	source/blender/editors/interface/view2d_ops.c
M	source/blender/editors/screen/screen_ops.c
M	source/blender/editors/space_clip/clip_ops.c
M	source/blender/editors/space_image/image_ops.c
M	source/blender/editors/space_script/script_edit.c

===================================================================

diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 5dadf77..3fdde1a 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -757,6 +757,7 @@ class WM_OT_url_open(Operator):
     "Open a website in the web-browser"
     bl_idname = "wm.url_open"
     bl_label = ""
+    bl_options = {'INTERNAL'}
 
     url = StringProperty(
             name="URL",
@@ -773,6 +774,7 @@ class WM_OT_path_open(Operator):
     "Open a path in a file browser"
     bl_idname = "wm.path_open"
     bl_label = ""
+    bl_options = {'INTERNAL'}
 
     filepath = StringProperty(
             subtype='FILE_PATH',
@@ -2019,6 +2021,7 @@ class WM_OT_addon_expand(Operator):
     "Display more information on this addon"
     bl_idname = "wm.addon_expand"
     bl_label = ""
+    bl_options = {'INTERNAL'}
 
     module = StringProperty(
             name="Module",
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 1f63ad8..d3236f6 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1323,6 +1323,7 @@ static void VIEW2D_OT_ndof(wmOperatorType *ot)
 
 	/* api callbacks */
 	ot->invoke = view2d_ndof_invoke;
+	ot->poll = view2d_poll;
 
 	/* flags */
 	ot->flag = OPTYPE_LOCK_BYPASS;
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index aa5d9ef..2cb28eb 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -776,7 +776,8 @@ static void SCREEN_OT_actionzone(wmOperatorType *ot)
 	ot->poll = actionzone_area_poll;
 	ot->cancel = actionzone_cancel;
 	
-	ot->flag = OPTYPE_BLOCKING;
+	/* flags */
+	ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;
 	
 	RNA_def_int(ot->srna, "modifier", 0, 0, 2, "Modifier", "Modifier state", 0, 2);
 }
@@ -1251,7 +1252,8 @@ static void SCREEN_OT_area_move(wmOperatorType *ot)
 	ot->modal = area_move_modal;
 	ot->poll = ED_operator_screen_mainwinactive; /* when mouse is over area-edge */
 	
-	ot->flag = OPTYPE_BLOCKING;
+	/* flags */
+	ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;
 	
 	/* rna */
 	RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
@@ -1703,7 +1705,9 @@ static void SCREEN_OT_area_split(wmOperatorType *ot)
 	ot->cancel = area_split_cancel;
 	
 	ot->poll = screen_active_editable;
-	ot->flag = OPTYPE_BLOCKING;
+
+	/* flags */
+	ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;
 	
 	/* rna */
 	RNA_def_enum(ot->srna, "direction", prop_direction_items, 'h', "Direction", "");
@@ -1973,7 +1977,8 @@ static void SCREEN_OT_region_scale(wmOperatorType *ot)
 	
 	ot->poll = ED_operator_areaactive;
 	
-	ot->flag = OPTYPE_BLOCKING;
+	/* flags */
+	ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;
 }
 
 
@@ -2287,7 +2292,7 @@ static void SCREEN_OT_screen_set(wmOperatorType *ot)
 	
 	ot->exec = screen_set_exec;
 	ot->poll = ED_operator_screenactive;
-	
+
 	/* rna */
 	RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX);
 }
@@ -2611,6 +2616,7 @@ static void SCREEN_OT_area_join(wmOperatorType *ot)
 	ot->poll = screen_active_editable;
 	ot->cancel = area_join_cancel;
 	
+	/* flags */
 	ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;
 	
 	/* rna */
@@ -2673,6 +2679,9 @@ static void SCREEN_OT_area_options(wmOperatorType *ot)
 	ot->invoke = screen_area_options_invoke;
 	
 	ot->poll = ED_operator_screen_mainwinactive;
+
+	/* flags */
+	ot->flag = OPTYPE_INTERNAL;
 }
 
 
@@ -3860,7 +3869,7 @@ static void SCREEN_OT_region_blend(wmOperatorType *ot)
 	ot->invoke = region_blend_invoke;
 	
 	/* flags */
-	ot->flag = 0;
+	ot->flag = OPTYPE_INTERNAL;
 	
 	/* properties */
 }
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 7ee94fe..7a6c426 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -1362,6 +1362,7 @@ void CLIP_OT_view_ndof(wmOperatorType *ot)
 
 	/* api callbacks */
 	ot->invoke = clip_view_ndof_invoke;
+	ot->poll = ED_space_clip_view_clip_poll;
 }
 
 /********************** Prefetch operator *********************/
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index de1dfff..90e308e 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -628,6 +628,7 @@ void IMAGE_OT_view_ndof(wmOperatorType *ot)
 	
 	/* api callbacks */
 	ot->invoke = image_view_ndof_invoke;
+	ot->poll = space_image_main_area_poll;
 
 	/* flags */
 	ot->flag = OPTYPE_LOCK_BYPASS;
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index 5754af2..9077d0c 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -83,6 +83,8 @@ void SCRIPT_OT_python_file_run(wmOperatorType *ot)
 	ot->exec = run_pyfile_exec;
 	ot->poll = ED_operator_areaactive;
 
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
+
 	RNA_def_string_file_path(ot->srna, "filepath", NULL, FILE_MAX, "Path", "");
 }




More information about the Bf-blender-cvs mailing list