summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2016-11-02 03:47:08 -0500
committerepoch <epoch@hacking.allowed.org>2016-11-02 03:47:08 -0500
commitc808fb8b0703d0534c432c20fbe075f8ead14de6 (patch)
tree3494e77e520ac5e3cf2e0a3fb618f933dc0a072f
parent45b24e6fe84b7ffeb927894f3a674686d6e6606d (diff)
downloadhackvr-c808fb8b0703d0534c432c20fbe075f8ead14de6.tar.gz
hackvr-c808fb8b0703d0534c432c20fbe075f8ead14de6.zip
made the name of the hackvr format be the first argument for obj2hackvr
-rwxr-xr-xtools/obj2hackvr.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/obj2hackvr.pl b/tools/obj2hackvr.pl
index 610e04e..a835d77 100755
--- a/tools/obj2hackvr.pl
+++ b/tools/obj2hackvr.pl
@@ -2,6 +2,8 @@
use strict;
+die "usage: obj2hackvr.pl name\n" unless $ARGV[0];
+
my $i;
my $j;
my $com;
@@ -12,7 +14,7 @@ my @parts;
my @points;
my @tmp;
my $tmp;
-while(<>) {
+while(<stdin>) {
chomp;
@linepart=split(/ /,$_,2);
$com=$linepart[0];
@@ -34,7 +36,8 @@ foreach $tmp (@faces) {
@points = map { $_ =~ s/\/.+$//g; $_; } @points;
# print @points;
for($i=2;$i<(@points);$i++) {
- print "deer addtriangle ";
+ print $ARGV[0];
+ print " addtriangle ";
print $vertices[$points[0]-1];
print " ";
print $vertices[$points[$i-1]-1];