Changeset View
Changeset View
Standalone View
Standalone View
source/blender/alembic/intern/abc_mball.cc
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
| bool AbcMBallWriter::isAnimated() const | bool AbcMBallWriter::isAnimated() const | ||||
| { | { | ||||
| return true; | return true; | ||||
| } | } | ||||
| Mesh *AbcMBallWriter::getEvaluatedMesh(Scene * /*scene_eval*/, Object *ob_eval, bool &r_needsfree) | 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. */ | /* Mesh_eval only exists when generative modifiers are in use. */ | ||||
| r_needsfree = false; | r_needsfree = false; | ||||
| return ob_eval->runtime.mesh_eval; | return mesh_eval; | ||||
| } | } | ||||
| r_needsfree = true; | r_needsfree = true; | ||||
| /* The approach below is copied from BKE_mesh_new_from_object() */ | /* The approach below is copied from BKE_mesh_new_from_object() */ | ||||
| Mesh *tmpmesh = BKE_mesh_add(m_bmain, ((ID *)m_object->data)->name + 2); | Mesh *tmpmesh = BKE_mesh_add(m_bmain, ((ID *)m_object->data)->name + 2); | ||||
| BLI_assert(tmpmesh != NULL); | BLI_assert(tmpmesh != NULL); | ||||
| /* BKE_mesh_add gives us a user count we don't need */ | /* BKE_mesh_add gives us a user count we don't need */ | ||||
| Show All 26 Lines | |||||