Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht>2020-02-27 13:23:15 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-02-27 17:25:35 +0300
commitf2b95b9eae2ee913c99cff7595527b18d8b49d0a (patch)
tree4bbd1a009cd5ace8bd9bb3efe8e5882a459b5f98 /source/blender/alembic
parent57b7833d1eff5e11bbdec654ff09fb24263cc055 (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/alembic')
-rw-r--r--source/blender/alembic/intern/abc_writer_curves.cc6
-rw-r--r--source/blender/alembic/intern/abc_writer_mball.cc6
2 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/alembic/intern/abc_writer_curves.cc b/source/blender/alembic/intern/abc_writer_curves.cc
index bb9109dc025..3ab9b365a72 100644
--- a/source/blender/alembic/intern/abc_writer_curves.cc
+++ b/source/blender/alembic/intern/abc_writer_curves.cc
@@ -31,6 +31,7 @@ extern "C" {
#include "BKE_curve.h"
#include "BKE_mesh.h"
+#include "BKE_object.h"
}
using Alembic::AbcGeom::OCompoundProperty;
@@ -176,10 +177,11 @@ Mesh *AbcCurveMeshWriter::getEvaluatedMesh(Scene * /*scene_eval*/,
Object *ob_eval,
bool &r_needsfree)
{
- if (ob_eval->runtime.mesh_eval != NULL) {
+ Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob_eval);
+ if (mesh_eval != NULL) {
/* Mesh_eval only exists when generative modifiers are in use. */
r_needsfree = false;
- return ob_eval->runtime.mesh_eval;
+ return mesh_eval;
}
r_needsfree = true;
diff --git a/source/blender/alembic/intern/abc_writer_mball.cc b/source/blender/alembic/intern/abc_writer_mball.cc
index aa08146c6e2..cc0775bd537 100644
--- a/source/blender/alembic/intern/abc_writer_mball.cc
+++ b/source/blender/alembic/intern/abc_writer_mball.cc
@@ -30,6 +30,7 @@ extern "C" {
#include "BKE_lib_id.h"
#include "BKE_mball.h"
#include "BKE_mesh.h"
+#include "BKE_object.h"
#include "BLI_utildefines.h"
}
@@ -55,10 +56,11 @@ bool AbcMBallWriter::isAnimated() const
Mesh *AbcMBallWriter::getEvaluatedMesh(Scene * /*scene_eval*/, Object *ob_eval, bool &r_needsfree)
{
- if (ob_eval->runtime.mesh_eval != NULL) {
+ Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob_eval);
+ if (mesh_eval != NULL) {
/* Mesh_eval only exists when generative modifiers are in use. */
r_needsfree = false;
- return ob_eval->runtime.mesh_eval;
+ return mesh_eval;
}
r_needsfree = true;