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
This commit is contained in:
parent
47d76e0903
commit
3e77f747c0
Notes:
blender-bot
2023-02-14 05:37:19 +01:00
Referenced by issue #89265, Use-after-free when tabbing through numeric inputs
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue