diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil.c | 5 | ||||
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c | 18 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil_modifier.c | 2 |
3 files changed, 11 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index df18f89da6f..15532233a76 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -1931,16 +1931,14 @@ bool BKE_gpencil_split_stroke(bGPDframe *gpf, */ bool BKE_gpencil_shrink_stroke(bGPDstroke *gps, const float dist) { - bGPDspoint *pt = gps->points, *last_pt, *second_last, *next_pt; + bGPDspoint *pt = gps->points, *second_last; int i; if (gps->totpoints < 2 || dist < FLT_EPSILON) { return false; } - last_pt = &pt[gps->totpoints - 1]; second_last = &pt[gps->totpoints - 2]; - next_pt = &pt[1]; float len1, this_len1, cut_len1; float len2, this_len2, cut_len2; @@ -1950,7 +1948,6 @@ bool BKE_gpencil_shrink_stroke(bGPDstroke *gps, const float dist) i = 1; while (len1 < dist && gps->totpoints > i - 1) { - next_pt = &pt[i]; this_len1 = len_v3v3(&pt[i].x, &pt[i + 1].x); len1 += this_len1; cut_len1 = len1 - dist; diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c index 98988783862..c71d074e564 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c @@ -132,8 +132,7 @@ static void minter_v3_v3v3v3_ref( copy_v3_v3(result, minter); } -static void duplicateStroke(bGPDframe *gpf, - bGPDstroke *gps, +static void duplicateStroke(bGPDstroke *gps, int count, float dist, float offset, @@ -226,7 +225,7 @@ static void duplicateStroke(bGPDframe *gpf, } static void bakeModifier(Main *UNUSED(bmain), - Depsgraph *depsgraph, + Depsgraph *UNUSED(depsgraph), GpencilModifierData *md, Object *ob) { @@ -257,8 +256,7 @@ static void bakeModifier(Main *UNUSED(bmain), splitStroke(gpf, gps, mmd->split_angle); } if (mmd->duplications > 0) { - duplicateStroke(gpf, - gps, + duplicateStroke(gps, mmd->duplications, mmd->distance, mmd->offset, @@ -281,8 +279,11 @@ static void bakeModifier(Main *UNUSED(bmain), /* -------------------------------- */ /* Generic "generateStrokes" callback */ -static void generateStrokes( - GpencilModifierData *md, Depsgraph *depsgraph, Object *ob, bGPDlayer *gpl, bGPDframe *gpf) +static void generateStrokes(GpencilModifierData *md, + Depsgraph *UNUSED(depsgraph), + Object *ob, + bGPDlayer *gpl, + bGPDframe *gpf) { MultiplyGpencilModifierData *mmd = (MultiplyGpencilModifierData *)md; bGPDstroke *gps; @@ -306,8 +307,7 @@ static void generateStrokes( splitStroke(gpf, gps, mmd->split_angle); } if (mmd->duplications > 0) { - duplicateStroke(gpf, - gps, + duplicateStroke(gps, mmd->duplications, mmd->distance, mmd->offset, diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index 4352b6628e2..7aa3ee60c5a 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -1947,7 +1947,7 @@ static void rna_def_modifier_gpencilmultiply(BlenderRNA *brna) prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0, M_PI); - RNA_def_property_ui_text(prop, "Distance", "Distance of duplications."); + RNA_def_property_ui_text(prop, "Distance", "Distance of duplications"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE); |