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

Comparing ray/src/util/fieldcomb.csh (file contents):
Revision 2.3 by greg, Fri Sep 2 14:43:43 2005 UTC vs.
Revision 2.5 by greg, Mon Sep 5 16:13:08 2005 UTC

# Line 23 | Line 23 | while ($#argv > 1)
23          case -e*:
24                  set odd_first=0
25                  breaksw
26 +        case -f*:
27 +                shift argv
28 +                set outfile="$argv[1]"
29 +                breaksw
30          default:
31                  if ("$argv[1]" !~ -*) break
32                  echo "Unknown option: $argv[1]"
# Line 30 | Line 34 | while ($#argv > 1)
34          endsw
35          shift argv
36   end
37 < if ($#argv < 2) then
38 <        echo "Usage: $0 [-e|-o][-r] field1.pic field2.pic .."
37 > if ($#argv < 2 || ($?outfile && $#argv > 2)) then
38 >        echo "Usage: $0 [-e|-o][-r] [-f combined.pic] field1.pic field2.pic .."
39          exit 1
40   endif
41   set f1=$argv[1]:q
# Line 47 | Line 51 | endif
51   set curfi=1
52   while ($curfi < $#fields)
53          @ nextfi = $curfi + 1
54 +        if ($curfr < 10) then
55 +                set fid=000$curfr
56 +        else if ($curfr < 100) then
57 +                set fid=00$curfr
58 +        else if ($curfr < 1000) then
59 +                set fid=0$curfr
60 +        else
61 +                set fid=$curfr
62 +        endif
63 +        set outf="${basenm}C$fid.$ext"
64 +        if ($?outfile) set outf=$outfile:q
65          pcomb -e 'ro=ri(fld); go=gi(fld); bo=bi(fld)' \
66                  -e 'yd=yres-1-y; odd=.5*yd-floor(.5*yd)-.25' \
67                  -e "fld=if(odd,2-$odd_first,1+$odd_first)" \
68                  $fields[$curfi]:q $fields[$nextfi]:q \
69 <                > "${basenm}C$curfr.$ext"
69 >                > $outf:q
70          if ($?remove_orig) rm $fields[$curfi]:q $fields[$nextfi]:q
71          @ curfr++
72          @ curfi = $nextfi + 1

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines