--- ray/src/util/genBSDF.pl 2015/04/01 01:38:35 2.56 +++ ray/src/util/genBSDF.pl 2015/08/26 02:27:09 2.61 @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# RCSid $Id: genBSDF.pl,v 2.56 2015/04/01 01:38:35 greg Exp $ +# RCSid $Id: genBSDF.pl,v 2.61 2015/08/26 02:27:09 greg Exp $ # # Compute BSDF based on geometry and material description # @@ -9,7 +9,7 @@ use strict; my $windoz = ($^O eq "MSWin32" or $^O eq "MSWin64"); use File::Temp qw/ :mktemp /; sub userror { - print STDERR "Usage: genBSDF [-n Nproc][-c Nsamp][-W][-t{3|4} Nlog2][-r \"ropts\"][-f \"x=string;y=string\"][-dim xmin xmax ymin ymax zmin zmax][{+|-}C][{+|-}f][{+|-}b][{+|-}mgf][{+|-}geom units] [input ..]\n"; + print STDERR "Usage: genBSDF [-n Nproc][-c Nsamp][-W][-t{3|4} Nlog2][-r \"ropts\"][-s \"x=string;y=string\"][-dim xmin xmax ymin ymax zmin zmax][{+|-}C][{+|-}f][{+|-}b][{+|-}mgf][{+|-}geom units] [input ..]\n"; exit 1; } my ($td,$radscn,$mgfscn,$octree,$fsender,$bsender,$receivers,$facedat,$behinddat,$rmtmp); @@ -222,12 +222,8 @@ if ( $tensortree ) { do_matrix_bsdf(); } # Output XML -my $old_fh = select(STDOUT); -$| = 1; -select($old_fh); -print "\n"; # print STDERR "Running: $wrapper\n"; -system $wrapper; +system "$wrapper -C 'Created by: genBSDF @savedARGV'"; die "Could not wrap BSDF data\n" if ( $? ); # Clean up temporary files and exit exec $rmtmp; @@ -464,7 +460,7 @@ sub matrix_comp { $cmd .= " $src | rcollate -ho -oc 145"; # print STDERR "Running: $cmd\n"; system "$cmd > $dest"; - die "Failure running rttree_reduce" if ( $? ); + die "Failure running rmtxop" if ( $? ); if ( "$spec" ne "$curspec" ) { $wrapper .= " -s $spec"; $curspec = $spec;