Commit 46c87795 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'OM_Format_no_faces_fix' into 'master'

Fixed OMWriter when no faces are available (Thanks to Jamie Kydd for the patch)

See merge request !111
parents b2615132 dc79c22a
Pipeline #3972 passed with stage
in 49 minutes and 2 seconds
......@@ -318,7 +318,7 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be,
// ---------- write face normals
if ( _be.has_face_normals() && _opt.check(Options::FaceNormal) )
if (_be.n_faces() && _be.has_face_normals() && _opt.check(Options::FaceNormal) )
{
#define NEW_STYLE 0
#if NEW_STYLE
......@@ -353,7 +353,7 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be,
// ---------- write face color
if (_be.has_face_colors() && _opt.check( Options::FaceColor ))
if (_be.n_faces() && _be.has_face_colors() && _opt.check( Options::FaceColor ))
{
#define NEW_STYLE 0
#if NEW_STYLE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment