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-03-18 14:29:17 +0300
committerSebastian Parborg <darkdefende@gmail.com>2021-03-18 15:20:44 +0300
commit6f7e632a6ff432c2b248588ae12263957ea43239 (patch)
treedef712d7501591ea9dc9f7290e7449eb669d460f
parent3f0cd3fcc1f796adcbba6ad2f307a0d5815f6afb (diff)
Cleanup, LineArt: Sample -> Resample
Clear up what sample length does by renaming the option and variables.
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c4
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h2
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c10
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c2
-rw-r--r--source/blender/makesdna/DNA_gpencil_modifier_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_gpencil_modifier.c8
6 files changed, 15 insertions, 13 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index d21fc8b8fdd..b66e970b107 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);
@@ -391,7 +391,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 f49a074e58b..1745551d6af 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 4efc8c4cca3..f6b52f80128 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -2531,9 +2531,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, "Sample Length", "Resolution to sample the generated strokes with");
+ prop = RNA_def_property(srna, "resample_length", PROP_FLOAT, PROP_DISTANCE);
+ 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");