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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-07-13 15:15:57 +0300
committerBastien Montagne <bastien@blender.org>2020-07-13 15:29:54 +0300
commit03c8b048a166584a72ceff08432401cd7047648c (patch)
treeafa731d58a6965bd47612cdc4442c0694dfebb17 /source
parent9c9eb03d7840471173964b0f2758e2053bb700b4 (diff)
Cleanup: remove public unused function.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/include/ED_screen.h1
-rw-r--r--source/blender/editors/object/object_edit.c9
-rw-r--r--source/blender/editors/screen/screen_ops.c4
3 files changed, 3 insertions, 11 deletions
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index bc6a4b23609..43f3a578bfe 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -347,7 +347,6 @@ bool ED_operator_info_active(struct bContext *C);
bool ED_operator_console_active(struct bContext *C);
bool ED_operator_object_active(struct bContext *C);
-bool ED_operator_object_active_editable_ex(struct bContext *C, const Object *ob);
bool ED_operator_object_active_editable(struct bContext *C);
bool ED_operator_object_active_editable_mesh(struct bContext *C);
bool ED_operator_object_active_editable_font(struct bContext *C);
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 04113f70e52..49d80bc15ee 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1463,13 +1463,6 @@ static const EnumPropertyItem *object_mode_set_itemsf(bContext *C,
return item;
}
-static bool object_mode_set_poll(bContext *C)
-{
- /* Needed as #ED_operator_object_active_editable doesn't call use 'active_object'. */
- Object *ob = CTX_data_active_object(C);
- return ED_operator_object_active_editable_ex(C, ob);
-}
-
static int object_mode_set_exec(bContext *C, wmOperator *op)
{
const bool use_submode = STREQ(op->idname, "OBJECT_OT_mode_set_with_submode");
@@ -1574,7 +1567,7 @@ void OBJECT_OT_mode_set(wmOperatorType *ot)
/* api callbacks */
ot->exec = object_mode_set_exec;
- ot->poll = object_mode_set_poll;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
ot->flag = 0; /* no register/undo here, leave it to operators being called */
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index f32dd0c8703..cd612c35a36 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -349,7 +349,7 @@ bool ED_operator_object_active(bContext *C)
return ((ob != NULL) && !ed_object_hidden(ob));
}
-bool ED_operator_object_active_editable_ex(bContext *UNUSED(C), const Object *ob)
+static bool operator_object_active_editable_ex(const Object *ob)
{
return ((ob != NULL) && !ID_IS_LINKED(ob) && !ed_object_hidden(ob));
}
@@ -357,7 +357,7 @@ bool ED_operator_object_active_editable_ex(bContext *UNUSED(C), const Object *ob
bool ED_operator_object_active_editable(bContext *C)
{
Object *ob = ED_object_active_context(C);
- return ED_operator_object_active_editable_ex(C, ob);
+ return operator_object_active_editable_ex(ob);
}
bool ED_operator_object_active_editable_mesh(bContext *C)