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:
authorDalai Felinto <dfelinto@gmail.com>2018-05-31 15:27:34 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-05-31 15:52:05 +0300
commitd0af8edcd12a4b3bebd1bd202eebdb36b3c21141 (patch)
treeb39c094dc4f96da73833e5d49e6a442e09c68361 /source/blender/editors
parenteaad4caa569c979773141a15714264a46da73798 (diff)
Outliner: Expose collections editors poll in ED_outliner.h
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/include/ED_outliner.h5
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c16
2 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/editors/include/ED_outliner.h b/source/blender/editors/include/ED_outliner.h
index 73ee2542247..bb4730fab52 100644
--- a/source/blender/editors/include/ED_outliner.h
+++ b/source/blender/editors/include/ED_outliner.h
@@ -27,4 +27,9 @@
#ifndef __ED_OUTLINER_H__
#define __ED_OUTLINER_H__
+struct bContext;
+struct ListBase;
+
+int ED_outliner_collections_editor_poll(struct bContext *C);
+
#endif /* __ED_OUTLINER_H__ */
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index 50df124bf22..ff8868d87e7 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -101,7 +101,7 @@ Collection *outliner_collection_from_tree_element(const TreeElement *te)
/* -------------------------------------------------------------------- */
/* Poll functions. */
-static int collections_editor_poll(bContext *C)
+int ED_outliner_collections_editor_poll(bContext *C)
{
SpaceOops *so = CTX_wm_space_outliner(C);
return (so != NULL) && ELEM(so->outlinevis, SO_VIEW_LAYER, SO_SCENES, SO_LIBRARIES);
@@ -178,7 +178,7 @@ void OUTLINER_OT_collection_new(wmOperatorType *ot)
/* api callbacks */
ot->exec = collection_new_exec;
- ot->poll = collections_editor_poll;
+ ot->poll = ED_outliner_collections_editor_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -261,7 +261,7 @@ void OUTLINER_OT_collection_delete(wmOperatorType *ot)
/* api callbacks */
ot->exec = collection_delete_exec;
- ot->poll = collections_editor_poll;
+ ot->poll = ED_outliner_collections_editor_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -333,7 +333,7 @@ void OUTLINER_OT_collection_objects_select(wmOperatorType *ot)
/* api callbacks */
ot->exec = collection_objects_select_exec;
- ot->poll = collections_editor_poll;
+ ot->poll = ED_outliner_collections_editor_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -348,7 +348,7 @@ void OUTLINER_OT_collection_objects_deselect(wmOperatorType *ot)
/* api callbacks */
ot->exec = collection_objects_select_exec;
- ot->poll = collections_editor_poll;
+ ot->poll = ED_outliner_collections_editor_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -427,7 +427,7 @@ void OUTLINER_OT_collection_duplicate(wmOperatorType *ot)
/* api callbacks */
ot->exec = collection_duplicate_exec;
- ot->poll = collections_editor_poll;
+ ot->poll = ED_outliner_collections_editor_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -477,7 +477,7 @@ void OUTLINER_OT_collection_link(wmOperatorType *ot)
/* api callbacks */
ot->exec = collection_link_exec;
- ot->poll = collections_editor_poll;
+ ot->poll = ED_outliner_collections_editor_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -540,7 +540,7 @@ void OUTLINER_OT_collection_instance(wmOperatorType *ot)
/* api callbacks */
ot->exec = collection_instance_exec;
- ot->poll = collections_editor_poll;
+ ot->poll = ED_outliner_collections_editor_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;