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.2 by greg, Fri Sep 2 04:24:37 2005 UTC vs.
Revision 2.3 by greg, Fri Sep 2 14:43:43 2005 UTC

# Line 8 | Line 8
8   # If an odd number of frames is provided, the spare frame at the
9   # end is linked to $spare_name for the next run
10   #
11 < # Written by Greg Ward for Iebele Atelier in August 2005
11 > # Written by Greg Ward for Iebele Abel in August 2005
12   #
13   set spare_name=spare_fieldcomb_frame.pic
14 < if ($#argv > 1) then
15 <        if ("$argv[1]" == "-r") then
14 > set odd_first=0
15 > while ($#argv > 1)
16 >        switch ($argv[1])
17 >        case -r*:
18                  set remove_orig
19 <                shift argv
20 <        endif
21 < endif
19 >                breaksw
20 >        case -o*:
21 >                set odd_first=1
22 >                breaksw
23 >        case -e*:
24 >                set odd_first=0
25 >                breaksw
26 >        default:
27 >                if ("$argv[1]" !~ -*) break
28 >                echo "Unknown option: $argv[1]"
29 >                exit 1
30 >        endsw
31 >        shift argv
32 > end
33   if ($#argv < 2) then
34 <        echo "Usage: $0 [-r] field1.pic field2.pic .."
34 >        echo "Usage: $0 [-e|-o][-r] field1.pic field2.pic .."
35          exit 1
36   endif
37   set f1=$argv[1]:q
# Line 36 | Line 49 | while ($curfi < $#fields)
49          @ nextfi = $curfi + 1
50          pcomb -e 'ro=ri(fld); go=gi(fld); bo=bi(fld)' \
51                  -e 'yd=yres-1-y; odd=.5*yd-floor(.5*yd)-.25' \
52 <                -e 'fld=if(odd,1,2)' \
52 >                -e "fld=if(odd,2-$odd_first,1+$odd_first)" \
53                  $fields[$curfi]:q $fields[$nextfi]:q \
54                  > "${basenm}C$curfr.$ext"
55          if ($?remove_orig) rm $fields[$curfi]:q $fields[$nextfi]:q

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines