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
path: root/source
diff options
context:
space:
mode:
authorMichael Kowalski <makowalski@nvidia.com>2022-10-27 02:58:28 +0300
committerMichael Kowalski <makowalski@nvidia.com>2022-10-27 02:58:28 +0300
commit4fa478c724903ee3d4a4cb6aaf05775a7c46ad01 (patch)
tree82f3fdcc8d3cb90cce54413082ed76f95f255b81 /source
parent784ea87375cebd7c12faada555f65c741895bca0 (diff)
USD Export: handle meshes in edit mode.
Small change to ensure Edit mode meshes are committed during the export process. Without this change, meshes may be empty in the USD. This update was authored by Charles Wardlaw.
Diffstat (limited to 'source')
-rw-r--r--source/blender/io/usd/intern/usd_writer_mesh.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/io/usd/intern/usd_writer_mesh.cc b/source/blender/io/usd/intern/usd_writer_mesh.cc
index fca7ab08e30..3d2aacb2d42 100644
--- a/source/blender/io/usd/intern/usd_writer_mesh.cc
+++ b/source/blender/io/usd/intern/usd_writer_mesh.cc
@@ -19,6 +19,7 @@
#include "BKE_material.h"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.h"
+#include "BKE_mesh_wrapper.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
@@ -26,7 +27,6 @@
#include "bmesh_tools.h"
#include "DEG_depsgraph.h"
-
#include "DNA_layer_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
@@ -504,6 +504,8 @@ void USDGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh)
write_visibility(context, timecode, usd_mesh);
USDMeshData usd_mesh_data;
+ /* ensure data exists if currently in edit mode */
+ BKE_mesh_wrapper_ensure_mdata(mesh);
get_geometry_data(mesh, usd_mesh_data);
if (usd_export_context_.export_params.export_vertices) {