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:
authorAntonioya <blendergit@gmail.com>2019-08-01 18:54:51 +0300
committerAntonioya <blendergit@gmail.com>2019-08-01 19:07:57 +0300
commit80123efc5fc258ef8b27efba67d6ad2a0efb7edd (patch)
tree917b2efd1309706af001d8037aa19773da54de53 /source/blender/makesrna/intern
parent49b2162309da6abf66764d41d9fc4c45ad01936c (diff)
Fix T67939: GPencil Noise modifier wrong random calculation
There were several problems in the old random calculation: * Different result in the viewport and render. * Noise "pop" in some frames. * Random number was calculated every time the file was opened, so get different results. Now, instead to calculate the random numbers when n number of frames changed, the random values are calculated using a unique seed by stroke. Also, a new Seed parameter has been added and this adds more control in the noise generated. This value can be animated and get more variations. Differential Revision: http://developer.blender.org/D5393
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil_modifier.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 2b89225d34d..754c443e7e6 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -377,6 +377,10 @@ static void rna_def_modifier_gpencilnoise(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Random", "Use random values");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+ prop = RNA_def_property(srna, "seed", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_ui_text(prop, "Seed", "Random seed");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
prop = RNA_def_property(srna, "use_edit_position", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_NOISE_MOD_LOCATION);
RNA_def_property_ui_text(