ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/bsdfview.pl
(Generate patch)

Comparing ray/src/util/bsdfview.pl (file contents):
Revision 2.4 by greg, Sat Aug 26 16:07:22 2017 UTC vs.
Revision 2.7 by greg, Fri Jul 20 00:50:40 2018 UTC

# Line 12 | Line 12 | my $td = tempdir( CLEANUP => 0 );
12   my $octree = "$td/bv$$.oct";
13   my $ambf = "$td/af$$.amb";
14   my $raddev = "x11";     # default output device. Overwrite with -o
15 < my $qual = "Low";
15 > my $qual = "Med";
16   my $usetrad = 0;
17  
18 < my $opts = "";  # Options common to rad
18 > my @range;              # BSDF min and max range
19 > my $opts = "";          # Options common to rad
20   my $rendopts = "-w-";   # For render= line in rif file
21  
22   while (@ARGV) {
# Line 40 | Line 41 | while (@ARGV) {
41                  $opts .= " $_";
42          } elsif (m/^-t\b/) {    # start trad instead of rad
43                  $usetrad = 1;
44 +        } elsif (m/^-r/) {      # specified range for BSDF
45 +                @range = ("-r", $ARGV[1], $ARGV[2]);
46 +                shift @ARGV; shift @ARGV;
47          } elsif (m/^-\w/) {
48                  die("bsdfview: Bad option: $_\n");
49          } else {
# Line 89 | Line 93 | if (-e $rif) {                 # RIF already exists?
93  
94   print "bsdfview: creating rad input file '$rif'\n";
95  
96 < my $scene = qq("!bsdf2rad @objects");           # let bsdf2rad do complaining
96 > my $scene = qq("!bsdf2rad @range @objects");    # let bsdf2rad do complaining
97  
98   my $objects = join(' ', @objects);
99   open(FH, ">$rif") or
# Line 118 | Line 122 | EndOfRif
122   close(FH);
123  
124   if ($usetrad) {
125 <        system "trad $rif";
125 >        system "rad -v 0 $rif ; trad $rif";
126   } else {
127          system "rad -o $raddev $opts $rif";
128   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines