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

Comparing ray/src/util/do_action.tcl (file contents):
Revision 2.7 by greg, Tue Dec 6 19:36:21 1994 UTC vs.
Revision 2.12 by greg, Wed Feb 16 05:40:12 2005 UTC

# Line 1 | Line 1
1 < # SCCSid "$SunId$ LBL"
1 > # RCSid: $Id$
2   #
3   # Action screen for trad
4   #
# Line 8 | Line 8 | set hostname [exec hostname]
8  
9   proc make_script {} {           # make run script
10          global scname rpview curmess
11 <        set rfn /usr/tmp/rf[pid]
11 >        set rfn /tmp/rf[pid]
12          if {! [save_vars $rfn]} {
13                  beep
14                  set curmess "Cannot save variables to temporary file!"
# Line 19 | Line 19 | proc make_script {} {          # make run script
19                  lappend radcom -v $rpview
20          }
21          if {"$scname" == {}} {
22 <                set rof /usr/tmp/ro[pid]
22 >                set rof /tmp/ro[pid]
23          } else {
24                  set rof $scname
25          }
# Line 50 | Line 50 | proc make_oct args {           # Make octree file ($args is {-t
50  
51   proc run_rad args {             # Run rad command with given arguments
52          global curmess
53 <        set rfn /usr/tmp/rf[pid]
53 >        set rfn /tmp/rf[pid]
54          if {! [save_vars $rfn]} {
55                  beep
56                  set curmess "Cannot save variables to temporary file!"
# Line 174 | Line 174 | proc do_action w {             # Action screen
174          global rifname rvview rpview radvar bfname batch_pid \
175                          curmess scname mywin alldone batch_fmt hostname
176          if {"$w" == "done"} {
177 <                unset rpview bfname batch_pid mywin
177 >                unset rvview rpview bfname batch_pid mywin
178                  return
179          }
180          set bfname [file rootname [file tail $rifname]].err
# Line 196 | Line 196 | proc do_action w {             # Action screen
196          # Render interactively
197          label $w.ril -text {Render interactively}
198          place $w.ril -relx .1429 -rely .2439
199 <        button $w.rirv -text rview -relief raised \
199 >        button $w.rirv -text rvu -relief raised \
200                          -command {run_rad -v $rvview -o x11}
201          place $w.rirv -relwidth .1071 -relheight .0610 -relx .4643 -rely .2439
202 <        helplink $w.rirv trad action rview
202 >        helplink $w.rirv trad action rvu
203          label $w.rivl -text View:
204          place $w.rivl -relx .6072 -rely .2439
205          menubutton $w.rivmb -textvariable rvview -anchor w -relief raised
# Line 223 | Line 223 | proc do_action w {             # Action screen
223                          -command {view_txt $bfname}
224          place $w.rbce -relwidth .1786 -relheight .0610 -relx .6429 -rely .5488
225          helplink $w.rbce trad action checkerr
226 <        if [file exists $bfname] {
226 >        if [file isfile $bfname] {
227                  set fi [open $bfname r]
228 <                scan [gets $fi] $batch_fmt batch_pid batch_host
229 <                gets $fi radcom
228 >                if {[scan [gets $fi] $batch_fmt batch_pid batch_host] != 2} {
229 >                        set batch_host unknown
230 >                        set radcom {}
231 >                } else {
232 >                        gets $fi radcom
233 >                }
234                  close $fi
235                  if [string match "rad -v *" $radcom] {
236                          set rpview [lindex $radcom 2]

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines