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

Comparing ray/src/util/do_results3.6.tcl (file contents):
Revision 2.4 by greg, Tue Mar 14 10:16:46 1995 UTC vs.
Revision 2.5 by greg, Wed Sep 13 13:34:02 1995 UTC

# Line 52 | Line 52 | set conv(types) {GIF-bw GIF-8 PICT PS PPM-asc PPM-bin
52                  tga-bw tga-8 tga-16 tga-24 TIFF-bw TIFF-24}
53   set conv(typ) tga-24
54  
55 + proc testappend {flst tf} {     # test if tf exists and append to flst if so
56 +        upvar $flst mylist
57 +        if [file exists $tf] {
58 +                lappend mylist $tf
59 +        }
60 + }
61 +
62   proc list_views {} {            # List finished and unfinished pictures
63 <        global radvar fvwbox ufvwbox alldone
63 >        global radvar fvwbox ufvwbox alldone rawfroot
64          set fpics {}
65          set ufpics {}
66          foreach vw $radvar(view) {
67 <                set fnr $radvar(PICTURE)_[lindex $vw 0]
61 <                if [file exists $fnr.raw] {
67 >                if [file exists ${rawfroot}_[lindex $vw 0].unf] {
68                          lappend ufpics [lindex $vw 0]
69 <                } elseif {[file exists $fnr.pic]} {
69 >                } elseif {[file exists $radvar(PICTURE)_[lindex $vw 0].pic]} {
70                          lappend fpics [lindex $vw 0]
71                  }
72          }
# Line 79 | Line 85 | proc delpic {} {               # Delete selected pictures
85                  return
86          }
87          if [tk_dialog .dlg {Verification} \
88 <                        "Really delete picture file(s) $selected_pics?" \
88 >                        "Really delete file(s) $selected_pics?" \
89                          questhead 0 {Delete} {Cancel}] {
90                  return
91          }
# Line 90 | Line 96 | proc delpic {} {               # Delete selected pictures
96   }
97  
98   proc get_selpics {} {           # return selected pictures
99 <        global fvwbox ufvwbox radvar
99 >        global fvwbox ufvwbox radvar rawfroot
100          set sl {}
101          foreach i [$fvwbox curselection] {
102 <                lappend sl $radvar(PICTURE)_[$fvwbox get $i].pic
102 >                testappend sl $radvar(PICTURE)_[$fvwbox get $i].pic
103 >                if {$rawfroot != $radvar(PICTURE)} {
104 >                        testappend sl ${rawfroot}_[$fvwbox get $i].pic
105 >                }
106 >                if {$radvar(ZFILE) != {}} {
107 >                        testappend sl $radvar(ZFILE)_[$fvwbox get $i].zbf
108 >                }
109          }
110          foreach i [$ufvwbox curselection] {
111 <                lappend sl $radvar(PICTURE)_[$ufvwbox get $i].raw
111 >                testappend sl ${rawfroot}_[$ufvwbox get $i].unf
112 >                if {$radvar(ZFILE) != {}} {
113 >                        testappend sl $radvar(ZFILE)_[$ufvwbox get $i].zbf
114 >                }
115          }
116          return $sl
117   }
# Line 123 | Line 138 | proc dsppic {} {               # Display selected pictures
138                  }
139          }
140          foreach p $selected_pics {
141 <                if [string match *.raw $p] {
141 >                if [string match *.unf $p] {
142                          set dc [format $dispcom $ev $p]
143                  } else {
144                          set dc [format $dispcom 0 $p]
# Line 163 | Line 178 | proc prtpic {} {               # Print selected pictures
178   }
179  
180   proc do_results w {             # Results screen
181 <        global radvar curmess fvwbox ufvwbox dispcom prntcom conv convdest
181 >        global radvar curmess fvwbox ufvwbox dispcom prntcom conv \
182 >                        rawfroot convdest
183          if {"$w" == "done"} {
184 <                unset fvwbox ufvwbox convdest
184 >                unset fvwbox ufvwbox convdest rawfroot
185                  return
186          }
187          frame $w
# Line 245 | Line 261 | proc do_results w {            # Results screen
261          place $w.prte -relwidth .5714 -relheight .0610 -relx .3571 -rely .8537
262          helplink $w.prte trad results printcommand
263          # Fill in views
264 +        if {[info exists radvar(RAWFILE)] && $radvar(RAWFILE) != {}} {
265 +                set rawfroot $radvar(RAWFILE)
266 +        } else {
267 +                set rawfroot $radvar(PICTURE)
268 +        }
269 +        if {! [info exists radvar(ZFILE)]} {
270 +                set radvar(ZFILE) {}
271 +        }
272          list_views
273   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines