Index: /GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoSubMesh.h
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoSubMesh.h	(revision 774)
+++ /GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoSubMesh.h	(revision 826)
@@ -46,4 +46,6 @@
 		size_t mStripCount; ///< number of Strips
 
+		MeshType	mType;	///<	Type of mesh
+
 		//OSCAR
 		std::vector <VertexBoneAssignment> mBones;
Index: /GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoMeshStripifier.h
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoMeshStripifier.h	(revision 774)
+++ /GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoMeshStripifier.h	(revision 826)
@@ -53,4 +53,7 @@
 			Mesh *	GetMesh ();
 
+			// Sets what is the mesh that stores the leaves
+			void setSubMeshLeaves(Geometry::Index);
+
 		protected:
 
@@ -60,4 +63,8 @@
 			//	Mesh object.
 			Geometry::Mesh		*mGeoMesh;
+
+			//	Index of the submesh leaves.
+			Geometry::Index mSubMeshLeaves;
+
 	};
 
@@ -88,4 +95,7 @@
 			//	Set the progress bar function.
 			void	SetProgressFunc(Geometry::TIPOFUNC upb);
+
+			// Sets what is the submesh that stores the leaves
+			void SetSubMeshLeaves(size_t	submesh);
 	};
 
Index: /GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoSubMesh.cpp
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoSubMesh.cpp	(revision 774)
+++ /GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoSubMesh.cpp	(revision 826)
@@ -4,5 +4,5 @@
 
 SubMesh::SubMesh():
-	mIndex(0), mVertexBuffer(0), mIndexCount(0),mSharedVertexBuffer(false), mStrip(0), mStripCount(0)
+	mIndex(0), mVertexBuffer(0), mIndexCount(0),mSharedVertexBuffer(false), mStrip(0), mStripCount(0), mType(GEO_TRIANGLE_LIST)
 {
 }
Index: /GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMesh.cpp
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMesh.cpp	(revision 774)
+++ /GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMesh.cpp	(revision 826)
@@ -33,4 +33,5 @@
 		mSubMesh[i].mVertexBuffer->mVertexCount = objmesh.mSubMesh[i].mVertexBuffer->mVertexCount;
 		mSubMesh[i].mVertexBuffer->mVertexInfo = objmesh.mSubMesh[i].mVertexBuffer->mVertexInfo;
+		mSubMesh[i].mType	=	objmesh.mSubMesh[i].mType;
 		
 		// De momento con esto se parte de un geomesh con vértices compartidos y se obtiene un geomesh sin vértices
@@ -143,4 +144,5 @@
 		mSubMesh[i].mVertexBuffer->mVertexCount	=	objmesh.mSubMesh[i].mVertexBuffer->mVertexCount;
 		mSubMesh[i].mVertexBuffer->mVertexInfo	=	objmesh.mSubMesh[i].mVertexBuffer->mVertexInfo;
+		mSubMesh[i].mType	=	objmesh.mSubMesh[i].mType;
 
 		if (objmesh.mSubMesh[i].mSharedVertexBuffer && !copiados)
Index: /GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMeshStripifier.cpp
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMeshStripifier.cpp	(revision 774)
+++ /GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMeshStripifier.cpp	(revision 826)
@@ -40,4 +40,7 @@
 	//	Sets the actual progress bar function.
 	mUPB	=	NULL;
+
+	//	Initialize the leaves submesh index.
+	mSubMeshLeaves	=	-1;
 }
 
@@ -75,139 +78,143 @@
 	float							increment;
 	float							update;
-	
+
 	//	For each submesh.
 	for (int	submesh	=	0;	submesh < mGeoMesh->mSubMeshCount;	submesh++)
 	{
-		//	Gets the submesh.
-		geosubmesh	=	&mGeoMesh->mSubMesh[submesh];
-
-		//	Free index vector.
-		Indices.clear();
-
-		//	Progress bar increment.
-		increment	=	20	/	mGeoMesh->mSubMeshCount;
-		increment	=	increment	/	geosubmesh->mIndexCount;
-		update		=	0.0;
-		
-		//	For each index.
-		for (int	index	=	0;	index	<	geosubmesh->mIndexCount;	index++)
+		//	If is not the Leaveas submesh.
+		if (submesh != mSubMeshLeaves)
 		{
-			//	Update progress bar.
-			if (mUPB)
+
+			//	Gets the submesh.
+			geosubmesh	=	&mGeoMesh->mSubMesh[submesh];
+
+			//	Free index vector.
+			Indices.clear();
+
+			//	Progress bar increment.
+			increment	=	20	/	mGeoMesh->mSubMeshCount;
+			increment	=	increment	/	geosubmesh->mIndexCount;
+			update		=	0.0;
+
+			//	For each index.
+			for (int	index	=	0;	index	<	geosubmesh->mIndexCount;	index++)
 			{
-				update	=	update + increment;
-				
-				if (update > 0.9)
-				{
-					mUPB(1.0);
-					
-					update	=	0;
-				}
+				//	Update progress bar.
+				if (mUPB)
+				{
+					update	=	update + increment;
+
+					if (update > 0.9)
+					{
+						mUPB(1.0);
+
+						update	=	0;
+					}
+				}
+
+				//	Add an index.
+				Indices.push_back(geosubmesh->mIndex[index]);
 			}
-			
-			//	Add an index.
-			Indices.push_back(geosubmesh->mIndex[index]);
-		}
-
-		// we want to time the tri_stripper object destruction as well.
-		tri_stripper TriStripper(Indices);
-
-		//	Sets the progress bar function for stripper algorithm.
-		TriStripper.SetProgressFunc(mUPB,60/mGeoMesh->mSubMeshCount);
-		
-		TriStripper.SetMinStripSize(2);
-		TriStripper.SetCacheSize(32);
-		//TriStripper.SetBackwardSearch(false);
-
-		TriStripper.Strip(&PrimitivesVector);
-
-		//	Free submesh indices.
-		delete	[]	geosubmesh->mIndex;
-
-		//	Initialize index count.
-		geosubmesh->mIndexCount	=	0;
-
-		//	Initialize strip count.
-		strip_count	=	0;
-		
-		//	For each strip or triangle list.
-		for (size_t i = 0; i < PrimitivesVector.size(); ++i)
-		{
-			if (PrimitivesVector[i].Type == TRIANGLE_STRIP)
+
+			// we want to time the tri_stripper object destruction as well.
+			tri_stripper TriStripper(Indices);
+
+			//	Sets the progress bar function for stripper algorithm.
+			TriStripper.SetProgressFunc(mUPB,60/mGeoMesh->mSubMeshCount);
+
+			TriStripper.SetMinStripSize(2);
+			TriStripper.SetCacheSize(32);
+			//TriStripper.SetBackwardSearch(false);
+
+			TriStripper.Strip(&PrimitivesVector);
+
+			//	Free submesh indices.
+			delete	[]	geosubmesh->mIndex;
+
+			//	Initialize index count.
+			geosubmesh->mIndexCount	=	0;
+
+			//	Initialize strip count.
+			strip_count	=	0;
+
+			//	For each strip or triangle list.
+			for (size_t i = 0; i < PrimitivesVector.size(); ++i)
 			{
-				strip_count++;
-				geosubmesh->mIndexCount	+=	PrimitivesVector[i].Indices.size();
-
-				//	Degenerate triangles.
-				geosubmesh->mIndexCount	+=	2;
+				if (PrimitivesVector[i].Type == TRIANGLE_STRIP)
+				{
+					strip_count++;
+					geosubmesh->mIndexCount	+=	PrimitivesVector[i].Indices.size();
+
+					//	Degenerate triangles.
+					geosubmesh->mIndexCount	+=	2;
+				}
+				else
+				{
+					strip_count += PrimitivesVector[i].Indices.size()/3;
+
+					geosubmesh->mIndexCount	+=	PrimitivesVector[i].Indices.size();
+
+					//	Degenerate triangles.
+					geosubmesh->mIndexCount	+=	2*(PrimitivesVector[i].Indices.size()/3);
+				}
+
 			}
-			else
+
+			//	Reserve memory for strips list.
+			geosubmesh->mStrip			=	new	Index*[strip_count];
+			geosubmesh->mStripCount	=	strip_count;
+
+			//	Adjust the index count.
+			geosubmesh->mIndexCount	-=	2;
+
+			//	Reserve memory for indices.
+			geosubmesh->mIndex	=	new	Index[geosubmesh->mIndexCount];
+
+			//	Initialize index count.
+			index_count	=	0;
+
+			//	For each strip.
+			for (size_t	strip	=	0; strip < PrimitivesVector.size();	strip++)
 			{
-				strip_count += PrimitivesVector[i].Indices.size()/3;
-				
-				geosubmesh->mIndexCount	+=	PrimitivesVector[i].Indices.size();
-
-				//	Degenerate triangles.
-				geosubmesh->mIndexCount	+=	2*(PrimitivesVector[i].Indices.size()/3);
-			}
-		
-		}
-
-		//	Reserve memory for strips list.
-		geosubmesh->mStrip			=	new	Index*[strip_count];
-		geosubmesh->mStripCount	=	strip_count;
-
-		//	Adjust the index count.
-		geosubmesh->mIndexCount	-=	2;
-		
-		//	Reserve memory for indices.
-		geosubmesh->mIndex	=	new	Index[geosubmesh->mIndexCount];
-
-		//	Initialize index count.
-		index_count	=	0;
-
-		//	For each strip.
-		for (size_t	strip	=	0; strip < PrimitivesVector.size();	strip++)
-		{
-			if (PrimitivesVector[strip].Type == TRIANGLE_STRIP)
-			{
-				//	Asigns the beginning of the strip.
-				geosubmesh->mStrip[strip]	=	&geosubmesh->mIndex[index_count];
-
-				//	If is not the first strip.
-				if (strip	!= 0)
-				{
-					geosubmesh->mIndex[index_count++]	= PrimitivesVector[strip].Indices[0];
-				}
-				
-				//	Fill up the index array.
-				for (	size_t	index	=	0;
+				if (PrimitivesVector[strip].Type == TRIANGLE_STRIP)
+				{
+					//	Asigns the beginning of the strip.
+					geosubmesh->mStrip[strip]	=	&geosubmesh->mIndex[index_count];
+
+					//	If is not the first strip.
+					if (strip	!= 0)
+					{
+						geosubmesh->mIndex[index_count++]	= PrimitivesVector[strip].Indices[0];
+					}
+
+					//	Fill up the index array.
+					for (	size_t	index	=	0;
 							index < PrimitivesVector[strip].Indices.size();
 							index++)
-				{
-					geosubmesh->mIndex[index + index_count]	=	PrimitivesVector[strip].Indices[index];
-				}
-
-				//	Adds the current strip size to index count.
-				index_count	+=	PrimitivesVector[strip].Indices.size();
-
-				if ((strip + 1) != strip_count)
-				{
-					//	Degenerate triangle.
-					geosubmesh->mIndex[index_count++]	=	geosubmesh->mIndex[index_count - 1];
-				}
-			}
-			else
-			{
-				//	For each index.
-				for (	size_t	itri	=	0;
+					{
+						geosubmesh->mIndex[index + index_count]	=	PrimitivesVector[strip].Indices[index];
+					}
+
+					//	Adds the current strip size to index count.
+					index_count	+=	PrimitivesVector[strip].Indices.size();
+
+					if ((strip + 1) != strip_count)
+					{
+						//	Degenerate triangle.
+						geosubmesh->mIndex[index_count++]	=	geosubmesh->mIndex[index_count - 1];
+					}
+				}
+				else
+				{
+					//	For each index.
+					for (	size_t	itri	=	0;
 							itri	<	PrimitivesVector[strip].Indices.size() / 3;
 							itri ++)
-				{
+					{
 						//	Asigns the beginning of the strip.
 						geosubmesh->mStrip[strip + itri]	=	&geosubmesh->mIndex[index_count];
 
 						//	Degenerate triangle.
-					  geosubmesh->mIndex[index_count++]	=	PrimitivesVector[strip].Indices[itri*3+0];
+						geosubmesh->mIndex[index_count++]	=	PrimitivesVector[strip].Indices[itri*3+0];
 
 						//	Triangle indeces.
@@ -221,7 +228,12 @@
 							geosubmesh->mIndex[index_count++]	=	geosubmesh->mIndex[index_count - 1];
 						}
-				}
-				
+					}
+
+				}
 			}
+
+			//	Sets the actual submesh type to triangle strips.
+			geosubmesh->mType	=	GEO_TRIANGLE_STRIPS;
+
 		}
 	}
@@ -232,7 +244,5 @@
 		mUPB(100);
 	}
-	
-	//	Sets the mesh type to triangle strips.
-	mGeoMesh->mType	=	GEO_TRIANGLE_STRIPS;
+
 
 	//	All wright.
@@ -251,2 +261,8 @@
 }
 
+// Sets what is the submesh that stores the leaves.
+void CustomStripifier::SetSubMeshLeaves(size_t	submesh)
+{
+	mSubMeshLeaves	=	submesh;
+}
+
Index: /GTP/trunk/Lib/Geom/shared/GeoTool/include/GeoMeshLoader.h
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GeoTool/include/GeoMeshLoader.h	(revision 774)
+++ /GTP/trunk/Lib/Geom/shared/GeoTool/include/GeoMeshLoader.h	(revision 826)
@@ -166,5 +166,5 @@
 
 			//	Writes the strips list.
-			Mesh* GeoMeshLoader::BuildStripsGeoSubMesh(Mesh* geoMesh);
+			SubMesh* GeoMeshLoader::BuildStripsGeoSubMesh(SubMesh* geoSubMesh);
 			
 		public:
Index: /GTP/trunk/Lib/Geom/shared/GeoTool/include/GeoMeshView.h
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GeoTool/include/GeoMeshView.h	(revision 820)
+++ /GTP/trunk/Lib/Geom/shared/GeoTool/include/GeoMeshView.h	(revision 826)
@@ -203,6 +203,6 @@
 	//	Paint the mesh object.
 	void	drawGeoMesh(int selectedMesh);
-	void	drawTriangleList(int selectedMesh);
-	void	drawTriangleStrip();
+	void	drawTriangleList(int submesh, bool selectedMesh);
+	void	drawTriangleStrip(int submesh);
 	void	drawLodStrip();
 	void	enableColorStrips();
@@ -236,6 +236,7 @@
 	};
 
-	ColorElement	*mStripColors;
-
+	ColorElement	**mStripColors;
+	int						mStripColorsCount;
+	
 	//	Idetifier of Visualization List.
 	GLuint	mIdVisualList;
Index: /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshLoader.cpp
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshLoader.cpp	(revision 774)
+++ /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshLoader.cpp	(revision 826)
@@ -374,5 +374,7 @@
 
 //	Read a submesh operation.
-void GeoMeshLoader::readSubMeshOperation(FILE	*f, Mesh	*geoMesh, int option)
+void GeoMeshLoader::readSubMeshOperation(	FILE	*f,
+																					Mesh	*geoMesh,
+																					int 	option)
 {
 	unsigned	short	opType;
@@ -384,9 +386,9 @@
 		if (opType == 5)
 		{
-			geoMesh->mType	=	GEO_TRIANGLE_STRIPS;
+			geoMesh->mSubMesh[currentSubMesh].mType	=	GEO_TRIANGLE_STRIPS;
 		}
 		else
 		{
-			geoMesh->mType	=	GEO_TRIANGLE_LIST;
+			geoMesh->mSubMesh[currentSubMesh].mType	=	GEO_TRIANGLE_LIST;
 		}
 	}
@@ -545,5 +547,7 @@
 								
 					cout<<"M_SUBMESH_OPERATION\n";
+
 					readSubMeshOperation(f, geoMesh, option);
+					
 					break;
 				case M_SUBMESH_BONE_ASSIGNMENT:
@@ -761,5 +765,5 @@
 		Allocate memory to the array of strips
 */
-Mesh* GeoMeshLoader::BuildStripsGeoSubMesh(Mesh* geoMesh)
+SubMesh* GeoMeshLoader::BuildStripsGeoSubMesh(SubMesh* geoSubMesh)
 {
 	bool		head_found;
@@ -768,98 +772,91 @@
 	int			tailIndex;
 	size_t	tail;
-	SubMesh	*geoSubMesh;
-
-	//	For each submesh.
-	for (int submesh	=	0; submesh < geoMesh->mSubMeshCount; submesh++)
-	{
-		//	Gets the actual submesh.
-		geoSubMesh	=	&geoMesh->mSubMesh[submesh];
-		
-		head_found							=	false;
-		tail_found							=	false;
-		geoSubMesh->mStripCount	=	1;
-	
-		//	Foreachone of the indices.
-		//	Obtains the number of triangle strips.
-		for (int i = 0; i < (geoSubMesh->mIndexCount - 1); i++)
-		{
-			if (geoSubMesh->mIndex[i] == geoSubMesh->mIndex[i+1])
-			{
-				if (head_found)
-				  {
-					tail_found	=	true;
+
+
+	head_found							=	false;
+	tail_found							=	false;
+	geoSubMesh->mStripCount	=	1;
+
+	//	Foreachone of the indices.
+	//	Obtains the number of triangle strips.
+	for (int i = 0; i < (geoSubMesh->mIndexCount - 1); i++)
+	{
+		if (geoSubMesh->mIndex[i] == geoSubMesh->mIndex[i+1])
+		{
+			if (head_found)
+			{
+				tail_found	=	true;
+			}
+			else
+			{
+				head_found	=	true;
+			}
+
+			//	Jump one index.
+			i++;
+		}
+		else
+		{
+			//	Increments the number of triangle strips.
+			if (tail_found)
+			{
+				geoSubMesh->mStripCount++;
+			}
+
+			head_found	=	false;
+			tail_found	=	false;
+		}
+	}
+
+	geoSubMesh->mStrip		=	(Index**) malloc(	sizeof(Index*)
+			*
+			geoSubMesh->mStripCount);
+
+	//	Number of strips. Initially there is one triangle strip.
+	strip_count	=	1;
+
+	head_found						=	false;
+	tail_found						=	false;
+
+	//	Initialize the fist triangle strip.
+	geoSubMesh->mStrip[0]	=	&geoSubMesh->mIndex[0];
+
+	//	Foreachone of the indices.
+	//	Assigns the beginning of the triangle strips.
+	for(int i = 0;i < (geoSubMesh->mIndexCount - 1); i++)
+	{
+		if(geoSubMesh->mIndex[i] == geoSubMesh->mIndex[i+1])
+		{
+			if(head_found)
+			{
+				if (!tail_found)
+				{
+					tailIndex		=	i;
 				}
-				else
-				{
-					head_found	=	true;
-				}
-
-				//	Jump one index.
-				i++;
+
+				tail_found	=	true;
 			}
 			else
 			{
-				//	Increments the number of triangle strips.
-				if (tail_found)
-				{
-					geoSubMesh->mStripCount++;
-				}
-
-				head_found	=	false;
-				tail_found	=	false;
-			}
-		}
-
-		geoSubMesh->mStrip		=	(Index**) malloc(	sizeof(Index*)
-																							*
-																							geoSubMesh->mStripCount);
-
-		//	Number of strips. Initially there is one triangle strip.
-		strip_count	=	1;
-
-		head_found						=	false;
-		tail_found						=	false;
-
-		//	Initialize the fist triangle strip.
-		geoSubMesh->mStrip[0]	=	&geoSubMesh->mIndex[0];
-
-		//	Foreachone of the indices.
-		//	Assigns the beginning of the triangle strips.
-		for(int i = 0;i < (geoSubMesh->mIndexCount - 1); i++)
-		{
-			if(geoSubMesh->mIndex[i] == geoSubMesh->mIndex[i+1])
-			{
-				if(head_found)
-				{
-					if (!tail_found)
-					{
-						tailIndex		=	i;
-					}
-
-					tail_found	=	true;
-				}
-				else
-				{
-					head_found	=	true;
-				}
-
-				//	Jump one index.
-				i++;
-			}
-			else
-			{
-				//	Increments the number of triangle strips.
-				if(tail_found)
-				{
-					geoSubMesh->mStrip[strip_count++]	=	&geoSubMesh->mIndex[tailIndex];
-				}
-
-				head_found	=	false;
-				tail_found	=	false;
-			}
-		}
-	}
-
-	return	geoMesh;
+				head_found	=	true;
+			}
+
+			//	Jump one index.
+			i++;
+		}
+		else
+		{
+			//	Increments the number of triangle strips.
+			if(tail_found)
+			{
+				geoSubMesh->mStrip[strip_count++]	=	&geoSubMesh->mIndex[tailIndex];
+			}
+
+			head_found	=	false;
+			tail_found	=	false;
+		}
+	}
+
+	return	geoSubMesh;
 }
 
@@ -873,4 +870,5 @@
 	FILE						*salida;
 	FILE						*pFile;
+	SubMesh					*geosubmesh;
 
 	//	Initialize the current submesh;
@@ -971,8 +969,14 @@
 	fclose(pFile);
 	
-	if (geoMesh->mType == Geometry::GEO_TRIANGLE_STRIPS)
-	{
-		//	Fill the strips list.
-		geoMesh	=	BuildStripsGeoSubMesh(geoMesh);
+	for (int submesh = 0;	submesh < geoMesh->mSubMeshCount; submesh++)
+	{
+		//	Gets the actual submesh.
+		geosubmesh	=	&geoMesh->mSubMesh[submesh];
+		
+		if (geosubmesh->mType == Geometry::GEO_TRIANGLE_STRIPS)
+		{
+			//	Fill the strips list.
+			geosubmesh	=	BuildStripsGeoSubMesh(geosubmesh);
+		}
 	}
 	
Index: /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshViewUI.cpp
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshViewUI.cpp	(revision 813)
+++ /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshViewUI.cpp	(revision 826)
@@ -1431,11 +1431,11 @@
 			sprintf(cadena2, "Number of indexes: %d",mGeoMesh->mSubMesh[i].mIndexCount);
 			fltk::Item *numberIndex = new fltk::Item(cadena2);
-			if (mGeoMesh->mType==Geometry::GEO_TRIANGLE_LIST)
+			if (mGeoMesh->mSubMesh[i].mType==Geometry::GEO_TRIANGLE_LIST)
 			{
-				fltk::Item *type = new fltk::Item("Triangle list");
+				fltk::Item *type = new fltk::Item("Triangle List");
 			}
 			else
 			{
-				fltk::Item *type = new fltk::Item("Triangle strips");
+				fltk::Item *type = new fltk::Item("Triangle Strips");
 			}
 
@@ -1777,4 +1777,7 @@
 		geoStripifier->SetProgressFunc(progress_function);
 		
+		//	Sets the leaves submesh if exists.
+		geoStripifier->SetSubMeshLeaves(idMeshLeaves);
+		
 		if (geoStripifier->Stripify())
 		{
@@ -1996,8 +1999,5 @@
 
 		//	if the mesh is stripified.
-		if (mGeoMesh->mType == GEO_TRIANGLE_STRIPS)
-		{
-			geoMeshView->setStripColors();
-		}
+		geoMeshView->setStripColors();
 
 		//	Refresh geometry attributes.
@@ -2325,9 +2325,9 @@
 				}
 
-				//{
-				//	fltk::Item* o;
-				//	o = menuSelectLeaves = new fltk::Item("Select leaves");
-				//	o->callback((fltk::Callback*)cb_menuSelectLeaves);
-				//}
+				{
+					fltk::Item* o;
+					o = menuSelectLeaves = new fltk::Item("Select leaves");
+					o->callback((fltk::Callback*)cb_menuSelectLeaves);
+				}
 
 				o->end();
@@ -2414,9 +2414,9 @@
 				}
 
-				//{
-				//	fltk::Item* o;
-				//	o = menuSimplifyLeavesCollapse = new fltk::Item("Leaves Simplification");
-				//	o->callback((fltk::Callback*)cb_menuSimplifyLeavesCollapse);
-				//}
+				{
+					fltk::Item* o;
+					o = menuSimplifyLeavesCollapse = new fltk::Item("Leaves Simplification");
+					o->callback((fltk::Callback*)cb_menuSimplifyLeavesCollapse);
+				}
 
 				o->end();
Index: /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshView.cpp
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshView.cpp	(revision 774)
+++ /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshView.cpp	(revision 826)
@@ -225,27 +225,53 @@
 void	GeoMeshView::setStripColors()
 {
-	int	total_strips;
-
-	total_strips	=	0;
-	
-	//	Delete previous color strips.
+	SubMesh	*geosubmesh;
+	
+	//	Free memory of the strip colors array.
+	for (int submesh = 0; submesh < mStripColorsCount; submesh++)
+	{
+		delete	[]mStripColors[submesh];
+	}
+	
 	delete	[]mStripColors;
+	
+	//	Initialize the Colors array.
+	mStripColors	=	new	ColorElement*[geoMesh->mSubMeshCount];
 
 	//	Count the total number of strips y the submeshes.
-	for (int i = 0; i < geoMesh->mSubMeshCount; i++)
-	{
-		total_strips	=	total_strips + geoMesh->mSubMesh[i].mStripCount;
-	}
-
-	//	Initialize the Colors array.
-	mStripColors	=	new	ColorElement[total_strips];
+	for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++)
+	{
+		//	Gets the actual submesh.
+		geosubmesh	=	&geoMesh->mSubMesh[submesh];
+		
+		if (geosubmesh->mType	== GEO_TRIANGLE_STRIPS)
+		{
+			mStripColors[submesh]	=	new ColorElement[geosubmesh->mStripCount];
+		}
+		else
+		{
+			mStripColors[submesh]	=	NULL;
+		}
+	}
+
 	
 	//	Sets random colors to each strip.
-	for (int i	= 0; i < total_strips; i++)
-	{
-		mStripColors[i].r	=	rand()/((float)RAND_MAX);
-		mStripColors[i].g	=	rand()/((float)RAND_MAX);
-		mStripColors[i].b	=	rand()/((float)RAND_MAX);
-	}
+	for (int submesh	= 0; submesh < geoMesh->mSubMeshCount; submesh++)
+	{
+		//	Gets the actual submesh.
+		geosubmesh	=	&geoMesh->mSubMesh[submesh];
+
+		if (geosubmesh->mType	== GEO_TRIANGLE_STRIPS)
+		{
+			for	(int strip = 0; strip	<	geosubmesh->mStripCount; strip++)
+			{
+				mStripColors[submesh][strip].r	=	rand()/((float)RAND_MAX);
+				mStripColors[submesh][strip].g	=	rand()/((float)RAND_MAX);
+				mStripColors[submesh][strip].b	=	rand()/((float)RAND_MAX);
+			}
+		}
+	}
+
+	//	Sets the submesh count.
+	mStripColorsCount	=	geoMesh->mSubMeshCount;
 }
 
@@ -371,22 +397,23 @@
             : fltk::GlWindow(x,y,w,h,l)
 {
-		mStripColors		=	NULL;
-		mSharedPosArray	=	NULL;
-		mSharedNorArray	=	NULL;
-		mPosArray				=	NULL;
-		mNorArray				=	NULL;
-		mIndexArray			=	NULL;
-    vAng						= 0.0;
-		hAng						=	0.0;
-		size						=	0.0;
-		mSizeY					=	0;
-		xshift					=	0.0;
-		yshift					=	0.0;
-		geoMesh					=	0;
-		mRotate					=	true;
-		mPan						=	false;
-		mLodStrip				=	false;
-		mIdVisualList		=	0;
-		mSubMeshCount		=	0;
+		mStripColors			=	NULL;
+		mSharedPosArray		=	NULL;
+		mSharedNorArray		=	NULL;
+		mPosArray					=	NULL;
+		mNorArray					=	NULL;
+		mIndexArray				=	NULL;
+    vAng							= 0.0;
+		hAng							=	0.0;
+		size							=	0.0;
+		mSizeY						=	0;
+		xshift						=	0.0;
+		yshift						=	0.0;
+		geoMesh						=	0;
+		mRotate						=	true;
+		mPan							=	false;
+		mLodStrip					=	false;
+		mIdVisualList			=	0;
+		mSubMeshCount			=	0;
+		mStripColorsCount	=	0;
 		
 		//	Initialize the model view.
@@ -522,5 +549,6 @@
 
 	}//	End for each submesh.
-	
+
+	mSubMeshCount	=	geoMesh->mSubMeshCount;
 }
 
@@ -549,4 +577,7 @@
 void GeoMeshView::drawGeoMesh(int selectedMesh)
 {
+	SubMesh	*geosubmesh;
+	bool		submesh_selected;
+	
 	if (geoMesh)
 	{
@@ -555,4 +586,33 @@
 			drawLodStrip();
 		}
+		else
+		{
+			for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++)
+			{
+				//	Gets the actual submesh.
+				geosubmesh	=	&geoMesh->mSubMesh[submesh];
+				
+				if (geosubmesh->mType	==	GEO_TRIANGLE_LIST)
+				{
+					if (selectedMesh == submesh)
+					{
+						submesh_selected	= true;
+					}
+					else
+					{
+						submesh_selected	=	false;
+					}
+					
+					//	Draw the actual submesh in triangle list.
+					drawTriangleList(submesh,submesh_selected);
+				}
+				else
+				{
+					//	Draw the actual submesh in triangle strip.
+					drawTriangleStrip(submesh);
+				}
+			}		
+		}
+		/*
 		//	Choose the render operation.
 		else if (geoMesh->mType == GEO_TRIANGLE_LIST)
@@ -566,4 +626,5 @@
 			drawTriangleStrip();
 		}
+		*/
 	}
 }//	End drawGeoMesh.
@@ -572,5 +633,5 @@
 //	Paint eah strip separately.
 //---------------------------------------------------------------------------
-void GeoMeshView::drawTriangleStrip()
+void GeoMeshView::drawTriangleStrip(int submesh)
 {
 	SubMesh				*geosubmesh;
@@ -586,92 +647,88 @@
 	color_index	=	0;
 
-	//	For each submesh.
-	for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++)
-	{
-		//	Gets the actual submesh.
-		geosubmesh	=	&geoMesh->mSubMesh[submesh];
-
-		//	For each one of the strips.
-		for (int strip = 0; strip < geosubmesh->mStripCount; strip++)
-		{
-			//	Paint the current strip.
-			glBegin(GL_TRIANGLE_STRIP);
-			
-			//	First index of the strip.
-			indexBegin	=	geosubmesh->mStrip[strip];
-
-			//	If the strips is not the first.
-			//if (strip != 0)
-			//{
-			//	indexBegin++;
-			//}
-
-			//	If is the final strip
-			if (strip	== (geosubmesh->mStripCount - 1))
-			{
-				//	The end of the index array.
-				indexEnd	= &geosubmesh->mIndex[geosubmesh->mIndexCount];
-			}
-			else
-			{
-				//	The beginning of the next strip.
-				indexEnd	= geosubmesh->mStrip[strip + 1];
-
-				//	Remove degenerated
-				//indexEnd--;
-			}
-			
-			int i;
-			i	= 0;
-
-			if (getColorStrips())
-			{
-				//	Gets the color of the strip.
-				r	=	mStripColors[color_index].r;
-				g	=	mStripColors[color_index].g;
-				b	=	mStripColors[color_index].b;
-			
-				//	Change to the next color.
-				color_index++;
-			
-				//	Paint a new color.
-				glColor3f(r,g,b);
-			}
-
-			//	For each index of the strip.
-			for (index = indexBegin; index < indexEnd; index++)
-			{
-				position	=	indexBegin[i];
-
-				//	Gets the vertex normal.
-				vector3	=	geosubmesh->mVertexBuffer->mNormal[position];
-
-				x				=	vector3[0];
-				y				=	vector3[1];
-				z				=	vector3[2];
-				
-				//	Sets the vertex normal.
-				glNormal3f(x,y,z);
-				
-				//	Gets the vertex coordinates.
-				vector3	=	geosubmesh->mVertexBuffer->mPosition[position];
-				
-				x				=	vector3[0];
-				y				=	vector3[1];
-				z				=	vector3[2];
-				
-
-				//	Sets the vertex position.
-				glVertex3f(x,y,z);
-				
-				//	Increments i.
-				i++;
-			}
-			
-			glEnd();
-
-		}
-	}
-	
+	//	Gets the actual submesh.
+	geosubmesh	=	&geoMesh->mSubMesh[submesh];
+
+	//	For each one of the strips.
+	for (int strip = 0; strip < geosubmesh->mStripCount; strip++)
+	{
+		//	Paint the current strip.
+		glBegin(GL_TRIANGLE_STRIP);
+
+		//	First index of the strip.
+		indexBegin	=	geosubmesh->mStrip[strip];
+
+		//	If the strips is not the first.
+		//if (strip != 0)
+		//{
+		//	indexBegin++;
+		//}
+
+		//	If is the final strip
+		if (strip	== (geosubmesh->mStripCount - 1))
+		{
+			//	The end of the index array.
+			indexEnd	= &geosubmesh->mIndex[geosubmesh->mIndexCount];
+		}
+		else
+		{
+			//	The beginning of the next strip.
+			indexEnd	= geosubmesh->mStrip[strip + 1];
+
+			//	Remove degenerated
+			//indexEnd--;
+		}
+
+		int i;
+		i	= 0;
+
+		if (getColorStrips())
+		{
+			//	Gets the color of the strip.
+			r	=	mStripColors[submesh][color_index].r;
+			g	=	mStripColors[submesh][color_index].g;
+			b	=	mStripColors[submesh][color_index].b;
+
+			//	Change to the next color.
+			color_index++;
+
+			//	Paint a new color.
+			glColor3f(r,g,b);
+		}
+
+		//	For each index of the strip.
+		for (index = indexBegin; index < indexEnd; index++)
+		{
+			position	=	indexBegin[i];
+
+			//	Gets the vertex normal.
+			vector3	=	geosubmesh->mVertexBuffer->mNormal[position];
+
+			x				=	vector3[0];
+			y				=	vector3[1];
+			z				=	vector3[2];
+
+			//	Sets the vertex normal.
+			glNormal3f(x,y,z);
+
+			//	Gets the vertex coordinates.
+			vector3	=	geosubmesh->mVertexBuffer->mPosition[position];
+
+			x				=	vector3[0];
+			y				=	vector3[1];
+			z				=	vector3[2];
+
+
+			//	Sets the vertex position.
+			glVertex3f(x,y,z);
+
+			//	Increments i.
+			i++;
+		}
+
+		glEnd();
+
+	}
+
 }//End drawTriangleStrip.
 
@@ -679,5 +736,6 @@
 //	Paint the array of idices.
 //---------------------------------------------------------------------------
-void GeoMeshView::drawTriangleList(int selectedMesh)
+void GeoMeshView::drawTriangleList(	int			submesh,
+																		bool 		selectedSubMesh)
 {
 	SubMesh	*geosubmesh;
@@ -693,86 +751,60 @@
 	//	Vertex offset.
 	vrt_offset	=	0;
-	
-	//	For each submesh.
-	for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++)
-	{
-		//	Gets the actual submesh.
-		geosubmesh	=	&geoMesh->mSubMesh[submesh];
-
-		//	If a mesh is selected.
-		if (selectedMesh >= 0)
-		{
-			//	If is a tree.
-			if (leavesSubmesh >= 0)
-			{
-				glColor3d(1.0, 0.5, 0.5);
-				GLfloat color_blanco[]	=	{1.0f,0.5f,0.5f,1.0f};
-				glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,color_blanco);
-
-				//	For each index of the strip.
-				if (submesh == leavesSubmesh)
-				{
-					glColor3d(0.0,1.0,0.0);
-					GLfloat color_rojo[]	=	{0.0f,1.0f,0.0f,1.0f};
-					glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,color_rojo);
-				}
-			}
-			//	If is NOT a tree.
-			else
-			{
-				//	Set white color to the object.
-				glColor3d(1.0, 1.0, 1.0);
-				GLfloat color_blanco[]	=	{1.0f,1.0f,1.0f,1.0f};
-				glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,color_blanco);
-			}
-
-			//	For each index of the strip.
-			if (submesh == selectedMesh)
-			{
-				glColor3d(1.0,0.0,0.0);
-				GLfloat color_rojo[]	=	{1.0f,0.0f,0.0f,1.0f};
-				glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,color_rojo);
-			}
-		}
-		else
-		{
-			//	If is a tree.
-			if (leavesSubmesh >= 0)
-			{
-				glColor3d(1.0, 0.5, 0.5);
-				GLfloat color_blanco[]	=	{1.0f,0.5f,0.5f,1.0f};
-				glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,color_blanco);
-
-				//	For each index of the strip.
-				if (submesh == leavesSubmesh)
-				{
-					glColor3d(0.0,1.0,0.0);
-					GLfloat color_rojo[]	=	{0.0f,1.0f,0.0f,1.0f};
-					glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,color_rojo);
-				}
-			}
-		}
-		
-		//	Enable arrays.
-		glEnableClientState(GL_VERTEX_ARRAY);
-		glEnableClientState(GL_NORMAL_ARRAY);
-
-		//	If the submesh is shared vertex.
-		if (geosubmesh->mSharedVertexBuffer)
-		{
-			glVertexPointer(3, GL_FLOAT, 0, mSharedPosArray);
-			glNormalPointer(GL_FLOAT, 0, mSharedNorArray);
-		}
-		else
-		{
-			glVertexPointer(3, GL_FLOAT, 0, mPosArray[submesh]);
-			glNormalPointer(GL_FLOAT, 0, mNorArray[submesh]);
-		}
-
-		glDrawElements(	GL_TRIANGLES,
-										geosubmesh->mIndexCount,
-										GL_UNSIGNED_INT,
-										mIndexArray[submesh]);
-	}
+
+	//	Gets the actual submesh.
+	geosubmesh	=	&geoMesh->mSubMesh[submesh];
+	
+	//	If a mesh is selected.
+	if (selectedSubMesh)
+	{
+		glColor3d(1.0,0.0,0.0);
+		GLfloat red[]	=	{1.0f,0.0f,0.0f,1.0f};
+		glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,red);
+	}
+	//	If is a tree.
+	else if (leavesSubmesh >= 0)
+	{
+		glColor3d(1.0, 0.5, 0.5);
+		GLfloat brown[]	=	{1.0f,0.5f,0.5f,1.0f};
+		glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,brown);
+
+		//	For each index of the strip.
+		if (submesh == leavesSubmesh)
+		{
+			glColor3d(0.0,1.0,0.0);
+			GLfloat green[]	=	{0.0f,1.0f,0.0f,1.0f};
+			glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,green);
+		}
+	}
+	//	If is NOT a tree.
+	else
+	{
+		//	Set white color to the object.
+		glColor3d(1.0, 1.0, 1.0);
+		GLfloat white[]	=	{1.0f,1.0f,1.0f,1.0f};
+		glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,white);
+	}
+
+
+	//	Enable arrays.
+	glEnableClientState(GL_VERTEX_ARRAY);
+	glEnableClientState(GL_NORMAL_ARRAY);
+
+	//	If the submesh is shared vertex.
+	if (geosubmesh->mSharedVertexBuffer)
+	{
+		glVertexPointer(3, GL_FLOAT, 0, mSharedPosArray);
+		glNormalPointer(GL_FLOAT, 0, mSharedNorArray);
+	}
+	else
+	{
+		glVertexPointer(3, GL_FLOAT, 0, mPosArray[submesh]);
+		glNormalPointer(GL_FLOAT, 0, mNorArray[submesh]);
+	}
+
+	glDrawElements(	GL_TRIANGLES,
+			geosubmesh->mIndexCount,
+			GL_UNSIGNED_INT,
+			mIndexArray[submesh]);
 
 }//End drawTriangleList
@@ -791,12 +823,13 @@
 	int						current_strip;
 
-	color_index	=	0;
-
 	//	Initialize current strip.
 	current_strip	=	0;
-		
+
 	//	For each submesh.
 	for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++)
 	{
+		
+		color_index	=	0;
+
 		//	Gets the actual submesh.
 		geosubmesh	=	&geoMesh->mSubMesh[submesh];
@@ -807,15 +840,15 @@
 			//	Paint the current strip.
 			glBegin(GL_TRIANGLE_STRIP);
-						
+
 			if (getColorStrips())
 			{
 				//	Gets the color of the strip.
-				r	=	mStripColors[color_index].r;
-				g	=	mStripColors[color_index].g;
-				b	=	mStripColors[color_index].b;
-			
+				r	=	mStripColors[submesh][color_index].r;
+				g	=	mStripColors[submesh][color_index].g;
+				b	=	mStripColors[submesh][color_index].b;
+
 				//	Change to the next color.
 				color_index++;
-			
+
 				//	Paint a new color.
 				glColor3f(r,g,b);
@@ -833,11 +866,11 @@
 				y				=	vector3[1];
 				z				=	vector3[2];
-				
+
 				//	Sets the vertex normal.
 				glNormal3f(x,y,z);
-				
+
 				//	Gets the vertex coordinates.
 				vector3	=	geosubmesh->mVertexBuffer->mPosition[position];
-				
+
 				x				=	vector3[0];
 				y				=	vector3[1];
@@ -847,5 +880,5 @@
 				glVertex3f(x,y,z);
 			}
-			
+
 			//	Increments current strip.
 			current_strip++;
Index: /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshSaver.cpp
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshSaver.cpp	(revision 774)
+++ /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshSaver.cpp	(revision 826)
@@ -288,5 +288,5 @@
 
 	//	If the mesh is in triangle strips.
-	if (mGeoMesh->mType	==	GEO_TRIANGLE_STRIPS)
+	if (geoSubMesh->mType	==	GEO_TRIANGLE_STRIPS)
 	{
 		opType	=	5;
