diff options
author | Hans Goudey <h.goudey@me.com> | 2022-08-17 04:25:14 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-08-17 04:25:14 +0300 |
commit | 413c399ab8900ee193e474edc597ca00f4176cc0 (patch) | |
tree | 94192702f11a7651ceef906fb42d01ce5398f9ff /source/blender/editors/object/object_edit.c | |
parent | d39abb74a0a99fde2c9d845821d52c198ae4da24 (diff) |
Cleanup: Move view layer array utils from macros to functions
These macros don't compile in C++ because of taking an address of a
temporary and use of designated initializers. Besides that, using
functions can improve debugging and type safety.
Differentil Revision: https://developer.blender.org/D15693
Diffstat (limited to 'source/blender/editors/object/object_edit.c')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 4896ddb5258..f36181ad96d 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -194,13 +194,13 @@ Object **ED_object_array_in_mode_or_selected(bContext *C, /* When in a mode that supports multiple active objects, use "objects in mode" * instead of the object's selection. */ if (use_objects_in_mode) { - objects = BKE_view_layer_array_from_objects_in_mode(view_layer, - v3d, - r_objects_len, - {.object_mode = ob_active->mode, - .no_dup_data = true, - .filter_fn = filter_fn, - .filter_userdata = filter_user_data}); + struct ObjectsInModeParams params = {0}; + params.object_mode = ob_active->mode; + params.no_dup_data = true; + params.filter_fn = filter_fn; + params.filter_userdata = filter_user_data; + objects = BKE_view_layer_array_from_objects_in_mode_params( + view_layer, v3d, r_objects_len, ¶ms); } else { objects = BKE_view_layer_array_selected_objects( |