only write custom properties if the Custom option is set
This commit is contained in:
@@ -110,7 +110,7 @@ public:
|
|||||||
FaceTexCoord = 0x0400, ///< Has (r) / store (w) face texture coordinates
|
FaceTexCoord = 0x0400, ///< Has (r) / store (w) face texture coordinates
|
||||||
ColorAlpha = 0x0800, ///< Has (r) / store (w) alpha values for colors
|
ColorAlpha = 0x0800, ///< Has (r) / store (w) alpha values for colors
|
||||||
ColorFloat = 0x1000, ///< Has (r) / store (w) float values for colors (currently only implemented for PLY and OFF files)
|
ColorFloat = 0x1000, ///< Has (r) / store (w) float values for colors (currently only implemented for PLY and OFF files)
|
||||||
Custom = 0x2000, ///< Has (r) custom properties (currently only implemented in PLY Reader ASCII version)
|
Custom = 0x2000, ///< Has (r) / store (w) custom properties (currently PLY only supports reading and only ASCII version. OM supports reading and writing)
|
||||||
Status = 0x4000, ///< Has (r) / store (w) status properties
|
Status = 0x4000, ///< Has (r) / store (w) status properties
|
||||||
TexCoordST = 0x8000 ///< Write texture coordinates as ST instead of UV
|
TexCoordST = 0x8000 ///< Write texture coordinates as ST instead of UV
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -562,8 +562,8 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be,
|
|||||||
|
|
||||||
// -------------------- write custom properties
|
// -------------------- write custom properties
|
||||||
|
|
||||||
|
if (_opt.check(Options::Custom))
|
||||||
|
{
|
||||||
const auto store_property = [this, &_os, swap, &bytes](
|
const auto store_property = [this, &_os, swap, &bytes](
|
||||||
const BaseKernel::const_prop_iterator _it_begin,
|
const BaseKernel::const_prop_iterator _it_begin,
|
||||||
const BaseKernel::const_prop_iterator _it_end,
|
const BaseKernel::const_prop_iterator _it_end,
|
||||||
@@ -590,6 +590,7 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be,
|
|||||||
OMFormat::Chunk::Entity_Halfedge);
|
OMFormat::Chunk::Entity_Halfedge);
|
||||||
store_property(_be.kernel()->mprops_begin(), _be.kernel()->mprops_end(),
|
store_property(_be.kernel()->mprops_begin(), _be.kernel()->mprops_end(),
|
||||||
OMFormat::Chunk::Entity_Mesh);
|
OMFormat::Chunk::Entity_Mesh);
|
||||||
|
}
|
||||||
|
|
||||||
memset(&chunk_header, 0, sizeof(chunk_header));
|
memset(&chunk_header, 0, sizeof(chunk_header));
|
||||||
chunk_header.name_ = false;
|
chunk_header.name_ = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user