[Bf-blender-cvs] [d0af8edcd12] blender2.8: Outliner: Expose collections editors poll in ED_outliner.h
Dalai Felinto
noreply at git.blender.org
Thu May 31 14:52:19 CEST 2018
Commit: d0af8edcd12a4b3bebd1bd202eebdb36b3c21141
Author: Dalai Felinto
Date: Thu May 31 14:27:34 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBd0af8edcd12a4b3bebd1bd202eebdb36b3c21141
Outliner: Expose collections editors poll in ED_outliner.h
===================================================================
M source/blender/editors/include/ED_outliner.h
M source/blender/editors/space_outliner/outliner_collections.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list