diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-06-05 13:39:40 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-06-13 12:34:01 +0300 |
commit | 36faf739a71624b6ca10cec7233779f9eeace0bd (patch) | |
tree | ad57fbc75b6bce4bdc590384a3fdf4eeb5fdbaf0 /source/blender/modifiers/intern/MOD_particleinstance.c | |
parent | 27537daee1b62aab0fb0d01b89b7d2c044e796cd (diff) |
Particle system: Move runtime data to runtime field
Allows it to be preserved during copy-on-write update when on-geometry
related update is needed.
This is a required part for T63537, where we need to preserve the entire
evaluation data when object is tagged for only RECALC_COPY_ON_WRITE.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5023
Diffstat (limited to 'source/blender/modifiers/intern/MOD_particleinstance.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_particleinstance.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c index 71913378277..651feb836cc 100644 --- a/source/blender/modifiers/intern/MOD_particleinstance.c +++ b/source/blender/modifiers/intern/MOD_particleinstance.c @@ -415,7 +415,11 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes ChildParticle *cpa = psys->child + (p - psys->totpart); pa = psys->particles + (between ? cpa->pa[0] : cpa->parent); } - psys_mat_hair_to_global(sim.ob, sim.psmd->mesh_final, sim.psys->part->from, pa, hairmat); + psys_mat_hair_to_global(sim.ob, + BKE_particle_modifier_mesh_final_get(sim.psmd), + sim.psys->part->from, + pa, + hairmat); copy_m3_m4(mat, hairmat); /* to quaternion */ mat3_to_quat(frame, mat); |