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-19 08:01:24 +0300
committerYimingWu <xp8110@outlook.com>2021-09-19 08:01:24 +0300
commit25e548c96b3d8c1698fd4385b4dc395665b5a7f6 (patch)
treebbd3cb431e55eda8145e0aa198b6651928c01686 /source/blender/makesdna
parentbdbc7e12a02e15ad7265dfc1ac21fb6d0016308f (diff)
GPencil: Curvature support for length modifier.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_gpencil_modifier_defaults.h6
-rw-r--r--source/blender/makesdna/DNA_gpencil_modifier_types.h7
2 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h
index 450527c7443..9d7dc50bcbf 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h
@@ -314,9 +314,13 @@
{ \
.start_fac = 0.1f,\
.end_fac = 0.1f,\
- .overshoot_fac = 0.01f,\
+ .overshoot_fac = 0.1f,\
.pass_index = 0,\
.material = NULL,\
+ .flag = GP_LENGTH_USE_CURVATURE,\
+ .point_density = 30.0f,\
+ .edge_point_tradeoff = 1.0f,\
+ .max_angle = DEG2RAD(170.0f),\
}
#define _DNA_DEFAULT_DashGpencilModifierData \
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index d3429329ef6..cd34717eb4b 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -493,7 +493,10 @@ typedef struct LengthGpencilModifierData {
float overshoot_fac;
/** Modifier mode. */
int mode;
- char _pad[4];
+ /* Curvature paramters. */
+ float point_density;
+ float edge_point_tradeoff;
+ float max_angle;
} LengthGpencilModifierData;
typedef enum eLengthGpencil_Flag {
@@ -501,6 +504,8 @@ typedef enum eLengthGpencil_Flag {
GP_LENGTH_INVERT_PASS = (1 << 1),
GP_LENGTH_INVERT_LAYERPASS = (1 << 2),
GP_LENGTH_INVERT_MATERIAL = (1 << 3),
+ GP_LENGTH_USE_CURVATURE = (1 << 4),
+ GP_LENGTH_INVERT_CURVATURE = (1 << 5),
} eLengthGpencil_Flag;
typedef enum eLengthGpencil_Type {