[Bf-blender-cvs] [d7439790d3c] greasepencil-object: Cleanup: unused vars
Campbell Barton
noreply at git.blender.org
Thu Jun 14 19:44:45 CEST 2018
Commit: d7439790d3cb9e2b09a89eb5d8834e1484fc30f6
Author: Campbell Barton
Date: Thu Jun 14 19:44:34 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBd7439790d3cb9e2b09a89eb5d8834e1484fc30f6
Cleanup: unused vars
===================================================================
M source/blender/editors/gpencil/gpencil_data.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 0e1906139b8..93cffaf0fec 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -102,7 +102,6 @@
/* add new datablock - wrapper around API */
static int gp_data_add_exec(bContext *C, wmOperator *op)
{
- Main *bmain = CTX_data_main(C);
bGPdata **gpd_ptr = ED_gpencil_data_get_pointers(C, NULL);
if (gpd_ptr == NULL) {
@@ -198,7 +197,6 @@ void GPENCIL_OT_data_unlink(wmOperatorType *ot)
/* add new layer - wrapper around API */
static int gp_layer_add_exec(bContext *C, wmOperator *op)
{
- Main *bmain = CTX_data_main(C);
bGPdata **gpd_ptr = ED_gpencil_data_get_pointers(C, NULL);
/* if there's no existing Grease-Pencil data there, add some */
@@ -207,7 +205,8 @@ static int gp_layer_add_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
if (*gpd_ptr == NULL) {
- *gpd_ptr = BKE_gpencil_data_addnew(CTX_data_main(C), DATA_("GPencil"));
+ Main *bmain = CTX_data_main(C);
+ *gpd_ptr = BKE_gpencil_data_addnew(bmain, DATA_("GPencil"));
}
/* add default sets of colors and brushes */
More information about the Bf-blender-cvs
mailing list