I noticed that Ogre wasn’t handling a mesh very well that used scientific notation. So I wrote this little perl script to remove the notation. It just converts any scifi notation to zero for now. You’ll need Perl to run the script.
————- ogre_remove_scifi.pl ———–
use strict;
my ($arg1) = shift;
print "Processing… $arg1\n";
open(FILE, "<$arg1")
or die("Unable to open $arg1");
open(FILE2, ">$arg1.xml")
or die("Unable to open $arg1.xml");
while(<FILE>)
{
$_ =~ s/"[^"]*e-[\d][^"]*"/"0"/g;
print FILE2 $_;
}
close FILE2;
close FILE;
print "Done. $arg1.xml [ OK ]\n";
exit;