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>2021-09-15 09:24:28 +0300
committerYimingWu <xp8110@outlook.com>2021-09-15 09:38:32 +0300
commita2c5c2b4068d12e26a8c9d640a389b410c7507f3 (patch)
tree95cecf0a24aee13ffb6feb90892622b8841409cf /source/blender/blenkernel
parentc1cf66bff3c0753512a2d1f2f8c03430bdd1f045 (diff)
GPencil: Dot dash modifier.
Create dot-dash effect for grease pencil strokes. User can manually edit the length, gap and styles for each segment of dashed lines. The values in each segment can all be key-framed to make animations. Reviewed By: Hans Goudey (HooglyBoogly), Antonio Vazquez (antoniov) Differential Revision: http://developer.blender.org/D11876
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/gpencil_modifier.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c
index a30376b9bad..b120c901499 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -938,6 +938,11 @@ void BKE_gpencil_modifier_blend_write(BlendWriter *writer, ListBase *modbase)
BKE_curvemapping_blend_write(writer, gpmd->curve_intensity);
}
}
+ else if (md->type == eGpencilModifierType_Dash) {
+ DashGpencilModifierData *gpmd = (DashGpencilModifierData *)md;
+ BLO_write_struct_array(
+ writer, DashGpencilModifierSegment, gpmd->segments_len, gpmd->segments);
+ }
}
}
@@ -1017,6 +1022,10 @@ void BKE_gpencil_modifier_blend_read_data(BlendDataReader *reader, ListBase *lb)
BKE_curvemapping_init(gpmd->curve_intensity);
}
}
+ else if (md->type == eGpencilModifierType_Dash) {
+ DashGpencilModifierData *gpmd = (DashGpencilModifierData *)md;
+ BLO_read_data_address(reader, &gpmd->segments);
+ }
}
}