Random number generator: replace a bunch of usage of the global random number
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 15 Apr 2013 23:12:40 +0000 (23:12 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 15 Apr 2013 23:12:40 +0000 (23:12 +0000)
commitafb4b65167165613f177a531bd3d4dcb3649c1c6
tree32e1446b5fc3ce8ec00fa0e8b9e0fcb2eedda127
parent638b084f824bc345468bc8e02422b5da65a641a7
Random number generator: replace a bunch of usage of the global random number
generator with a local one. It's not thread safe and will not give repeatable
results, so in most cases it should not be used.

Also fixes #34992 where the noise texture of a displacement modifier was not
properly random in opengl animation render, because the seed got reset to a
fixed value by an unrelated function while for final render it changed each
frame.
31 files changed:
source/blender/blenkernel/BKE_boids.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/boids.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/ocean.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenlib/BLI_rand.h
source/blender/blenlib/intern/jitter.c
source/blender/blenlib/intern/rand.c
source/blender/bmesh/operators/bmo_edgenet.c
source/blender/bmesh/operators/bmo_subdivide.c
source/blender/editors/curve/editcurve.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_particleinstance.c
source/blender/modifiers/intern/MOD_weightvg_util.c
source/blender/modifiers/intern/MOD_weightvg_util.h
source/blender/modifiers/intern/MOD_weightvgedit.c
source/blender/modifiers/intern/MOD_weightvgproximity.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/rayshade.c