From 49aba45c5e39698dd87f7991d3d7330e8a36cefc Mon Sep 17 00:00:00 2001 From: Paolo Cignoni cignoni Date: Wed, 14 Dec 2005 10:49:00 +0000 Subject: [PATCH] check on textures size [ with Federico Mazzanti supervision ] --- src/test/io/export_obj.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/test/io/export_obj.h b/src/test/io/export_obj.h index 3cef6e992..68fb18523 100644 --- a/src/test/io/export_obj.h +++ b/src/test/io/export_obj.h @@ -25,6 +25,9 @@ History $Log$ + Revision 1.15 2005/12/14 10:49:00 mariolatronico + check on textures size [ with Federico Mazzanti supervision ] + Revision 1.14 2005/12/14 08:38:55 fmazzant bugfix @@ -402,8 +405,11 @@ namespace io { mtl.Ns = ns; mtl.illum = illum;//illumination - if((*fi).WT(0).n() >= 0) + if(m.textures.size() && (*fi).WT(0).n() >=0 ) { + mtl.map_Kd = m.textures[(*fi).WT(0).n()]; + } + else mtl.map_Kd = "";