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-04-29 16:39:08 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-04-29 16:45:03 +0300
commit6a2bc40e0131aa2689aa37a915f672f28fed8aa8 (patch)
tree538c76db2ad71bf19bb58df9e85a130ae51f242e /source/blender/makesdna/DNA_gpencil_modifier_types.h
parent4225a18b35f071ae1ff01c54b475ad396c77febc (diff)
Gpencil Offset Modifier - Add randomize offset options
This patch adds the Randomize options that exist in the Array modifier to the offset modifier. Currently the patch uses ``` BLI_findindex(&gpf->strokes, gps); ``` to get the index of the current stroke for making each stroke a different seed value. This is how the noise modifier also gets the stroke seed value and it is noted there as well that this method is slow, and should be fixed in the future with another method of getting the stroke index. Other methods were explored such as using the total number of points of the stroke, but that makes the randomize options incompatible with other modifiers before it such as Multiple Strokes, Array, Build, and Simplify. {F9591325} Differential Revision: https://developer.blender.org/D10171
Diffstat (limited to 'source/blender/makesdna/DNA_gpencil_modifier_types.h')
-rw-r--r--source/blender/makesdna/DNA_gpencil_modifier_types.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index 668ddae098a..c03b358dc8a 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -630,6 +630,14 @@ typedef struct OffsetGpencilModifierData {
float loc[3];
float rot[3];
float scale[3];
+ /** Random Offset. */
+ float rnd_offset[3];
+ /** Random Rotation. */
+ float rnd_rot[3];
+ /** Random Scales. */
+ float rnd_scale[3];
+ /** (first element is the index) random values. */
+ int seed;
/** Custom index for passes. */
int layer_pass;
} OffsetGpencilModifierData;
@@ -640,6 +648,7 @@ typedef enum eOffsetGpencil_Flag {
GP_OFFSET_INVERT_VGROUP = (1 << 2),
GP_OFFSET_INVERT_LAYERPASS = (1 << 3),
GP_OFFSET_INVERT_MATERIAL = (1 << 4),
+ GP_OFFSET_UNIFORM_RANDOM_SCALE = (1 << 5),
} eOffsetGpencil_Flag;
typedef struct SmoothGpencilModifierData {