diff options
author | YimingWu <xp8110@outlook.com> | 2021-06-25 08:15:25 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2021-06-25 08:15:25 +0300 |
commit | 841df831e89dfc4011c323203c2efb8265dc1878 (patch) | |
tree | 6e669d413cbd7de6510a5903102ad9a37e4cdc71 /source/blender/makesrna/intern | |
parent | 3d7021b4ec23d79fef361364c35965d9af0f4e5b (diff) |
LineArt: More type & related chaining improvements
This patch includes: Floating edge type support,
Special chaining option for floating edge,
Chaining option for reducing jagged edges when floating
edges are involved.
Reviewed By: Sebastian Parborg (zeddb)
Differential Revision: https://developer.blender.org/D11306
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil_modifier.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index 5d83286d3ec..4c890895446 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -2812,6 +2812,12 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna) prop, "Remove Doubles", "Remove doubles from the source geometry before generating stokes"); RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "floating_as_contour", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_FLOATING_AS_CONTOUR); + RNA_def_property_ui_text( + prop, "Floating As Contour", "Floating edges will be classified as contour lines"); + RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "chaining_image_threshold", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_ui_text( prop, @@ -2821,6 +2827,26 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna) RNA_def_property_range(prop, 0.0f, 0.3f); RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "chain_floating_edges", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_CHAIN_FLOATING_EDGES); + RNA_def_property_ui_text( + prop, "Chain Floating Edges", "Allow floating edges to be chained together"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "chain_geometry_space", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_CHAIN_GEOMETRY_SPACE); + RNA_def_property_ui_text( + prop, "Use Geometry Space", "Use geometry distance for chaining instead of image space."); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "allow_overlap_edge_types", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_ALLOW_OVERLAP_EDGE_TYPES); + RNA_def_property_ui_text(prop, + "Overlapping Edge Types", + "Allow an edge to have multiple overlapping types. This will create an " + "individual stroke for each overlapping type"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "source_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, modifier_lineart_source_type); RNA_def_property_ui_text(prop, "Source Type", "Line art stroke source type"); @@ -2846,6 +2872,11 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Use Contour", "Generate strokes from contours lines"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "use_floating", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "edge_types", LRT_EDGE_FLAG_FLOATING); + RNA_def_property_ui_text(prop, "Use Floating", "Generate strokes from floating edges"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "use_crease", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edge_types", LRT_EDGE_FLAG_CREASE); RNA_def_property_ui_text(prop, "Use Crease", "Generate strokes from creased edges"); |