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:
-rw-r--r--source/blender/editors/armature/editarmature_undo.c2
-rw-r--r--source/blender/editors/curve/editcurve_undo.c2
-rw-r--r--source/blender/editors/include/ED_undo.h3
-rw-r--r--source/blender/editors/lattice/editlattice_undo.c2
-rw-r--r--source/blender/editors/mesh/editmesh_undo.c2
-rw-r--r--source/blender/editors/metaball/editmball_undo.c2
-rw-r--r--source/blender/editors/undo/ed_undo.c7
7 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/armature/editarmature_undo.c b/source/blender/editors/armature/editarmature_undo.c
index cbca171d3af..3768de96340 100644
--- a/source/blender/editors/armature/editarmature_undo.c
+++ b/source/blender/editors/armature/editarmature_undo.c
@@ -212,7 +212,7 @@ static void armature_undosys_step_decode(struct bContext *C,
/* The first element is always active */
ED_undo_object_set_active_or_warn(
- CTX_data_view_layer(C), us->elems[0].obedit_ref.ptr, us_p->name, &LOG);
+ CTX_data_scene(C), CTX_data_view_layer(C), us->elems[0].obedit_ref.ptr, us_p->name, &LOG);
/* Check after setting active. */
BLI_assert(armature_undosys_poll(C));
diff --git a/source/blender/editors/curve/editcurve_undo.c b/source/blender/editors/curve/editcurve_undo.c
index 8f7aa786da5..48666821732 100644
--- a/source/blender/editors/curve/editcurve_undo.c
+++ b/source/blender/editors/curve/editcurve_undo.c
@@ -273,7 +273,7 @@ static void curve_undosys_step_decode(struct bContext *C,
/* The first element is always active */
ED_undo_object_set_active_or_warn(
- CTX_data_view_layer(C), us->elems[0].obedit_ref.ptr, us_p->name, &LOG);
+ CTX_data_scene(C), CTX_data_view_layer(C), us->elems[0].obedit_ref.ptr, us_p->name, &LOG);
/* Check after setting active. */
BLI_assert(curve_undosys_poll(C));
diff --git a/source/blender/editors/include/ED_undo.h b/source/blender/editors/include/ED_undo.h
index 7b643e7c764..ed1ec96a13f 100644
--- a/source/blender/editors/include/ED_undo.h
+++ b/source/blender/editors/include/ED_undo.h
@@ -76,7 +76,8 @@ struct Base **ED_undo_editmode_bases_from_view_layer(struct ViewLayer *view_laye
struct UndoStack *ED_undo_stack_get(void);
/* helpers */
-void ED_undo_object_set_active_or_warn(struct ViewLayer *view_layer,
+void ED_undo_object_set_active_or_warn(struct Scene *scene,
+ struct ViewLayer *view_layer,
struct Object *ob,
const char *info,
struct CLG_LogRef *log);
diff --git a/source/blender/editors/lattice/editlattice_undo.c b/source/blender/editors/lattice/editlattice_undo.c
index 94b3dfbfe88..2a6edc3249f 100644
--- a/source/blender/editors/lattice/editlattice_undo.c
+++ b/source/blender/editors/lattice/editlattice_undo.c
@@ -246,7 +246,7 @@ static void lattice_undosys_step_decode(struct bContext *C,
/* The first element is always active */
ED_undo_object_set_active_or_warn(
- CTX_data_view_layer(C), us->elems[0].obedit_ref.ptr, us_p->name, &LOG);
+ CTX_data_scene(C), CTX_data_view_layer(C), us->elems[0].obedit_ref.ptr, us_p->name, &LOG);
/* Check after setting active. */
BLI_assert(lattice_undosys_poll(C));
diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c
index e46363eafcc..67816f069f6 100644
--- a/source/blender/editors/mesh/editmesh_undo.c
+++ b/source/blender/editors/mesh/editmesh_undo.c
@@ -801,7 +801,7 @@ static void mesh_undosys_step_decode(struct bContext *C,
/* The first element is always active */
ED_undo_object_set_active_or_warn(
- CTX_data_view_layer(C), us->elems[0].obedit_ref.ptr, us_p->name, &LOG);
+ CTX_data_scene(C), CTX_data_view_layer(C), us->elems[0].obedit_ref.ptr, us_p->name, &LOG);
/* Check after setting active. */
BLI_assert(mesh_undosys_poll(C));
diff --git a/source/blender/editors/metaball/editmball_undo.c b/source/blender/editors/metaball/editmball_undo.c
index 86f67879c5f..170d25e5a16 100644
--- a/source/blender/editors/metaball/editmball_undo.c
+++ b/source/blender/editors/metaball/editmball_undo.c
@@ -221,7 +221,7 @@ static void mball_undosys_step_decode(struct bContext *C,
/* The first element is always active */
ED_undo_object_set_active_or_warn(
- CTX_data_view_layer(C), us->elems[0].obedit_ref.ptr, us_p->name, &LOG);
+ CTX_data_scene(C), CTX_data_view_layer(C), us->elems[0].obedit_ref.ptr, us_p->name, &LOG);
/* Check after setting active. */
diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c
index baa178a6a94..2e5d233f207 100644
--- a/source/blender/editors/undo/ed_undo.c
+++ b/source/blender/editors/undo/ed_undo.c
@@ -846,16 +846,15 @@ void ED_OT_undo_history(wmOperatorType *ot)
/** \name Undo Helper Functions
* \{ */
-void ED_undo_object_set_active_or_warn(ViewLayer *view_layer,
- Object *ob,
- const char *info,
- CLG_LogRef *log)
+void ED_undo_object_set_active_or_warn(
+ Scene *scene, ViewLayer *view_layer, Object *ob, const char *info, CLG_LogRef *log)
{
Object *ob_prev = OBACT(view_layer);
if (ob_prev != ob) {
Base *base = BKE_view_layer_base_find(view_layer, ob);
if (base != NULL) {
view_layer->basact = base;
+ ED_object_base_active_refresh(G_MAIN, scene, view_layer);
}
else {
/* Should never fail, may not crash but can give odd behavior. */