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-26 14:43:12 +0300
committerYimingWu <xp8110@outlook.com>2021-09-26 14:43:12 +0300
commit80f7bc6d8e7e7a5e543df5418313c04df5140c43 (patch)
tree5dc395993dd4761e3bf9282e5e3a0fadb5ae2806 /source/blender/makesrna/intern/rna_gpencil_modifier.c
parent505422220d6e172fddc8a40fabee47f5d35e0c7d (diff)
LineArt: Smooth tolerance value for chaining.
smooth out jaggy lines with a given threshold. For each point in a stroke, the ones with in a given distance of its previous segment will be removed, thus "zig-zag" artefacts can be cleaned up. Reviewed By: Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D12050
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil_modifier.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 5817a200192..675cff3e58c 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -26,6 +26,7 @@
#include "DNA_brush_types.h"
#include "DNA_cachefile_types.h"
#include "DNA_gpencil_modifier_types.h"
+#include "DNA_gpencil_types.h"
#include "DNA_mesh_types.h"
#include "DNA_object_force_types.h"
#include "DNA_object_types.h"
@@ -3125,6 +3126,14 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, DEG2RAD(180.0f));
RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
+ prop = RNA_def_property(srna, "smooth_tolerance", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "chain_smooth_tolerance");
+ RNA_def_property_ui_text(
+ prop, "Smooth Tolerance", "Strength of smoothing applied on jagged chains");
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.05f, 4);
+ RNA_def_property_range(prop, 0.0f, 30.0f);
+ RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
+
prop = RNA_def_property(srna, "use_remove_doubles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_REMOVE_DOUBLES);
RNA_def_property_ui_text(