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:
authorSybren A. Stüvel <sybren@blender.org>2021-05-06 13:19:24 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-05-06 13:19:24 +0300
commit3e77f747c0d1eec74ab5c6717b66f329bc0f3753 (patch)
treed9e60bf16b04dcebfc2b79da23a67e4bc873ca4c /source/blender/io
parent47d76e0903663daccb9780b0c5a72fbe12033bc7 (diff)
Alembic export: export UV maps on every frame
Export UV maps to Alembic on every frame. This makes the export of UV maps consistent with mesh normals. In the case of static UV maps it may cause a slight slowdown (since they're exported on every frame now), but due to the deduplication performed by the Alembic library, the resulting files will be the same size anyway. Thanks to @CodyWinch for providing the solution to the problem, and writing the original patch D8397. Differential Revision: https://developer.blender.org/D8397
Diffstat (limited to 'source/blender/io')
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_mesh.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/io/alembic/exporter/abc_writer_mesh.cc b/source/blender/io/alembic/exporter/abc_writer_mesh.cc
index c00e57c8edc..29b29324ee3 100644
--- a/source/blender/io/alembic/exporter/abc_writer_mesh.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_mesh.cc
@@ -250,7 +250,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()) {
@@ -312,7 +312,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()) {