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:
authorCampbell Barton <ideasman42@gmail.com>2018-01-03 13:54:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-01-03 13:54:02 +0300
commit2f8c2572edc27070771c32b235b8012c5dd38f50 (patch)
treef5ea72400a0fa91026a8053b4ec13a04b6211feb /source/blender/editors/include/UI_interface.h
parentcbc7aa80d49e3b36c9ecc0e27ec528b34c491fc1 (diff)
Fix T53632: Objects outside scene shown in popup
Only show objects in current scene when not pinned. This commit adds a filter argument to id-template since we may want to filter by other criteria.
Diffstat (limited to 'source/blender/editors/include/UI_interface.h')
-rw-r--r--source/blender/editors/include/UI_interface.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index c20a61abea5..c07fa2913b6 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -661,6 +661,15 @@ void UI_but_string_info_get(struct bContext *C, uiBut *but, ...) ATTR_SENTINEL(0
#define UI_ID_PREVIEWS (1 << 10)
#define UI_ID_FULL (UI_ID_RENAME | UI_ID_BROWSE | UI_ID_ADD_NEW | UI_ID_OPEN | UI_ID_ALONE | UI_ID_DELETE | UI_ID_LOCAL)
+/**
+ * Ways to limit what is displayed in ID-search popup.
+ * \note We may want to add LOCAL, LIBRARY ... as needed.
+ */
+enum {
+ UI_TEMPLATE_ID_FILTER_ALL = 0,
+ UI_TEMPLATE_ID_FILTER_AVAILABLE = 1,
+};
+
int UI_icon_from_id(struct ID *id);
int UI_icon_from_report_type(int type);
@@ -918,12 +927,15 @@ uiLayout *uiLayoutRadial(uiLayout *layout);
/* templates */
void uiTemplateHeader(uiLayout *layout, struct bContext *C);
-void uiTemplateID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname,
- const char *newop, const char *openop, const char *unlinkop);
-void uiTemplateIDBrowse(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname,
- const char *newop, const char *openop, const char *unlinkop);
-void uiTemplateIDPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname,
- const char *newop, const char *openop, const char *unlinkop, int rows, int cols);
+void uiTemplateID(
+ uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname,
+ const char *newop, const char *openop, const char *unlinkop, int filter);
+void uiTemplateIDBrowse(
+ uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname,
+ const char *newop, const char *openop, const char *unlinkop, int filter);
+void uiTemplateIDPreview(
+ uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname,
+ const char *newop, const char *openop, const char *unlinkop, int rows, int cols, int filter);
void uiTemplateAnyID(uiLayout *layout, struct PointerRNA *ptr, const char *propname,
const char *proptypename, const char *text);
void uiTemplatePathBuilder(uiLayout *layout, struct PointerRNA *ptr, const char *propname,