778158a
Index: OgreMain/src/OgreMesh.cpp
778158a
===================================================================
778158a
--- OgreMain/src/OgreMesh.cpp	(revision 9194)
778158a
+++ OgreMain/src/OgreMesh.cpp	(revision 9195)
778158a
@@ -1245,7 +1245,31 @@
778158a
 						}
778158a
 						
778158a
 					}
778158a
+				}
778158a
 
778158a
+				// Update poses (some vertices might have been duplicated)
778158a
+				// we will just check which vertices have been split and copy
778158a
+				// the offset for the original vertex to the corresponding new vertex
778158a
+				PoseIterator pose_it = getPoseIterator();
778158a
+
778158a
+				while( pose_it.hasMoreElements() )
778158a
+				{
778158a
+					Pose* current_pose = pose_it.getNext();
778158a
+					const Pose::VertexOffsetMap& offset_map = current_pose->getVertexOffsets();
778158a
+
778158a
+					for( TangentSpaceCalc::VertexSplits::iterator it = res.vertexSplits.begin();
778158a
+						it != res.vertexSplits.end(); ++it )
778158a
+					{
778158a
+						TangentSpaceCalc::VertexSplit& split = *it;
778158a
+
778158a
+						Pose::VertexOffsetMap::const_iterator found_offset = offset_map.find( split.first );
778158a
+
778158a
+						// copy the offset
778158a
+						if( found_offset != offset_map.end() )
778158a
+						{
778158a
+							current_pose->addVertex( split.second, found_offset->second );
778158a
+						}
778158a
+					}
778158a
 				}
778158a
 			}
778158a
 		}