diff options
author | Henrik Dick <hen-di@web.de> | 2022-03-25 13:51:45 +0300 |
---|---|---|
committer | Henrik Dick <hen-di@web.de> | 2022-03-25 13:51:45 +0300 |
commit | d4e1458db3a0e0eaf80219dc8e6d10cb27620793 (patch) | |
tree | 0c1284faaa1f437c0eab156c8b76167bc0dd7b00 /source/blender/makesdna | |
parent | 0c33e84020deca84c987dffa1302651f59c27158 (diff) |
GPencil: Improve smooth operation
This patch makes the grease pencil smooth operation symmetric.
It also increases the performance a lot if strong smoothing is
required. Additionally there is an option for the position smooth
operation to keep the shape closer to the original for more iterations.
Since the result differs from the previous algorithm, versioning is used
to change the iterations and factor to match the old result.
Differential Revision: http://developer.blender.org/D14325
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_gpencil_modifier_defaults.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_gpencil_modifier_types.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h index a87e7a7c397..9d14ca039ac 100644 --- a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h +++ b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h @@ -193,7 +193,7 @@ .vgname = "", \ .pass_index = 0, \ .flag = GP_SMOOTH_MOD_LOCATION, \ - .factor = 0.5f, \ + .factor = 1.0f, \ .step = 1, \ .layer_pass = 0, \ .curve_intensity = NULL, \ diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h index 1054c309ee5..4f655e87a09 100644 --- a/source/blender/makesdna/DNA_gpencil_modifier_types.h +++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h @@ -750,6 +750,7 @@ typedef enum eSmoothGpencil_Flag { GP_SMOOTH_INVERT_LAYERPASS = (1 << 7), GP_SMOOTH_INVERT_MATERIAL = (1 << 4), GP_SMOOTH_CUSTOM_CURVE = (1 << 8), + GP_SMOOTH_KEEP_SHAPE = (1 << 9), } eSmoothGpencil_Flag; typedef struct ArmatureGpencilModifierData { |