[Bf-blender-cvs] [f17e2f8dac3] master: Fix T67127: Crash Missing DEG tag update mask layer

Jeroen Bakker noreply at git.blender.org
Wed Jul 17 16:26:12 CEST 2019


Commit: f17e2f8dac3a392823ed7dbbcdea3f88bff20f75
Author: Jeroen Bakker
Date:   Wed Jul 17 16:06:44 2019 +0200
Branches: master
https://developer.blender.org/rBf17e2f8dac3a392823ed7dbbcdea3f88bff20f75

Fix T67127: Crash Missing DEG tag update mask layer

When ng mask layer operations (add, remove, move) the
original mask was not tagged to be updated resulting
in missing data on the copy. The Masking function
assumes that the copy and the original is always
structured the same.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D5283

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

M	source/blender/editors/mask/mask_ops.c

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

diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index a205f6878e3..8e4efddd8a7 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -441,6 +441,7 @@ static int masklay_new_exec(bContext *C, wmOperator *op)
   mask->masklay_act = mask->masklay_tot - 1;
 
   WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask);
+  DEG_id_tag_update(&mask->id, ID_RECALC_COPY_ON_WRITE);
 
   return OPERATOR_FINISHED;
 }
@@ -474,6 +475,7 @@ static int masklay_remove_exec(bContext *C, wmOperator *UNUSED(op))
     BKE_mask_layer_remove(mask, masklay);
 
     WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask);
+    DEG_id_tag_update(&mask->id, ID_RECALC_COPY_ON_WRITE);
   }
 
   return OPERATOR_FINISHED;
@@ -2206,6 +2208,7 @@ static int mask_layer_move_exec(bContext *C, wmOperator *op)
   }
 
   WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask);
+  DEG_id_tag_update(&mask->id, ID_RECALC_COPY_ON_WRITE);
 
   return OPERATOR_FINISHED;
 }



More information about the Bf-blender-cvs mailing list