diff options
author | Bastien Montagne <bastien@blender.org> | 2021-05-21 15:55:21 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-05-21 18:22:43 +0300 |
commit | adf2f146d89dfb508bf549737ee393d9424c646b (patch) | |
tree | 475fcc31246610fa96f3535b3f47cbbe0f23df8e /source/blender/blenkernel | |
parent | 305b08b521acbc6438e94581b1072c410dfa889c (diff) |
Fix particle ID init not creating particle deflect data.
This data (the force fields) are expected to always be there, but they
are currently created on the fly by RNA accessors (typically from UI
draw code), which is extremely wrong way to do it.
Differential Revision: https://developer.blender.org/D11341
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/particle.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index ae685357151..a873ecec6f1 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -101,6 +101,8 @@ static void particle_settings_init(ID *id) MEMCPY_STRUCT_AFTER(particle_settings, DNA_struct_default_get(ParticleSettings), id); particle_settings->effector_weights = BKE_effector_add_weights(NULL); + particle_settings->pd = BKE_partdeflect_new(PFIELD_NULL); + particle_settings->pd2 = BKE_partdeflect_new(PFIELD_NULL); } static void particle_settings_copy_data(Main *UNUSED(bmain), |