From c808fb8b0703d0534c432c20fbe075f8ead14de6 Mon Sep 17 00:00:00 2001 From: epoch Date: Wed, 2 Nov 2016 03:47:08 -0500 Subject: made the name of the hackvr format be the first argument for obj2hackvr --- tools/obj2hackvr.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tools') 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() { 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]; -- cgit v1.2.3