diff options
Diffstat (limited to 'source/blender/blenkernel/intern/gpencil_modifier.c')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil_modifier.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c index 4d9c9878a67..d24152eae21 100644 --- a/source/blender/blenkernel/intern/gpencil_modifier.c +++ b/source/blender/blenkernel/intern/gpencil_modifier.c @@ -774,9 +774,7 @@ void BKE_gpencil_prepare_eval_data(Depsgraph *depsgraph, Scene *scene, Object *o } const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd_eval); - const bool is_curve_edit = (bool)GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd_eval); - const bool do_modifiers = (bool)((!is_multiedit) && (!is_curve_edit) && - (ob->greasepencil_modifiers.first != NULL) && + const bool do_modifiers = (bool)((!is_multiedit) && (ob->greasepencil_modifiers.first != NULL) && (!GPENCIL_SIMPLIFY_MODIF(scene))); if ((!do_modifiers) && (!do_parent) && (!do_transform)) { return; @@ -812,11 +810,9 @@ void BKE_gpencil_modifiers_calc(Depsgraph *depsgraph, Scene *scene, Object *ob) { bGPdata *gpd = (bGPdata *)ob->data; const bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd); + const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd); const bool is_render = (bool)(DEG_get_mode(depsgraph) == DAG_EVAL_RENDER); - const bool is_curve_edit = (bool)(GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd) && !is_render); - const bool is_multiedit = (bool)(GPENCIL_MULTIEDIT_SESSIONS_ON(gpd) && !is_render); - const bool do_modifiers = (bool)((!is_multiedit) && (!is_curve_edit) && - (ob->greasepencil_modifiers.first != NULL) && + const bool do_modifiers = (bool)((!is_multiedit) && (ob->greasepencil_modifiers.first != NULL) && (!GPENCIL_SIMPLIFY_MODIF(scene))); if (!do_modifiers) { return; @@ -849,16 +845,20 @@ void BKE_gpencil_modifiers_calc(Depsgraph *depsgraph, Scene *scene, Object *ob) } /* Apply deform modifiers and Time remap (only change geometry). */ - if ((time_remap) || (mti && mti->deformStroke)) { + if ((time_remap) || (mti && mti->deformPolyline) || (mti && mti->deformBezier)) { LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) { bGPDframe *gpf = BKE_gpencil_frame_retime_get(depsgraph, scene, ob, gpl); if (gpf == NULL) { continue; } - - if (mti->deformStroke) { - LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) { - mti->deformStroke(md, depsgraph, ob, gpl, gpf, gps); + LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) { + if (!GPENCIL_STROKE_TYPE_BEZIER(gps)) { + if (mti->deformPolyline) { + mti->deformPolyline(md, depsgraph, ob, gpl, gpf, gps); + } + } + else if (mti->deformBezier) { + mti->deformBezier(md, depsgraph, ob, gpl, gpf, gps); } } } |