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:
authorAntonioya <blendergit@gmail.com>2019-07-29 18:07:24 +0300
committerAntonioya <blendergit@gmail.com>2019-07-29 18:07:37 +0300
commit770b496729d21f3e700cadd1bc3543a57ca01169 (patch)
treed33a958805caea15cfeb5e99439c4408e686a0da /source/blender/editors/gpencil/gpencil_primitive.c
parent453586be06a129eec7498fe7ecac9f7c555e34e6 (diff)
Cleanup: GPencil replace cfra_eval by cfra or CFRA
Don't need these variable because this code was part of using depsgraph frame number, but now using scene framenumber only add noise to the code.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_primitive.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_primitive.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index 6c317b3ddb9..ca77b209811 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -306,7 +306,7 @@ static void gpencil_primitive_allocate_memory(tGPDprimitive *tgpi)
static void gp_primitive_set_initdata(bContext *C, tGPDprimitive *tgpi)
{
Scene *scene = CTX_data_scene(C);
- int cfra_eval = CFRA;
+ int cfra = CFRA;
bGPDlayer *gpl = CTX_data_active_gpencil_layer(C);
@@ -318,7 +318,7 @@ static void gp_primitive_set_initdata(bContext *C, tGPDprimitive *tgpi)
/* create a new temporary frame */
tgpi->gpf = MEM_callocN(sizeof(bGPDframe), "Temp bGPDframe");
- tgpi->gpf->framenum = tgpi->cframe = cfra_eval;
+ tgpi->gpf->framenum = tgpi->cframe = cfra;
/* create new temp stroke */
bGPDstroke *gps = MEM_callocN(sizeof(bGPDstroke), "Temp bGPDstroke");
@@ -1098,8 +1098,6 @@ static void gpencil_primitive_init(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
Paint *paint = &ts->gp_paint->paint;
- int cfra_eval = CFRA;
-
/* create temporary operator data */
tGPDprimitive *tgpi = MEM_callocN(sizeof(tGPDprimitive), "GPencil Primitive Data");
op->customdata = tgpi;
@@ -1121,7 +1119,7 @@ static void gpencil_primitive_init(bContext *C, wmOperator *op)
tgpi->orign_type = RNA_enum_get(op->ptr, "type");
/* set current frame number */
- tgpi->cframe = cfra_eval;
+ tgpi->cframe = CFRA;
/* set GP datablock */
tgpi->gpd = gpd;