forked from bartvdbraak/blender
Fix a few more cases where an operator should not show in the search menu.
This commit is contained in:
parent
0731932eb8
commit
e77729f5dd
@ -34,6 +34,10 @@ class ConsoleExec(Operator):
|
||||
bl_idname = "console.execute"
|
||||
bl_label = "Console Execute"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (context.area and context.area.type == 'CONSOLE')
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
|
||||
@ -54,6 +58,10 @@ class ConsoleAutocomplete(Operator):
|
||||
bl_idname = "console.autocomplete"
|
||||
bl_label = "Console Autocomplete"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (context.area and context.area.type == 'CONSOLE')
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
module = _lang_module_get(sc)
|
||||
@ -72,6 +80,10 @@ class ConsoleCopyAsScript(Operator):
|
||||
bl_idname = "console.copy_as_script"
|
||||
bl_label = "Copy to Clipboard (as script)"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (context.area and context.area.type == 'CONSOLE')
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
|
||||
@ -91,6 +103,10 @@ class ConsoleBanner(Operator):
|
||||
bl_idname = "console.banner"
|
||||
bl_label = "Console Banner"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (context.area and context.area.type == 'CONSOLE')
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
|
||||
@ -119,6 +135,10 @@ class ConsoleLanguage(Operator):
|
||||
maxlen=32,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (context.area and context.area.type == 'CONSOLE')
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
|
||||
|
@ -27,6 +27,7 @@ class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator):
|
||||
"""(either a user-specified object or the active camera)"""
|
||||
bl_idname = "scene.freestyle_fill_range_by_selection"
|
||||
bl_label = "Fill Range by Selection"
|
||||
bl_options = {'INTERNAL'}
|
||||
|
||||
type = EnumProperty(name="Type", description="Type of the modifier to work on",
|
||||
items=(("COLOR", "Color", "Color modifier type"),
|
||||
|
@ -513,7 +513,7 @@ void ANIM_OT_driver_button_add(wmOperatorType *ot)
|
||||
//op->poll = ??? // TODO: need to have some animatable property to do this
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
|
||||
/* properties */
|
||||
RNA_def_boolean(ot->srna, "all", 1, "All", "Create drivers for all elements of the array");
|
||||
@ -563,7 +563,7 @@ void ANIM_OT_driver_button_remove(wmOperatorType *ot)
|
||||
//op->poll = ??? // TODO: need to have some driver to be able to do this...
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
|
||||
/* properties */
|
||||
RNA_def_boolean(ot->srna, "all", 1, "All", "Delete drivers for all elements of the array");
|
||||
@ -610,7 +610,7 @@ void ANIM_OT_copy_driver_button(wmOperatorType *ot)
|
||||
//op->poll = ??? // TODO: need to have some driver to be able to do this...
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
}
|
||||
|
||||
/* Paste Driver Button Operator ------------------------ */
|
||||
@ -654,7 +654,7 @@ void ANIM_OT_paste_driver_button(wmOperatorType *ot)
|
||||
//op->poll = ??? // TODO: need to have some driver to be able to do this...
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
}
|
||||
|
||||
/* ************************************************** */
|
||||
|
@ -1663,7 +1663,7 @@ void ANIM_OT_keyframe_insert_button(wmOperatorType *ot)
|
||||
ot->poll = modify_key_op_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
|
||||
/* properties */
|
||||
RNA_def_boolean(ot->srna, "all", 1, "All", "Insert a keyframe for all element of the array");
|
||||
@ -1733,7 +1733,7 @@ void ANIM_OT_keyframe_delete_button(wmOperatorType *ot)
|
||||
ot->poll = modify_key_op_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
|
||||
/* properties */
|
||||
RNA_def_boolean(ot->srna, "all", 1, "All", "Delete keyframes from all elements of the array");
|
||||
@ -1802,7 +1802,7 @@ void ANIM_OT_keyframe_clear_button(wmOperatorType *ot)
|
||||
ot->poll = modify_key_op_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
|
||||
/* properties */
|
||||
RNA_def_boolean(ot->srna, "all", 1, "All", "Clear keyframes from all elements of the array");
|
||||
|
@ -1091,7 +1091,7 @@ void IMAGE_OT_match_movie_length(wmOperatorType *ot)
|
||||
ot->exec = image_match_len_exec;
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER /* | OPTYPE_UNDO */; /* Don't think we need undo for that. */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_INTERNAL/* | OPTYPE_UNDO */; /* Don't think we need undo for that. */
|
||||
}
|
||||
|
||||
/******************** replace image operator ********************/
|
||||
|
@ -269,7 +269,7 @@ static void LOGIC_OT_sensor_remove(wmOperatorType *ot)
|
||||
ot->poll = edit_sensor_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
edit_sensor_properties(ot);
|
||||
}
|
||||
|
||||
@ -326,7 +326,7 @@ static void LOGIC_OT_sensor_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;
|
||||
|
||||
/* properties */
|
||||
ot->prop = prop = RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, SENS_ALWAYS, "Type", "Type of sensor to add");
|
||||
@ -375,7 +375,7 @@ static void LOGIC_OT_controller_remove(wmOperatorType *ot)
|
||||
ot->poll = edit_controller_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
edit_controller_properties(ot);
|
||||
}
|
||||
|
||||
@ -446,7 +446,7 @@ static void LOGIC_OT_controller_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;
|
||||
|
||||
/* properties */
|
||||
ot->prop = RNA_def_enum(ot->srna, "type", controller_type_items, CONT_LOGIC_AND, "Type", "Type of controller to add");
|
||||
@ -494,7 +494,7 @@ static void LOGIC_OT_actuator_remove(wmOperatorType *ot)
|
||||
ot->poll = edit_actuator_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
edit_actuator_properties(ot);
|
||||
}
|
||||
|
||||
@ -551,7 +551,7 @@ static void LOGIC_OT_actuator_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;
|
||||
|
||||
/* properties */
|
||||
ot->prop = prop = RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, CONT_LOGIC_AND, "Type", "Type of actuator to add");
|
||||
@ -608,7 +608,7 @@ static void LOGIC_OT_sensor_move(wmOperatorType *ot)
|
||||
ot->poll = edit_sensor_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
|
||||
/* properties */
|
||||
edit_sensor_properties(ot);
|
||||
@ -653,7 +653,7 @@ static void LOGIC_OT_controller_move(wmOperatorType *ot)
|
||||
ot->poll = edit_controller_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
|
||||
/* properties */
|
||||
edit_controller_properties(ot);
|
||||
@ -698,7 +698,7 @@ static void LOGIC_OT_actuator_move(wmOperatorType *ot)
|
||||
ot->poll = edit_actuator_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
|
||||
/* properties */
|
||||
edit_actuator_properties(ot);
|
||||
|
Loading…
Reference in New Issue
Block a user