Changeset View
Changeset View
Standalone View
Standalone View
source/blender/alembic/intern/abc_writer_curves.cc
| Show All 25 Lines | |||||
| #include "abc_writer_transform.h" | #include "abc_writer_transform.h" | ||||
| extern "C" { | extern "C" { | ||||
| #include "DNA_curve_types.h" | #include "DNA_curve_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "BKE_curve.h" | #include "BKE_curve.h" | ||||
| #include "BKE_mesh.h" | #include "BKE_mesh.h" | ||||
| #include "BKE_object.h" | |||||
| } | } | ||||
| using Alembic::AbcGeom::OCompoundProperty; | using Alembic::AbcGeom::OCompoundProperty; | ||||
| using Alembic::AbcGeom::OCurves; | using Alembic::AbcGeom::OCurves; | ||||
| using Alembic::AbcGeom::OCurvesSchema; | using Alembic::AbcGeom::OCurvesSchema; | ||||
| using Alembic::AbcGeom::OInt16Property; | using Alembic::AbcGeom::OInt16Property; | ||||
| using Alembic::AbcGeom::ON3fGeomParam; | using Alembic::AbcGeom::ON3fGeomParam; | ||||
| using Alembic::AbcGeom::OV2fGeomParam; | using Alembic::AbcGeom::OV2fGeomParam; | ||||
| ▲ Show 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | AbcCurveMeshWriter::AbcCurveMeshWriter(Object *ob, | ||||
| : AbcGenericMeshWriter(ob, parent, time_sampling, settings) | : AbcGenericMeshWriter(ob, parent, time_sampling, settings) | ||||
| { | { | ||||
| } | } | ||||
| Mesh *AbcCurveMeshWriter::getEvaluatedMesh(Scene * /*scene_eval*/, | Mesh *AbcCurveMeshWriter::getEvaluatedMesh(Scene * /*scene_eval*/, | ||||
| Object *ob_eval, | Object *ob_eval, | ||||
| bool &r_needsfree) | 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; | ||||
| return BKE_mesh_new_nomain_from_curve(ob_eval); | return BKE_mesh_new_nomain_from_curve(ob_eval); | ||||
| } | } | ||||