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:
authorYimingWu <xp8110@outlook.com>2022-03-25 15:13:04 +0300
committerYimingWu <xp8110@outlook.com>2022-03-25 15:13:50 +0300
commit97f2210157dbd36bc0a44674c8470202fe808301 (patch)
tree75d0a16414d6539d1feca9ed52e92fb2cfbc5973 /source/blender/gpencil_modifiers
parentd4e1458db3a0e0eaf80219dc8e6d10cb27620793 (diff)
GPencil: Cyclic flag for dot dash modifier
Cyclic option per segment, allows interesting "loop" visual effects. Reviewed by: Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D14439
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencildash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencildash.c b/source/blender/gpencil_modifiers/intern/MOD_gpencildash.c
index 25c7fdca9f6..e57b9df03f5 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencildash.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencildash.c
@@ -148,6 +148,9 @@ static bool stroke_dash(const bGPDstroke *gps,
bGPDstroke *stroke = BKE_gpencil_stroke_new(
ds->mat_nr < 0 ? gps->mat_nr : ds->mat_nr, size, gps->thickness);
+ if (ds->flag & GP_DASH_USE_CYCLIC) {
+ stroke->flag |= GP_STROKE_CYCLIC;
+ }
for (int is = 0; is < size; is++) {
bGPDspoint *p = &gps->points[new_stroke_offset + is];
@@ -337,6 +340,7 @@ static void panel_draw(const bContext *C, Panel *panel)
uiItemR(sub, &ds_ptr, "radius", 0, NULL, ICON_NONE);
uiItemR(sub, &ds_ptr, "opacity", 0, NULL, ICON_NONE);
uiItemR(sub, &ds_ptr, "material_index", 0, NULL, ICON_NONE);
+ uiItemR(sub, &ds_ptr, "use_cyclic", 0, NULL, ICON_NONE);
}
gpencil_modifier_panel_end(layout, ptr);