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/exporter')
-rw-r--r--source/blender/io/alembic/exporter/abc_custom_props.cc4
-rw-r--r--source/blender/io/alembic/exporter/abc_custom_props.h2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_abstract.cc4
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_abstract.h1
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_instance.cc4
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_instance.h1
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_mball.cc2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_mesh.cc17
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_mesh.h1
9 files changed, 13 insertions, 23 deletions
diff --git a/source/blender/io/alembic/exporter/abc_custom_props.cc b/source/blender/io/alembic/exporter/abc_custom_props.cc
index 382afdc294d..f5593e7ee30 100644
--- a/source/blender/io/alembic/exporter/abc_custom_props.cc
+++ b/source/blender/io/alembic/exporter/abc_custom_props.cc
@@ -51,10 +51,6 @@ CustomPropertiesExporter::CustomPropertiesExporter(ABCAbstractWriter *owner) : o
{
}
-CustomPropertiesExporter::~CustomPropertiesExporter()
-{
-}
-
void CustomPropertiesExporter::write_all(const IDProperty *group)
{
if (group == nullptr) {
diff --git a/source/blender/io/alembic/exporter/abc_custom_props.h b/source/blender/io/alembic/exporter/abc_custom_props.h
index d3f9b2fc43c..fcd47382d96 100644
--- a/source/blender/io/alembic/exporter/abc_custom_props.h
+++ b/source/blender/io/alembic/exporter/abc_custom_props.h
@@ -61,7 +61,7 @@ class CustomPropertiesExporter {
public:
CustomPropertiesExporter(ABCAbstractWriter *owner);
- virtual ~CustomPropertiesExporter();
+ virtual ~CustomPropertiesExporter() = default;
void write_all(const IDProperty *group);
diff --git a/source/blender/io/alembic/exporter/abc_writer_abstract.cc b/source/blender/io/alembic/exporter/abc_writer_abstract.cc
index e99048cc0ee..27b5c2fa2a4 100644
--- a/source/blender/io/alembic/exporter/abc_writer_abstract.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_abstract.cc
@@ -45,10 +45,6 @@ ABCAbstractWriter::ABCAbstractWriter(const ABCWriterConstructorArgs &args)
{
}
-ABCAbstractWriter::~ABCAbstractWriter()
-{
-}
-
bool ABCAbstractWriter::is_supported(const HierarchyContext * /*context*/) const
{
return true;
diff --git a/source/blender/io/alembic/exporter/abc_writer_abstract.h b/source/blender/io/alembic/exporter/abc_writer_abstract.h
index 4997e498199..d3500394555 100644
--- a/source/blender/io/alembic/exporter/abc_writer_abstract.h
+++ b/source/blender/io/alembic/exporter/abc_writer_abstract.h
@@ -50,7 +50,6 @@ class ABCAbstractWriter : public AbstractHierarchyWriter {
public:
explicit ABCAbstractWriter(const ABCWriterConstructorArgs &args);
- virtual ~ABCAbstractWriter();
virtual void write(HierarchyContext &context) override;
diff --git a/source/blender/io/alembic/exporter/abc_writer_instance.cc b/source/blender/io/alembic/exporter/abc_writer_instance.cc
index 7f3b044cb8b..1737e8c091e 100644
--- a/source/blender/io/alembic/exporter/abc_writer_instance.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_instance.cc
@@ -35,10 +35,6 @@ ABCInstanceWriter::ABCInstanceWriter(const ABCWriterConstructorArgs &args)
{
}
-ABCInstanceWriter::~ABCInstanceWriter()
-{
-}
-
void ABCInstanceWriter::create_alembic_objects(const HierarchyContext *context)
{
OObject original = args_.hierarchy_iterator->get_alembic_object(context->original_export_path);
diff --git a/source/blender/io/alembic/exporter/abc_writer_instance.h b/source/blender/io/alembic/exporter/abc_writer_instance.h
index f7d6450055a..1e4285d5e02 100644
--- a/source/blender/io/alembic/exporter/abc_writer_instance.h
+++ b/source/blender/io/alembic/exporter/abc_writer_instance.h
@@ -31,7 +31,6 @@ namespace blender::io::alembic {
class ABCInstanceWriter : public ABCAbstractWriter {
public:
explicit ABCInstanceWriter(const ABCWriterConstructorArgs &args);
- virtual ~ABCInstanceWriter();
virtual void create_alembic_objects(const HierarchyContext *context) override;
virtual Alembic::Abc::OObject get_alembic_object() const override;
diff --git a/source/blender/io/alembic/exporter/abc_writer_mball.cc b/source/blender/io/alembic/exporter/abc_writer_mball.cc
index a797310f864..ad78f8ce802 100644
--- a/source/blender/io/alembic/exporter/abc_writer_mball.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_mball.cc
@@ -69,7 +69,7 @@ Mesh *ABCMetaballWriter::get_export_mesh(Object *object_eval, bool &r_needsfree)
return mesh_eval;
}
r_needsfree = true;
- return BKE_mesh_new_from_object(args_.depsgraph, object_eval, false);
+ return BKE_mesh_new_from_object(args_.depsgraph, object_eval, false, false);
}
void ABCMetaballWriter::free_export_mesh(Mesh *mesh)
diff --git a/source/blender/io/alembic/exporter/abc_writer_mesh.cc b/source/blender/io/alembic/exporter/abc_writer_mesh.cc
index fbc662113cc..fd7db005dd2 100644
--- a/source/blender/io/alembic/exporter/abc_writer_mesh.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_mesh.cc
@@ -113,10 +113,6 @@ void ABCGenericMeshWriter::create_alembic_objects(const HierarchyContext *contex
liquid_sim_modifier_ = get_liquid_sim_modifier(scene_eval, context->object);
}
-ABCGenericMeshWriter::~ABCGenericMeshWriter()
-{
-}
-
Alembic::Abc::OObject ABCGenericMeshWriter::get_alembic_object() const
{
if (is_subd_) {
@@ -204,6 +200,7 @@ void ABCGenericMeshWriter::do_write(HierarchyContext &context)
}
m_custom_data_config.pack_uvs = args_.export_params->packuv;
+ m_custom_data_config.mesh = mesh;
m_custom_data_config.mpoly = mesh->mpoly;
m_custom_data_config.mloop = mesh->mloop;
m_custom_data_config.totpoly = mesh->totpoly;
@@ -254,7 +251,7 @@ void ABCGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh)
UVSample uvs_and_indices;
- if (!frame_has_been_written_ && args_.export_params->uvs) {
+ if (args_.export_params->uvs) {
const char *name = get_uv_sample(uvs_and_indices, m_custom_data_config, &mesh->ldata);
if (!uvs_and_indices.indices.empty() && !uvs_and_indices.uvs.empty()) {
@@ -283,6 +280,10 @@ void ABCGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh)
mesh_sample.setNormals(normals_sample);
}
+ if (args_.export_params->orcos) {
+ write_generated_coordinates(abc_poly_mesh_schema_.getArbGeomParams(), m_custom_data_config);
+ }
+
if (liquid_sim_modifier_ != nullptr) {
get_velocities(mesh, velocities);
mesh_sample.setVelocities(V3fArraySample(velocities));
@@ -316,7 +317,7 @@ void ABCGenericMeshWriter::write_subd(HierarchyContext &context, struct Mesh *me
V3fArraySample(points), Int32ArraySample(poly_verts), Int32ArraySample(loop_counts));
UVSample sample;
- if (!frame_has_been_written_ && args_.export_params->uvs) {
+ if (args_.export_params->uvs) {
const char *name = get_uv_sample(sample, m_custom_data_config, &mesh->ldata);
if (!sample.indices.empty() && !sample.uvs.empty()) {
@@ -333,6 +334,10 @@ void ABCGenericMeshWriter::write_subd(HierarchyContext &context, struct Mesh *me
abc_subdiv_schema_.getArbGeomParams(), m_custom_data_config, &mesh->ldata, CD_MLOOPUV);
}
+ if (args_.export_params->orcos) {
+ write_generated_coordinates(abc_poly_mesh_schema_.getArbGeomParams(), m_custom_data_config);
+ }
+
if (!crease_indices.empty()) {
subdiv_sample.setCreaseIndices(Int32ArraySample(crease_indices));
subdiv_sample.setCreaseLengths(Int32ArraySample(crease_lengths));
diff --git a/source/blender/io/alembic/exporter/abc_writer_mesh.h b/source/blender/io/alembic/exporter/abc_writer_mesh.h
index ed4fb4e4514..0e1792b9dab 100644
--- a/source/blender/io/alembic/exporter/abc_writer_mesh.h
+++ b/source/blender/io/alembic/exporter/abc_writer_mesh.h
@@ -51,7 +51,6 @@ class ABCGenericMeshWriter : public ABCAbstractWriter {
public:
explicit ABCGenericMeshWriter(const ABCWriterConstructorArgs &args);
- virtual ~ABCGenericMeshWriter();
virtual void create_alembic_objects(const HierarchyContext *context) override;
virtual Alembic::Abc::OObject get_alembic_object() const override;