diff options
author | Brecht Van Lommel <brecht> | 2020-02-27 13:23:15 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-02-27 17:25:35 +0300 |
commit | f2b95b9eae2ee913c99cff7595527b18d8b49d0a (patch) | |
tree | 4bbd1a009cd5ace8bd9bb3efe8e5882a459b5f98 /source/blender/editors/mesh/editmesh_knife_project.c | |
parent | 57b7833d1eff5e11bbdec654ff09fb24263cc055 (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.
Differential Revision: https://developer.blender.org/D6695
Diffstat (limited to 'source/blender/editors/mesh/editmesh_knife_project.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife_project.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife_project.c b/source/blender/editors/mesh/editmesh_knife_project.c index 8d5c1469694..21de89d33dd 100644 --- a/source/blender/editors/mesh/editmesh_knife_project.c +++ b/source/blender/editors/mesh/editmesh_knife_project.c @@ -33,6 +33,7 @@ #include "BKE_curve.h" #include "BKE_editmesh.h" #include "BKE_mesh_runtime.h" +#include "BKE_object.h" #include "BKE_report.h" #include "DEG_depsgraph.h" @@ -61,9 +62,9 @@ static LinkNode *knifeproject_poly_from_object(const bContext *C, struct Mesh *me_eval; bool me_eval_needs_free; - if (ob->type == OB_MESH || ob->runtime.mesh_eval) { + if (ob->type == OB_MESH || ob->runtime.data_eval) { Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); - me_eval = ob_eval->runtime.mesh_eval; + me_eval = BKE_object_get_evaluated_mesh(ob_eval); if (me_eval == NULL) { Scene *scene_eval = (Scene *)DEG_get_evaluated_id(depsgraph, &scene->id); me_eval = mesh_get_eval_final(depsgraph, scene_eval, ob_eval, &CD_MASK_BAREMESH); |