Commit: 4b8ae5fa1b6635717807088889718415b48cdf10
Author: Monique
Date:   Thu Sep 8 11:20:41 2022 +0200
Branches: temp-T73411-view-layer-lazy-cache
https://developer.blender.org/rB4b8ae5fa1b6635717807088889718415b48cdf10

Remove redundant ensure, added (missed) ensure

===================================================================

M       source/blender/editors/screen/screen_context.c
M       source/blender/editors/sculpt_paint/sculpt_undo.c

===================================================================

diff --git a/source/blender/editors/screen/screen_context.c 
b/source/blender/editors/screen/screen_context.c
index 1648f1e94da..6d132620f1f 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -233,7 +233,6 @@ static eContextResult 
screen_ctx_objects_in_mode_unique_data(const bContext *C,
   Scene *scene = CTX_data_scene(C);
   ViewLayer *view_layer = WM_window_get_active_view_layer(win);
   BKE_view_layer_ensure_sync(scene, view_layer);
-  BKE_view_layer_ensure_sync(scene, view_layer);
   Object *obact = BKE_view_layer_active_object_get(view_layer);
 
   if (obact && (obact->mode != OB_MODE_OBJECT)) {
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c 
b/source/blender/editors/sculpt_paint/sculpt_undo.c
index c586576d7ef..7fee0c5f6bb 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -399,7 +399,9 @@ static bool sculpt_undo_restore_hidden(bContext *C, 
SculptUndoNode *unode, bool
 
 static bool sculpt_undo_restore_color(bContext *C, SculptUndoNode *unode, bool 
*modified_vertices)
 {
+  const Scene *scene = CTX_data_scene(C);
   ViewLayer *view_layer = CTX_data_view_layer(C);
+  BKE_view_layer_ensure_sync(scene, view_layer);
   Object *ob = BKE_view_layer_active_object_get(view_layer);
   SculptSession *ss = ob->sculpt;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to