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_brush.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_brush.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_brush.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index 35d33183c38..c183091dbb1 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -1052,9 +1052,8 @@ static void gp_brush_clone_add(bContext *C, tGP_BrushEditData *gso)
Object *ob = CTX_data_active_object(C);
bGPDlayer *gpl = CTX_data_active_gpencil_layer(C);
Scene *scene = CTX_data_scene(C);
- int cfra_eval = CFRA;
- bGPDframe *gpf = BKE_gpencil_layer_getframe(gpl, cfra_eval, GP_GETFRAME_ADD_NEW);
+ bGPDframe *gpf = BKE_gpencil_layer_getframe(gpl, CFRA, GP_GETFRAME_ADD_NEW);
bGPDstroke *gps;
float delta[3];
@@ -1399,10 +1398,10 @@ static void gpsculpt_brush_init_stroke(tGP_BrushEditData *gso)
bGPDlayer *gpl;
Scene *scene = gso->scene;
- int cfra_eval = CFRA;
+ int cfra = CFRA;
/* only try to add a new frame if this is the first stroke, or the frame has changed */
- if ((gpd == NULL) || (cfra_eval == gso->cfra)) {
+ if ((gpd == NULL) || (cfra == gso->cfra)) {
return;
}
@@ -1418,14 +1417,14 @@ static void gpsculpt_brush_init_stroke(tGP_BrushEditData *gso)
* spent too much time editing the wrong frame.
*/
// XXX: should this be allowed when framelock is enabled?
- if (gpf->framenum != cfra_eval) {
- BKE_gpencil_frame_addcopy(gpl, cfra_eval);
+ if (gpf->framenum != cfra) {
+ BKE_gpencil_frame_addcopy(gpl, cfra);
}
}
}
/* save off new current frame, so that next update works fine */
- gso->cfra = cfra_eval;
+ gso->cfra = cfra;
}
/* Apply ----------------------------------------------- */