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

Comparing ray/src/util/do_scene3.6.tcl (file contents):
Revision 2.1 by greg, Thu Oct 27 15:56:08 1994 UTC vs.
Revision 2.10 by greg, Sat Feb 22 02:07:30 2003 UTC

# Line 1 | Line 1
1 < # SCCSid "$SunId$ LBL"
1 > # RCSid: $Id$
2   #
3   # Track octree and scene files
4   #
5  
6 set myglob(materials) *.mat
7 set myglob(illum) *.rad
8 set myglob(scene) *.rad
9 set myglob(objects) *.rad
10
6   proc newfent f {                # add file to our list
7          global rifname radvar mybox myvar
8          set rd [file dirname $rifname]
# Line 25 | Line 20 | proc lbgetf nm {               # get list box files
20          global myglob radvar mybox myvar curpat curmess
21          set myvar $nm
22          set oldnum [llength $radvar($nm)]
23 <        if [getfile -perm -glob $myglob($nm) -view view_txt -send newfent] {
23 >        if [getfile -grab -perm -glob $myglob($nm) -view view_txt -send newfent] {
24                  set curmess "Added [expr [llength $radvar($nm)] - $oldnum] entries."
25          } elseif {[llength $radvar($nm)] > $oldnum} {
26                  set radvar($nm) [lreplace $radvar($nm) $oldnum end]
# Line 39 | Line 34 | proc lbgetf nm {               # get list box files
34  
35   proc oct_delete {} {            # delete octree file
36          global radvar curmess
37 <        if {"$radvar(OCTREE)" == {} || ! [file exists $radvar(OCTREE)]} {
37 >        if {"$radvar(OCTREE)" == {} || ! [file isfile $radvar(OCTREE)]} {
38                  set curmess {No octree file.}
39                  return
40          }
41          if [tk_dialog .dlg {Verification} \
42                          "Really delete octree file $radvar(OCTREE)?" \
43 <                        questhead 1 {Delete} {Cancel}] {
43 >                        questhead 0 {Delete} {Cancel}] {
44                  return 0
45          }
46          if [catch {exec rm $radvar(OCTREE) < /dev/null} curmess] {return 0}
# Line 56 | Line 51 | proc oct_delete {} {           # delete octree file
51   proc getdepend {} {             # get object dependencies
52          global radvar curmess mybox
53          set curmess "Please wait..."
54 <        update idletasks
54 >        update
55          foreach newf [eval exec raddepend $radvar(illum) $radvar(scene)] {
56                  if {[lsearch -exact $radvar(objects) $newf] < 0} {
57                          lappend radvar(objects) $newf
# Line 142 | Line 137 | proc do_scene w {              # Create scene screen
137          place $w.oct -relwidth .5714 -relheight .0610 -relx .2143 -rely .0610
138          helplink $w.oct trad scene octree
139          button $w.odel -text Delete -relief raised -command oct_delete
140 <        place $w.odel -relwidth .1071 -relheight .0610 -relx .8214 -rely .0610
140 >        place $w.odel -relwidth .1071 -relheight .0610 -relx .8000 -rely .0610
141          helplink $w.odel trad scene octdelete
142          # Materials listbox
143          button $w.matb -text Materials -relief raised \
144                          -command "lbgetf materials"
145          set mybox(materials) $w.mat.lb
146 <        place $w.matb -relwidth .1071 -relheight .0610 -relx .0714 -rely .1463
146 >        place $w.matb -relwidth .1200 -relheight .0610 -relx .0714 -rely .1463
147          frame $w.mat
148          scrollbar $w.mat.sb -relief sunken -command "$w.mat.lb yview"
149          listbox $w.mat.lb -relief sunken -yscroll "$w.mat.sb set" -font $lbfont
# Line 162 | Line 157 | proc do_scene w {              # Create scene screen
157          button $w.illb -text Illum -relief raised \
158                          -command "lbgetf illum"
159          set mybox(illum) $w.ill.lb
160 <        place $w.illb -relwidth .1071 -relheight .0610 -relx .0714 -rely .2683
160 >        place $w.illb -relwidth .1200 -relheight .0610 -relx .0714 -rely .2683
161          frame $w.ill
162          scrollbar $w.ill.sb -relief sunken -command "$w.ill.lb yview"
163          listbox $w.ill.lb -relief sunken -yscroll "$w.ill.sb set" -font $lbfont
# Line 176 | Line 171 | proc do_scene w {              # Create scene screen
171          button $w.sceb -text Scene -relief raised \
172                          -command "lbgetf scene"
173          set mybox(scene) $w.sce.lb
174 <        place $w.sceb -relwidth .1071 -relheight .0610 -relx .0714 -rely .3902
174 >        place $w.sceb -relwidth .1200 -relheight .0610 -relx .0714 -rely .3902
175          frame $w.sce
176          scrollbar $w.sce.sb -relief sunken -command "$w.sce.lb yview"
177          listbox $w.sce.lb -relief sunken -yscroll "$w.sce.sb set" -font $lbfont
# Line 190 | Line 185 | proc do_scene w {              # Create scene screen
185          button $w.objb -text Objects -relief raised \
186                          -command "lbgetf objects"
187          set mybox(objects) $w.obj.lb
188 <        place $w.objb -relwidth .1071 -relheight .0610 -relx .0714 -rely .6829
188 >        place $w.objb -relwidth .1200 -relheight .0610 -relx .0714 -rely .6829
189          frame $w.obj
190          scrollbar $w.obj.sb -relief sunken -command "$w.obj.lb yview"
191          listbox $w.obj.lb -relief sunken -yscroll "$w.obj.sb set" -font $lbfont
# Line 200 | Line 195 | proc do_scene w {              # Create scene screen
195          place $w.obj -relwidth .5714 -relheight .2683 -relx .2143 -rely .6829
196          eval $w.obj.lb insert end $radvar(objects)
197          button $w.autob -text Auto -relief raised -command getdepend
198 <        place $w.autob -relwidth .1071 -relheight .0610 -relx .0714 -rely .7927
198 >        place $w.autob -relwidth .1200 -relheight .0610 -relx .0714 -rely .7927
199          helplink "$w.obj.lb $w.objb $w.autob" trad scene objects
200          # View button
201          button $w.vwb -text Edit -relief raised -command vwselfil
# Line 216 | Line 211 | proc do_scene w {              # Create scene screen
211          place $w.revert -relwidth .1071 -relheight .0610 -relx .98 -rely .98 \
212                          -anchor se
213          helplink $w.revert trad scene revert
214 <        button $w.copy -text Copy -relief raised -command {getfile \
214 >        button $w.copy -text Copy -relief raised -command {getfile -grab \
215                          -send copyscene -view view_txt -glob $rif_glob}
216          place $w.copy -relwidth .1071 -relheight .0610 -relx .98 -rely .90 \
217                          -anchor se

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines