summaryrefslogtreecommitdiff
path: root/tools/obj2hackvr.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/obj2hackvr.pl')
-rwxr-xr-xtools/obj2hackvr.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/obj2hackvr.pl b/tools/obj2hackvr.pl
index a835d77..793b5ea 100755
--- a/tools/obj2hackvr.pl
+++ b/tools/obj2hackvr.pl
@@ -2,7 +2,7 @@
use strict;
-die "usage: obj2hackvr.pl name\n" unless $ARGV[0];
+die "usage: obj2hackvr.pl name file\n" unless $ARGV[0];
my $i;
my $j;
@@ -14,7 +14,8 @@ my @parts;
my @points;
my @tmp;
my $tmp;
-while(<stdin>) {
+open(FILE,$ARGV[1]) if $ARGV[1];
+while(<FILE>) {
chomp;
@linepart=split(/ /,$_,2);
$com=$linepart[0];