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

Comparing ray/src/util/trad.wsh (file contents):
Revision 2.10 by greg, Mon Jul 24 13:31:26 1995 UTC vs.
Revision 2.15 by greg, Sat Feb 22 02:07:30 2003 UTC

# Line 1 | Line 1
1 < #!/usr/local/bin/wish -f
2 < # SCCSid "$SunId$ LBL"
1 > #!/usr/local/bin/wish4.0
2 > # RCSid: $Id$
3   #
4   # TCL/TK-based Rad Input File Editor
5   #
# Line 11 | Line 11 | set helplib $radlib
11  
12   set auto_path [linsert $auto_path 0 $radlib]
13  
14 + # Assign global globbing variables
15 +
16 + set myglob(rif) *.rif
17 + set myglob(materials) *.mat
18 + set myglob(illum) *.rad
19 + set myglob(scene) *.rad
20 + set myglob(objects) *
21 +
22   # Create required procedures
23  
24   proc modified {} {      # check for radvar modification
# Line 135 | Line 143 | setbutt results
143   rename setbutt {}
144   button .upper.right.help -text HELP -width 9 \
145                  -command "gethelp trad trad intro"
146 < pack .upper.right.help -side top -pady 10 -anchor se
146 > pack .upper.right.help -side top -pady 5 -anchor se
147   helplink .upper.right.help trad trad help
148   button .upper.right.quit -text QUIT \
149                  -command {if [chksave] {destroy .}} -width 9
150 < pack .upper.right.quit -side top -pady 10 -anchor se
150 > pack .upper.right.quit -side top -pady 5 -anchor se
151   helplink .upper.right.quit trad trad quit
152  
153   if $smallscrn {
# Line 151 | Line 159 | if $smallscrn {
159   }
160   wm iconbitmap . @$radlib/trad.icon
161  
162 < proc gotfile {{o 1}} {          # set file possession state
162 > proc gotfile o {                # set file possession state
163          global oldradvar radvar
164          catch {unset oldradvar}
165          if $o {
# Line 161 | Line 169 | proc gotfile {{o 1}} {         # set file possession state
169                  }
170          } else {
171                  set mode disabled
164                .file invoke
172          }
173          foreach b {scene zone views options action results} {
174                  .$b configure -state $mode
# Line 170 | Line 177 | proc gotfile {{o 1}} {         # set file possession state
177  
178   # Decide where to go and start
179  
180 + gotfile 0
181   if {[llength $argv] == 0} {
182          set curmess "Choose a Radiance project file."
183 <        gotfile 0
183 >        .file invoke
184   } elseif {[llength $argv] == 1} {
185          cd [file dirname $argv]
186          set curfile [file tail $argv]
187 <        if {! [file exists $curfile]} {
188 <                newnew $curfile
189 <                .scene invoke
187 >        if {! [file isfile $curfile]} {
188 >                if [newnew $curfile] {
189 >                        .scene invoke
190 >                } else {
191 >                        .file invoke
192 >                }
193          } elseif {[newload $curfile]} {
194                  if $alldone {
195                          set curmess "All renderings are finished."

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines