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:
Diffstat (limited to 'source/blender/io/alembic/intern/abc_reader_points.cc')
-rw-r--r--source/blender/io/alembic/intern/abc_reader_points.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/io/alembic/intern/abc_reader_points.cc b/source/blender/io/alembic/intern/abc_reader_points.cc
index f8cc6b0314a..f7dcba7a0de 100644
--- a/source/blender/io/alembic/intern/abc_reader_points.cc
+++ b/source/blender/io/alembic/intern/abc_reader_points.cc
@@ -27,6 +27,7 @@
#include "abc_util.h"
#include "DNA_mesh_types.h"
+#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "BKE_customdata.h"
@@ -81,7 +82,7 @@ bool AbcPointsReader::accepts_object_type(
void AbcPointsReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSelector &sample_sel)
{
Mesh *mesh = BKE_mesh_add(bmain, m_data_name.c_str());
- Mesh *read_mesh = this->read_mesh(mesh, sample_sel, 0, NULL);
+ Mesh *read_mesh = this->read_mesh(mesh, sample_sel, 0, nullptr);
if (read_mesh != mesh) {
BKE_mesh_nomain_to_mesh(read_mesh, mesh, m_object, &CD_MASK_MESH, true);
@@ -125,7 +126,7 @@ void read_points_sample(const IPointsSchema &schema,
struct Mesh *AbcPointsReader::read_mesh(struct Mesh *existing_mesh,
const ISampleSelector &sample_sel,
- int /*read_flag*/,
+ int read_flag,
const char **err_str)
{
IPointsSchema::Sample sample;
@@ -144,16 +145,18 @@ struct Mesh *AbcPointsReader::read_mesh(struct Mesh *existing_mesh,
const P3fArraySamplePtr &positions = sample.getPositions();
- Mesh *new_mesh = NULL;
+ Mesh *new_mesh = nullptr;
if (existing_mesh->totvert != positions->size()) {
new_mesh = BKE_mesh_new_nomain(positions->size(), 0, 0, 0, 0);
}
- CDStreamConfig config = get_config(new_mesh ? new_mesh : existing_mesh);
+ Mesh *mesh_to_export = new_mesh ? new_mesh : existing_mesh;
+ const bool use_vertex_interpolation = read_flag & MOD_MESHSEQ_INTERPOLATE_VERTICES;
+ CDStreamConfig config = get_config(mesh_to_export, use_vertex_interpolation);
read_points_sample(m_schema, sample_sel, config);
- return new_mesh ? new_mesh : existing_mesh;
+ return mesh_to_export;
}
} // namespace blender::io::alembic