[Bf-blender-cvs] [7ae3b3abf8c] temp-lineart-contained: LineArt: Cleanup smooth patch.

YimingWu noreply at git.blender.org
Sat Sep 11 13:24:01 CEST 2021


Commit: 7ae3b3abf8cd84947b38d3b54c43b234a3876ff8
Author: YimingWu
Date:   Sat Sep 11 19:07:06 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rB7ae3b3abf8cd84947b38d3b54c43b234a3876ff8

LineArt: Cleanup smooth patch.

===================================================================

M	source/blender/makesdna/DNA_gpencil_modifier_types.h
M	source/blender/makesdna/DNA_gpencil_types.h
M	source/blender/makesrna/intern/rna_gpencil_modifier.c

===================================================================

diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index aa37c97a33a..6c4dc8a5119 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -990,7 +990,7 @@ typedef struct LineartGpencilModifierData {
   /** `0..PI` angle, for splitting strokes at sharp points. */
   float angle_splitting_threshold;
 
-  /** Strength for smoothing jagged chains */
+  /** Strength for smoothing jagged chains. */
   float chain_smooth_tolerance;
 
   /* CPU mode */
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 68bd2961f23..0f570f8603d 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -49,6 +49,8 @@ struct MDeformVert;
 #define GPENCIL_MIN_FILL_FAC 0.05f
 #define GPENCIL_MAX_FILL_FAC 8.0f
 
+#define GPENCIL_MAX_THICKNESS 5000
+
 /* ***************************************** */
 /* GP Stroke Points */
 
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 54309afdb18..38de0dcf1b8 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"
@@ -3209,8 +3210,7 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
   prop = RNA_def_property(srna, "thickness", PROP_INT, PROP_NONE);
   RNA_def_property_ui_text(prop, "Thickness", "The thickness for the generated strokes");
   RNA_def_property_ui_range(prop, 1, 100, 1, 1);
-  /* GPencil internal limit, use hard coded value for now until we have a marco. */
-  RNA_def_property_range(prop, 1, 5000);
+  RNA_def_property_range(prop, 1, GPENCIL_MAX_THICKNESS);
   RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
 
   prop = RNA_def_property(srna, "opacity", PROP_FLOAT, PROP_FACTOR);



More information about the Bf-blender-cvs mailing list