Commit 9a57e1b7 authored by Isaak Lim's avatar Isaak Lim

backups of the original per vertex/face coordinates are now created in the...

backups of the original per vertex/face coordinates are now created in the FileOBJ plugin and not the TextureControl plugin.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14173 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 1d5996ba
......@@ -299,36 +299,12 @@ void TextureControlPlugin::handleFileOpenTextures( MeshT*& _mesh , int _objectId
return;
}
// ================================================================================
// Create a backup of the original per Vertex texture Coordinates
// ================================================================================
if ( _mesh->has_vertex_texcoords2D() ){
OpenMesh::VPropHandleT< typename MeshT::TexCoord2D > oldVertexCoords;
if ( !_mesh->get_property_handle(oldVertexCoords,"Original Per Vertex Texture Coords") )
_mesh->add_property(oldVertexCoords,"Original Per Vertex Texture Coords");
for ( TriMesh::VertexIter v_it = _mesh->vertices_begin(); v_it != _mesh->vertices_end(); ++v_it)
_mesh->property(oldVertexCoords, v_it ) = _mesh->texcoord2D( v_it );
slotTextureAdded("Original Per Vertex Texture Coords","unknown.png",2,_objectId);
slotSetTextureMode("Original Per Vertex Texture Coords","type=vertexbased",_objectId);
}
// ================================================================================
// Create a backup of the original per Face texture Coordinates
// ================================================================================
if ( _mesh->has_halfedge_texcoords2D() ){
OpenMesh::HPropHandleT< typename MeshT::TexCoord2D > oldHalfedgeCoords;
if ( !_mesh->get_property_handle(oldHalfedgeCoords,"Original Per Face Texture Coords") )
_mesh->add_property(oldHalfedgeCoords,"Original Per Face Texture Coords");
for ( TriMesh::HalfedgeIter he_it = _mesh->halfedges_begin(); he_it != _mesh->halfedges_end(); ++he_it)
_mesh->property(oldHalfedgeCoords, he_it ) = _mesh->texcoord2D( he_it );
if ( _mesh->has_halfedge_texcoords2D() ){
slotTextureAdded("Original Per Face Texture Coords","unknown.png",2,_objectId);
slotSetTextureMode("Original Per Face Texture Coords","type=halfedgebased",_objectId);
}
......
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