Index: sound.c
===================================================================
--- sound.c	(revision 432)
+++ sound.c	(revision 433)
@@ -10,6 +10,9 @@
 #include "headers/sound.h"
 #endif
 
+// proto
+void raydium_path_resolv(char *in, char *out, char mode);
+
 // There's way too much "#ifdef" in this file, but eh ... OpenAL becomes
 // complex when you comes to portability ...
 
fich.write("\n")
 	
@@ -187,8 +187,10 @@
 		#Hidden mesh can be used to save hinge pos and rot without needed
 		#to generate mesh .tri file
 		#need to be documented
+		#print mesh.name
 		if mesh.name[0]=='.':
 			#hidden mesh
+			print "%s is an hidden mesh" % (mesh.name)
 			continue
 			
 		if mesh.name in mesh_list:
@@ -216,7 +218,8 @@
 		lp=0
 		org=mesh.activeUVLayer
 		layers=mesh.getUVLayerNames()
-		mesh.activeUVLayer=layers[0]
+		if (len(layers)>0):
+			mesh.activeUVLayer=layers[0]
 		for face in mesh.faces:
 			if len(face)!=3:
 				print "ERROR: NOT A TRIANGLE ONLY MESH ! (select all vertices and use CTRL+T)"
@@ -240,8 +243,8 @@
 				#writing vertex normal
 				file.write ("%f %f %f " % (nv[0],nv[1],nv[2]))
 				#if face is textured
-				mesh.activeUVLayer=layers[0]
 				if(mesh.faceUV):
+					mesh.activeUVLayer=layers[0]					
 					u=face.uv[i][0]
 					v=face.uv[i][1]
 					#get current texture image name
@@ -287,7 +290,8 @@
 					else:
 					#No information, defaulting to gray face
 						file.write("0 0 rgb(0.6,0.6,0.6)\n")
-		mesh.activeUVLayer=org
+		if (org):
+			mesh.activeUVLayer=org
 		if multfile:
 			file.flush()
 			file.close()