diff options
author | Monique Dewanchand <mdewanchand> | 2022-09-14 22:30:20 +0300 |
---|---|---|
committer | Monique <mdewanchand@atmind.nl> | 2022-09-14 22:30:56 +0300 |
commit | 23276bcc37acc54f1e1814abdf482a432523c3a6 (patch) | |
tree | 8677bacc96fb953fb27625a6ae563aa1ae5e1769 /source/blender/editors/undo | |
parent | 1a4854898000661dd7cf57492a7a75cb60ea63ef (diff) |
Adding `const Scene*` parameter in many areas.
Related to {D15885} that requires scene parameter
to be added in many places. To speed up the review process
the adding of the scene parameter was added in a separate
patch.
Reviewed By: mont29
Maniphest Tasks: T73411
Differential Revision: https://developer.blender.org/D15930
Diffstat (limited to 'source/blender/editors/undo')
-rw-r--r-- | source/blender/editors/undo/ed_undo.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c index 40dcb646367..be49c9cedce 100644 --- a/source/blender/editors/undo/ed_undo.c +++ b/source/blender/editors/undo/ed_undo.c @@ -820,15 +820,15 @@ void ED_undo_object_editmode_restore_helper(struct bContext *C, uint object_array_stride) { Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); uint bases_len = 0; /* Don't request unique data because we want to de-select objects when exiting edit-mode * for that to be done on all objects we can't skip ones that share data. */ - Base **bases = ED_undo_editmode_bases_from_view_layer(view_layer, &bases_len); + Base **bases = ED_undo_editmode_bases_from_view_layer(scene, view_layer, &bases_len); for (uint i = 0; i < bases_len; i++) { ((ID *)bases[i]->object->data)->tag |= LIB_TAG_DOIT; } - Scene *scene = CTX_data_scene(C); Object **ob_p = object_array; for (uint i = 0; i < object_array_len; i++, ob_p = POINTER_OFFSET(ob_p, object_array_stride)) { Object *obedit = *ob_p; @@ -885,7 +885,9 @@ static int undo_editmode_objects_from_view_layer_prepare(ViewLayer *view_layer, return len; } -Object **ED_undo_editmode_objects_from_view_layer(ViewLayer *view_layer, uint *r_len) +Object **ED_undo_editmode_objects_from_view_layer(const Scene *UNUSED(scene), + ViewLayer *view_layer, + uint *r_len) { Base *baseact = view_layer->basact; if ((baseact == NULL) || (baseact->object->mode & OB_MODE_EDIT) == 0) { @@ -914,7 +916,9 @@ Object **ED_undo_editmode_objects_from_view_layer(ViewLayer *view_layer, uint *r return objects; } -Base **ED_undo_editmode_bases_from_view_layer(ViewLayer *view_layer, uint *r_len) +Base **ED_undo_editmode_bases_from_view_layer(const Scene *UNUSED(scene), + ViewLayer *view_layer, + uint *r_len) { Base *baseact = view_layer->basact; if ((baseact == NULL) || (baseact->object->mode & OB_MODE_EDIT) == 0) { |