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:
authorCody Winchester <CodyWinch>2021-01-15 00:25:17 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-01-15 00:25:36 +0300
commit7a4bdc3a4feb872365726ba7e0a4c6e83ec7f9e9 (patch)
tree9e3e18ede1a5fa1a48317a45bce6ea9d4bc2ca3d /source/blender/makesdna
parent0f2ae614a17a7c231b2a6e129633a99d9d1f12e3 (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/makesdna')
-rw-r--r--source/blender/makesdna/DNA_gpencil_modifier_defaults.h1
-rw-r--r--source/blender/makesdna/DNA_gpencil_modifier_types.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h
index fdb77bfd196..399bf6f0a6d 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h
@@ -152,6 +152,7 @@
.factor_thickness = 0.0f, \
.factor_uvs = 0.0f, \
.noise_scale = 0.0f, \
+ .noise_offset = 0.0f, \
.step = 4, \
.layer_pass = 0, \
.seed = 1, \
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index 9ac40495887..1f7283a1c70 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -107,6 +107,8 @@ typedef struct NoiseGpencilModifierData {
float factor_uvs;
/** Noise Frequency scaling */
float noise_scale;
+ float noise_offset;
+ char _pad[4];
/** How many frames before recalculate randoms. */
int step;
/** Custom index for passes. */