[Bf-blender-cvs] [d2b15b0] master: Fix T38590: some material operators incorrectly appeared in the spacebar search menu.

Brecht Van Lommel noreply at git.blender.org
Tue Feb 11 16:10:53 CET 2014


Commit: d2b15b0a8c4af1232e9c196623f56c22f9f9c4a3
Author: Brecht Van Lommel
Date:   Tue Feb 11 15:20:30 2014 +0100
https://developer.blender.org/rBd2b15b0a8c4af1232e9c196623f56c22f9f9c4a3

Fix T38590: some material operators incorrectly appeared in the spacebar search menu.

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

M	source/blender/editors/render/render_shading.c

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

diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 066195d..59fd7c0 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -127,7 +127,7 @@ void OBJECT_OT_material_slot_add(wmOperatorType *ot)
 	ot->poll = ED_operator_object_active_editable;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int material_slot_remove_exec(bContext *C, wmOperator *op)
@@ -164,7 +164,7 @@ void OBJECT_OT_material_slot_remove(wmOperatorType *ot)
 	ot->poll = ED_operator_object_active_editable;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op))
@@ -226,7 +226,7 @@ void OBJECT_OT_material_slot_assign(wmOperatorType *ot)
 	ot->poll = ED_operator_object_active_editable;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int material_slot_de_select(bContext *C, int select)
@@ -309,7 +309,7 @@ void OBJECT_OT_material_slot_select(wmOperatorType *ot)
 	ot->exec = material_slot_select_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int material_slot_deselect_exec(bContext *C, wmOperator *UNUSED(op))
@@ -328,7 +328,7 @@ void OBJECT_OT_material_slot_deselect(wmOperatorType *ot)
 	ot->exec = material_slot_deselect_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 
@@ -370,7 +370,7 @@ void OBJECT_OT_material_slot_copy(wmOperatorType *ot)
 	ot->exec = material_slot_copy_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 /********************** new material operator *********************/
@@ -425,7 +425,7 @@ void MATERIAL_OT_new(wmOperatorType *ot)
 	ot->exec = new_material_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 /********************** new texture operator *********************/
@@ -474,7 +474,7 @@ void TEXTURE_OT_new(wmOperatorType *ot)
 	ot->exec = new_texture_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 /********************** new world operator *********************/
@@ -529,7 +529,7 @@ void WORLD_OT_new(wmOperatorType *ot)
 	ot->exec = new_world_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 /********************** render layer operators *********************/
@@ -557,7 +557,7 @@ void SCENE_OT_render_layer_add(wmOperatorType *ot)
 	ot->exec = render_layer_add_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op))
@@ -584,7 +584,7 @@ void SCENE_OT_render_layer_remove(wmOperatorType *ot)
 	ot->exec = render_layer_remove_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 #ifdef WITH_FREESTYLE
@@ -634,7 +634,7 @@ void SCENE_OT_freestyle_module_add(wmOperatorType *ot)
 	ot->exec = freestyle_module_add_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int freestyle_module_remove_exec(bContext *C, wmOperator *UNUSED(op))
@@ -663,7 +663,7 @@ void SCENE_OT_freestyle_module_remove(wmOperatorType *ot)
 	ot->exec = freestyle_module_remove_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int freestyle_module_move_exec(bContext *C, wmOperator *op)
@@ -703,7 +703,7 @@ void SCENE_OT_freestyle_module_move(wmOperatorType *ot)
 	ot->exec = freestyle_module_move_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 
 	/* props */
 	RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to move, UP or DOWN");
@@ -732,7 +732,7 @@ void SCENE_OT_freestyle_lineset_add(wmOperatorType *ot)
 	ot->exec = freestyle_lineset_add_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int freestyle_active_lineset_poll(bContext *C)
@@ -771,7 +771,7 @@ void SCENE_OT_freestyle_lineset_copy(wmOperatorType *ot)
 	ot->poll = freestyle_active_lineset_poll;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int freestyle_lineset_paste_exec(bContext *C, wmOperator *UNUSED(op))
@@ -798,7 +798,7 @@ void SCENE_OT_freestyle_lineset_paste(wmOperatorType *ot)
 	ot->poll = freestyle_active_lineset_poll;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int freestyle_lineset_remove_exec(bContext *C, wmOperator *UNUSED(op))
@@ -825,7 +825,7 @@ void SCENE_OT_freestyle_lineset_remove(wmOperatorType *ot)
 	ot->poll = freestyle_active_lineset_poll;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int freestyle_lineset_move_exec(bContext *C, wmOperator *op)
@@ -863,7 +863,7 @@ void SCENE_OT_freestyle_lineset_move(wmOperatorType *ot)
 	ot->poll = freestyle_active_lineset_poll;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 
 	/* props */
 	RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to move, UP or DOWN");
@@ -904,7 +904,7 @@ void SCENE_OT_freestyle_linestyle_new(wmOperatorType *ot)
 	ot->poll = freestyle_active_lineset_poll;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int freestyle_color_modifier_add_exec(bContext *C, wmOperator *op)
@@ -940,7 +940,7 @@ void SCENE_OT_freestyle_color_modifier_add(wmOperatorType *ot)
 	ot->poll = freestyle_active_lineset_poll;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 
 	/* properties */
 	ot->prop = RNA_def_enum(ot->srna, "type", linestyle_color_modifier_type_items, 0, "Type", "");
@@ -979,7 +979,7 @@ void SCENE_OT_freestyle_alpha_modifier_add(wmOperatorType *ot)
 	ot->poll = freestyle_active_lineset_poll;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 
 	/* properties */
 	ot->prop = RNA_def_enum(ot->srna, "type", linestyle_alpha_modifier_type_items, 0, "Type", "");
@@ -1018,7 +1018,7 @@ void SCENE_OT_freestyle_thickness_modifier_add(wmOperatorType *ot)
 	ot->poll = freestyle_active_lineset_poll;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 
 	/* properties */
 	ot->prop = RNA_def_enum(ot->srna, "type", linestyle_thickness_modifier_type_items, 0, "Type", "");
@@ -1057,7 +1057,7 @@ void SCENE_OT_freestyle_geometry_modifier_add(wmOperatorType *ot)
 	ot->poll = freestyle_active_lineset_poll;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 
 	/* properties */
 	ot->prop = RNA_def_enum(ot->srna, "type", linestyle_geometry_modifier_type_items, 0, "Type", "");
@@ -1122,7 +1122,7 @@ void SCENE_OT_freestyle_modifier_remove(wmOperatorType *ot)
 	ot->poll = freestyle_active_lineset_poll;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int freestyle_modifier_copy_exec(bContext *C, wmOperator *op)
@@ -1171,7 +1171,7 @@ void SCENE_OT_freestyle_modifier_copy(wmOperatorType *ot)
 	ot->poll = freestyle_active_lineset_poll;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int freestyle_modifier_move_exec(bContext *C, wmOperator *op)
@@ -1227,7 +1227,7 @@ void SCENE_OT_freestyle_modifier_move(wmOperatorType *ot)
 	ot->poll = freestyle_active_lineset_poll;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 
 	/* props */
 	RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to move, UP or DOWN");
@@ -1316,7 +1316,7 @@ void TEXTURE_OT_slot_move(wmOperatorType *ot)
 	ot->exec = texture_slot_move_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 
 	RNA_def_enum(ot->srna, "type", slot_move, 0, "Type", "");
 }
@@ -1409,7 +1409,7 @@ void TEXTURE_OT_envmap_save(wmOperatorType *ot)
 	ot->poll = envmap_save_poll;
 	
 	/* flags */
-	ot->flag = OPTYPE_REGISTER; /* no undo since this doesnt modify the env-map */
+	ot->flag = OPTYPE_REGISTER | OPTYPE_INTERNAL; /* no undo since this doesnt modify the env-map */
 	
 	/* properties */
 	prop = RNA_def_float_array(ot->srna, "layout", 12, default_envmap_layout, 0.0f, 0.0f,
@@ -1460,7 +1460,7 @@ void TEXTURE_OT_envmap_clear(wmOperatorType *ot)
 	ot->poll = envmap_clear_poll;
 	
 	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
 static int envmap_clear_all_exec(bContext *C, wmOperator *UNUSED(op))
@@ -1518,7 +1518,7 @@ void MATERIAL_OT_copy(wmOperatorType *ot)
 	ot->exec = copy_material_exec;
 
 	/* flags */
-	ot->flag = OPTYPE_REGISTER; /* no undo needed since no changes are made to the material */
+	ot->flag = OPTYPE_REGISTER | OPTYPE_INTERNAL; /* no undo needed sinc

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list