fixes #50 by setting refcounters to 0 if the property is not present

This commit is contained in:
schultz
2018-03-19 14:45:17 +01:00
parent dea8812792
commit 43031ea84f

View File

@@ -744,48 +744,34 @@ private:
{ {
//mesh has no points? //mesh has no points?
} }
if(this->get_property_handle(vertex_normals_, refcount_vnormals_ = this->get_property_handle(vertex_normals_,
"v:normals")) "v:normals") ? 1 : 0 ;
refcount_vnormals_ = 1; refcount_vcolors_ = this->get_property_handle(vertex_colors_,
if(this->get_property_handle(vertex_colors_, "v:colors") ? 1 : 0 ;
"v:colors")) refcount_vtexcoords1D_ = this->get_property_handle(vertex_texcoords1D_,
refcount_vcolors_ = 1; "v:texcoords1D") ? 1 : 0 ;
if(this->get_property_handle(vertex_texcoords1D_, refcount_vtexcoords2D_ = this->get_property_handle(vertex_texcoords2D_,
"v:texcoords1D")) "v:texcoords2D") ? 1 : 0 ;
refcount_vtexcoords1D_ = 1; refcount_vtexcoords3D_ = this->get_property_handle(vertex_texcoords3D_,
if(this->get_property_handle(vertex_texcoords2D_, "v:texcoords3D") ? 1 : 0 ;
"v:texcoords2D")) refcount_htexcoords1D_ = this->get_property_handle(halfedge_texcoords1D_,
refcount_vtexcoords2D_ = 1; "h:texcoords1D") ? 1 : 0 ;
if(this->get_property_handle(vertex_texcoords3D_, refcount_htexcoords2D_ = this->get_property_handle(halfedge_texcoords2D_,
"v:texcoords3D")) "h:texcoords2D") ? 1 : 0 ;
refcount_vtexcoords3D_ = 1; refcount_htexcoords3D_ = this->get_property_handle(halfedge_texcoords3D_,
if(this->get_property_handle(halfedge_texcoords1D_, "h:texcoords3D") ? 1 : 0 ;
"h:texcoords1D")) refcount_henormals_ = this->get_property_handle(halfedge_normals_,
refcount_htexcoords1D_ = 1; "h:normals") ? 1 : 0 ;
if(this->get_property_handle(halfedge_texcoords2D_, refcount_hecolors_ = this->get_property_handle(halfedge_colors_,
"h:texcoords2D")) "h:colors") ? 1 : 0 ;
refcount_htexcoords2D_ = 1; refcount_ecolors_ = this->get_property_handle(edge_colors_,
if(this->get_property_handle(halfedge_texcoords3D_, "e:colors") ? 1 : 0 ;
"h:texcoords3D")) refcount_fnormals_ = this->get_property_handle(face_normals_,
refcount_htexcoords3D_ = 1; "f:normals") ? 1 : 0 ;
if(this->get_property_handle(halfedge_normals_, refcount_fcolors_ = this->get_property_handle(face_colors_,
"h:normals")) "f:colors") ? 1 : 0 ;
refcount_henormals_ = 1; refcount_ftextureIndex_ = this->get_property_handle(face_texture_index_,
if(this->get_property_handle(halfedge_colors_, "f:textureindex") ? 1 : 0 ;
"h:colors"))
refcount_hecolors_ = 1;
if(this->get_property_handle(edge_colors_,
"e:colors"))
refcount_ecolors_ = 1;
if(this->get_property_handle(face_normals_,
"f:normals"))
refcount_fnormals_ = 1;
if(this->get_property_handle(face_colors_,
"f:colors"))
refcount_fcolors_ = 1;
if(this->get_property_handle(face_texture_index_,
"f:textureindex"))
refcount_ftextureIndex_ = 1;
} }
}; };