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/console.py20
-rw-r--r--release/scripts/startup/bl_operators/freestyle.py1
-rw-r--r--source/blender/editors/animation/drivers.c8
-rw-r--r--source/blender/editors/animation/keyframing.c6
-rw-r--r--source/blender/editors/space_image/image_ops.c2
-rw-r--r--source/blender/editors/space_logic/logic_ops.c18
6 files changed, 38 insertions, 17 deletions
diff --git a/release/scripts/startup/bl_operators/console.py b/release/scripts/startup/bl_operators/console.py
index 307165a4d18..2670a762cb5 100644
--- a/release/scripts/startup/bl_operators/console.py
+++ b/release/scripts/startup/bl_operators/console.py
@@ -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
diff --git a/release/scripts/startup/bl_operators/freestyle.py b/release/scripts/startup/bl_operators/freestyle.py
index 2be41882d62..90e79439f35 100644
--- a/release/scripts/startup/bl_operators/freestyle.py
+++ b/release/scripts/startup/bl_operators/freestyle.py
@@ -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"),
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index ef15e254048..8c49bee3058 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -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;
}
/* ************************************************** */
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index d1df93f49f5..c7c034da45b 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -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");
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 4a78c54e9c0..96b45732433 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -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 ********************/
diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c
index 5f2ecbf1b2b..a85fec7bf87 100644
--- a/source/blender/editors/space_logic/logic_ops.c
+++ b/source/blender/editors/space_logic/logic_ops.c
@@ -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);