[Bf-blender-cvs] [b61e158d906] greasepencil-object: Remove more G.main uses

Antonio Vazquez noreply at git.blender.org
Mon Oct 23 12:14:50 CEST 2017


Commit: b61e158d90691c33f023fc7e3595e5eea21fcde1
Author: Antonio Vazquez
Date:   Mon Oct 23 12:14:43 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBb61e158d90691c33f023fc7e3595e5eea21fcde1

Remove more G.main uses

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

M	source/blender/editors/sculpt_paint/paint_ops.c
M	source/blender/editors/space_action/action_select.c

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

diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index c6abca39470..6f89ac133ef 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -397,6 +397,7 @@ static void PALETTE_OT_color_delete(wmOperatorType *ot)
 
 static int palettecolor_isolate_exec(bContext *C, wmOperator *op)
 {
+	Main *bmain = CTX_data_main(C);
 	bGPdata *gpd = ED_gpencil_data_get_active(C);
 	Palette *palette = BKE_palette_get_active_from_context(C);
 
@@ -447,7 +448,7 @@ static int palettecolor_isolate_exec(bContext *C, wmOperator *op)
 	}
 
 	/* notifiers */
-	BKE_gpencil_batch_cache_alldirty();
+	BKE_gpencil_batch_cache_alldirty_main(bmain);
 	WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
 	return OPERATOR_FINISHED;
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index 1c366ce198f..19c7d142a92 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -153,7 +153,7 @@ static void deselect_action_keys(bAnimContext *ac, short test, short sel)
 static void gpencil_action_redraw(bContext *C, bAnimContext *ac)
 {
 	if ((ac) && (ac->datatype == ANIMCONT_GPENCIL)) {
-		BKE_gpencil_batch_cache_alldirty();
+		BKE_gpencil_batch_cache_alldirty_main(CTX_data_main(C));
 		WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
 	}
 }



More information about the Bf-blender-cvs mailing list