diff options
author | Cody Winchester <CodyWinch> | 2021-01-15 00:25:17 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-01-15 00:25:36 +0300 |
commit | 7a4bdc3a4feb872365726ba7e0a4c6e83ec7f9e9 (patch) | |
tree | 9e3e18ede1a5fa1a48317a45bce6ea9d4bc2ca3d /source/blender/makesrna/intern/rna_gpencil_modifier.c | |
parent | 0f2ae614a17a7c231b2a6e129633a99d9d1f12e3 (diff) |
Gpencil Noise - Add noise offset parameter
This patch adds a noise offset option to the grease pencil noise modifier.
It allows the user to animate the noise along the length of the stroke to create movement that is currently not possible.
It works by adding an offset to the noise table and adding the remaining floating point value to the noise table sampling.
Reviewed By: #grease_pencil
Differential Revision: https://developer.blender.org/D10021
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil_modifier.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil_modifier.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index fb505d9a1fa..71d5a53adb2 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -498,6 +498,13 @@ static void rna_def_modifier_gpencilnoise(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Noise Scale", "Scale the noise frequency"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "noise_offset", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "noise_offset"); + RNA_def_property_range(prop, 0.0, FLT_MAX); + RNA_def_property_ui_range(prop, 0.0, 100.0, 0.1, 3); + RNA_def_property_ui_text(prop, "Noise Offset", "Offset the noise along the strokes"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "use_custom_curve", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_NOISE_CUSTOM_CURVE); RNA_def_property_ui_text( |