From 12bc34b0b81b11186e3814f8a255f1226f0588c3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 30 Aug 2020 17:39:12 +1000 Subject: Object: add ED_object_array_in_mode_or_selected Use this utility function for render-shading & weight paint modes. This adds support for edit-mode & pose-mode where all objects in the mode are used in this case instead of the selected objects. --- source/blender/editors/include/ED_object.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/include/ED_object.h') diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 4c7dd4fe66c..f1ddc10f1a8 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -62,6 +62,11 @@ struct Object *ED_object_context(const struct bContext *C); struct Object *ED_object_active_context(const struct bContext *C); void ED_collection_hide_menu_draw(const struct bContext *C, struct uiLayout *layout); +Object **ED_object_array_in_mode_or_selected(struct bContext *C, + bool (*filter_fn)(struct Object *ob, void *user_data), + void *filter_user_data, + uint *r_objects_len); + /* object_utils.c */ bool ED_object_calc_active_center_for_editmode(struct Object *obedit, const bool select_only, -- cgit v1.2.3