only read custom properties if the option includes Option::Custom
This commit is contained in:
@@ -406,6 +406,7 @@ bool _OMReader_::read_binary_vertex_chunk(std::istream &_is, BaseImporter &_bi,
|
||||
{
|
||||
Chunk::PropertyName property_type;
|
||||
bytes_ += restore(_is, property_type, _swap);
|
||||
if (_opt.check(Options::Custom))
|
||||
add_generic_property(property_type, _bi);
|
||||
}
|
||||
|
||||
@@ -563,6 +564,7 @@ bool _OMReader_::read_binary_face_chunk(std::istream &_is, BaseImporter &_bi, Op
|
||||
{
|
||||
Chunk::PropertyName property_type;
|
||||
bytes_ += restore(_is, property_type, _swap);
|
||||
if (_opt.check(Options::Custom))
|
||||
add_generic_property(property_type, _bi);
|
||||
}
|
||||
|
||||
@@ -604,6 +606,7 @@ bool _OMReader_::read_binary_edge_chunk(std::istream &_is, BaseImporter &_bi, Op
|
||||
{
|
||||
Chunk::PropertyName property_type;
|
||||
bytes_ += restore(_is, property_type, _swap);
|
||||
if (_opt.check(Options::Custom))
|
||||
add_generic_property(property_type, _bi);
|
||||
}
|
||||
|
||||
@@ -654,6 +657,7 @@ bool _OMReader_::read_binary_halfedge_chunk(std::istream &_is, BaseImporter &_bi
|
||||
{
|
||||
Chunk::PropertyName property_type;
|
||||
bytes_ += restore(_is, property_type, _swap);
|
||||
if (_opt.check(Options::Custom))
|
||||
add_generic_property(property_type, _bi);
|
||||
}
|
||||
|
||||
@@ -745,7 +749,7 @@ bool _OMReader_::read_binary_halfedge_chunk(std::istream &_is, BaseImporter &_bi
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool _OMReader_::read_binary_mesh_chunk(std::istream &_is, BaseImporter &_bi, Options & /* _opt */, bool _swap) const
|
||||
bool _OMReader_::read_binary_mesh_chunk(std::istream &_is, BaseImporter &_bi, Options& _opt , bool _swap) const
|
||||
{
|
||||
using OMFormat::Chunk;
|
||||
|
||||
@@ -760,6 +764,7 @@ bool _OMReader_::read_binary_mesh_chunk(std::istream &_is, BaseImporter &_bi, Op
|
||||
{
|
||||
Chunk::PropertyName property_type;
|
||||
bytes_ += restore(_is, property_type, _swap);
|
||||
if (_opt.check(Options::Custom))
|
||||
add_generic_property(property_type, _bi);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user