diff options
author | Brecht Van Lommel <brecht> | 2020-02-27 13:23:15 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-02-28 15:49:35 +0300 |
commit | 318112379d6d251334b8f3d2a20b935210446b4f (patch) | |
tree | 5fc125ebf73805d209ca071d4118fcede4920c2b /source/blender/blenkernel/intern/effect.c | |
parent | c60be37f3ebf20ab9b4563d03c0acb97ecf047cc (diff) |
Objects: make evaluated data runtime storage usable for types other than mesh
This is in preparation of new object types. This only changes mesh_eval, we
may do the same for mesh_deform_eval and other areas in the future if there is
a need for it.
This previously caused a bug in T74283, that should be fixed now.
Differential Revision: https://developer.blender.org/D6695
Diffstat (limited to 'source/blender/blenkernel/intern/effect.c')
-rw-r--r-- | source/blender/blenkernel/intern/effect.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index 8971021329a..4a9efc7cac4 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -315,7 +315,7 @@ ListBase *BKE_effectors_create(Depsgraph *depsgraph, else if (weights->weight[ob->pd->forcefield] == 0.0f) { continue; } - else if (ob->pd->shape == PFIELD_SHAPE_POINTS && ob->runtime.mesh_eval == NULL) { + else if (ob->pd->shape == PFIELD_SHAPE_POINTS && BKE_object_get_evaluated_mesh(ob) == NULL) { continue; } @@ -656,7 +656,7 @@ int get_effector_data(EffectorCache *eff, efd->size = 0.0f; } else if (eff->pd && eff->pd->shape == PFIELD_SHAPE_POINTS) { - Mesh *me_eval = eff->ob->runtime.mesh_eval; + Mesh *me_eval = BKE_object_get_evaluated_mesh(eff->ob); if (me_eval != NULL) { copy_v3_v3(efd->loc, me_eval->mvert[*efd->index].co); normal_short_to_float_v3(efd->nor, me_eval->mvert[*efd->index].no); @@ -769,7 +769,7 @@ static void get_effector_tot( efd->index = p; if (eff->pd->shape == PFIELD_SHAPE_POINTS) { - Mesh *me_eval = eff->ob->runtime.mesh_eval; + Mesh *me_eval = BKE_object_get_evaluated_mesh(eff->ob); *tot = me_eval != NULL ? me_eval->totvert : 1; if (*tot && eff->pd->forcefield == PFIELD_HARMONIC && point->index >= 0) { |