[Bf-blender-cvs] [dfa85f86299] temp-lineart-contained: LineArt: use resample_length property name.

YimingWu noreply at git.blender.org
Thu Mar 18 12:34:24 CET 2021


Commit: dfa85f86299377821ec244b083b0dad2e9dbb0a7
Author: YimingWu
Date:   Thu Mar 18 19:29:17 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rBdfa85f86299377821ec244b083b0dad2e9dbb0a7

LineArt: use resample_length property name.

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

M	source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
M	source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
M	source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
M	source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
M	source/blender/makesdna/DNA_gpencil_modifier_types.h
M	source/blender/makesrna/intern/rna_gpencil_modifier.c

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

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index c8d33f9eca5..d8121b6885a 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -107,7 +107,7 @@ static void generate_strokes_actual(
       lmd->transparency_mask,
       lmd->thickness,
       lmd->opacity,
-      lmd->pre_sample_length,
+      lmd->resample_length,
       lmd->source_vertex_group,
       lmd->vgname,
       lmd->flags);
@@ -374,7 +374,7 @@ static void chaining_panel_draw(const bContext *UNUSED(C), Panel *panel)
   uiItemR(col, ptr, "chaining_geometry_threshold", 0, NULL, ICON_NONE);
   uiItemR(col, ptr, "chaining_image_threshold", 0, NULL, ICON_NONE);
 
-  uiItemR(layout, ptr, "pre_sample_length", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+  uiItemR(layout, ptr, "resample_length", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 
   uiItemR(layout, ptr, "angle_splitting_threshold", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 }
diff --git a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
index 97f4459072f..c01b1a4c86b 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
+++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
@@ -549,7 +549,7 @@ void MOD_lineart_gpencil_generate(LineartRenderBuffer *rb,
                                   unsigned char transparency_mask,
                                   short thickness,
                                   float opacity,
-                                  float pre_sample_length,
+                                  float resample_length,
                                   const char *source_vgname,
                                   const char *vgname,
                                   int modifier_flags);
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 41b269c836d..77de09a5526 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -3742,7 +3742,7 @@ static void lineart_gpencil_generate(LineartRenderBuffer *rb,
                                      unsigned char transparency_mask,
                                      short thickness,
                                      float opacity,
-                                     float pre_sample_length,
+                                     float resample_length,
                                      const char *source_vgname,
                                      const char *vgname,
                                      int modifier_flags)
@@ -3882,8 +3882,8 @@ static void lineart_gpencil_generate(LineartRenderBuffer *rb,
       }
     }
 
-    if (pre_sample_length > 0.0001) {
-      BKE_gpencil_stroke_sample(gpencil_object->data, gps, pre_sample_length, false);
+    if (resample_length > 0.0001) {
+      BKE_gpencil_stroke_sample(gpencil_object->data, gps, resample_length, false);
     }
     if (G.debug_value == 4000) {
       BKE_gpencil_stroke_set_random_color(gps);
@@ -3913,7 +3913,7 @@ void MOD_lineart_gpencil_generate(LineartRenderBuffer *rb,
                                   unsigned char transparency_mask,
                                   short thickness,
                                   float opacity,
-                                  float pre_sample_length,
+                                  float resample_length,
                                   const char *source_vgname,
                                   const char *vgname,
                                   int modifier_flags)
@@ -3963,7 +3963,7 @@ void MOD_lineart_gpencil_generate(LineartRenderBuffer *rb,
                            transparency_mask,
                            thickness,
                            opacity,
-                           pre_sample_length,
+                           resample_length,
                            source_vgname,
                            vgname,
                            modifier_flags);
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
index 84e8cae262d..787125d0378 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
@@ -110,7 +110,7 @@ static bool bake_strokes(Object *ob, Depsgraph *dg, GpencilModifierData *md, int
       lmd->transparency_mask,
       lmd->thickness,
       lmd->opacity,
-      lmd->pre_sample_length,
+      lmd->resample_length,
       lmd->source_vertex_group,
       lmd->vgname,
       lmd->flags);
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index 7dded1a6546..31f8c64d486 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -867,7 +867,7 @@ typedef struct LineartGpencilModifierData {
   float chaining_geometry_threshold;
   float chaining_image_threshold;
 
-  float pre_sample_length;
+  float resample_length;
 
   /* Ported from SceneLineArt flags. */
   int calculation_flags;
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 33706daca39..28b4bc604ad 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -2530,8 +2530,11 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
   RNA_def_property_range(prop, 0.0f, 1.0f);
   RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
 
-  prop = RNA_def_property(srna, "pre_sample_length", PROP_FLOAT, PROP_NONE);
-  RNA_def_property_ui_text(prop, "Pre Sample Length", "Sample strokes before sending out");
+  prop = RNA_def_property(srna, "resample_length", PROP_FLOAT, PROP_NONE);
+  RNA_def_property_ui_text(prop,
+                           "Resample Length",
+                           "Resample the strokes so that the stroke points have the specified "
+                           "length between them. Zero length disables the resampling.");
   RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01f, 2);
   RNA_def_property_range(prop, 0.0f, 1.0f);
   RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");



More information about the Bf-blender-cvs mailing list