diff --git a/vcg/complex/allocate.h b/vcg/complex/allocate.h index a04754c3..ea5255db 100644 --- a/vcg/complex/allocate.h +++ b/vcg/complex/allocate.h @@ -1157,12 +1157,12 @@ public: template static void - ClearPerVertexAttribute( MeshType & m,typename MeshType::template PerVertexAttributeHandle & h){ + ClearPerVertexAttribute( MeshType & m,typename MeshType::template PerVertexAttributeHandle & h, const ATTR_TYPE & initVal = ATTR_TYPE()){ typename std::set ::iterator i; for( i = m.vert_attr.begin(); i != m.vert_attr.end(); ++i) if( (*i)._handle == h._handle ){ for(typename MeshType::VertexIterator vi = m.vert.begin(); vi != m.vert.end(); ++vi) - h[vi] = ATTR_TYPE(); + h[vi] = initVal; return;} assert(0); }