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/wavefront_obj/exporter/obj_export_mesh.hh')
-rw-r--r--source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
index 390d8034337..f3ace140006 100644
--- a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
+++ b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
@@ -32,6 +32,7 @@
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
+#include "DNA_object_types.h"
#include "IO_wavefront_obj.h"
@@ -57,7 +58,11 @@ using unique_bmesh_ptr = std::unique_ptr<BMesh, CustomBMeshDeleter>;
class OBJMesh : NonCopyable {
private:
- Object *export_object_eval_;
+ /**
+ * We need to copy the entire Object structure here because the dependency graph iterator
+ * sometimes builds an Object in a temporary space that doesn't persist.
+ */
+ Object export_object_eval_;
Mesh *export_mesh_eval_;
/**
* For curves which are converted to mesh, and triangulated meshes, a new mesh is allocated.
@@ -85,7 +90,7 @@ class OBJMesh : NonCopyable {
* Total number of normal indices (maximum entry, plus 1, in
* the loop_to_norm_index_ vector).
*/
- int tot_normal_indices_ = NEGATIVE_INIT;
+ int tot_normal_indices_ = 0;
/**
* Total smooth groups in an object.
*/