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.8 by greg, Tue Oct 17 21:28:15 1995 UTC

# Line 6 | Line 6
6   set myglob(materials) *.mat
7   set myglob(illum) *.rad
8   set myglob(scene) *.rad
9 < set myglob(objects) *.rad
9 > set myglob(objects) *
10  
11   proc newfent f {                # add file to our list
12          global rifname radvar mybox myvar
# Line 25 | Line 25 | proc lbgetf nm {               # get list box files
25          global myglob radvar mybox myvar curpat curmess
26          set myvar $nm
27          set oldnum [llength $radvar($nm)]
28 <        if [getfile -perm -glob $myglob($nm) -view view_txt -send newfent] {
28 >        if [getfile -grab -perm -glob $myglob($nm) -view view_txt -send newfent] {
29                  set curmess "Added [expr [llength $radvar($nm)] - $oldnum] entries."
30          } elseif {[llength $radvar($nm)] > $oldnum} {
31                  set radvar($nm) [lreplace $radvar($nm) $oldnum end]
# Line 39 | Line 39 | proc lbgetf nm {               # get list box files
39  
40   proc oct_delete {} {            # delete octree file
41          global radvar curmess
42 <        if {"$radvar(OCTREE)" == {} || ! [file exists $radvar(OCTREE)]} {
42 >        if {"$radvar(OCTREE)" == {} || ! [file isfile $radvar(OCTREE)]} {
43                  set curmess {No octree file.}
44                  return
45          }
46          if [tk_dialog .dlg {Verification} \
47                          "Really delete octree file $radvar(OCTREE)?" \
48 <                        questhead 1 {Delete} {Cancel}] {
48 >                        questhead 0 {Delete} {Cancel}] {
49                  return 0
50          }
51          if [catch {exec rm $radvar(OCTREE) < /dev/null} curmess] {return 0}
# Line 56 | Line 56 | proc oct_delete {} {           # delete octree file
56   proc getdepend {} {             # get object dependencies
57          global radvar curmess mybox
58          set curmess "Please wait..."
59 <        update idletasks
59 >        update
60          foreach newf [eval exec raddepend $radvar(illum) $radvar(scene)] {
61                  if {[lsearch -exact $radvar(objects) $newf] < 0} {
62                          lappend radvar(objects) $newf
# Line 142 | Line 142 | proc do_scene w {              # Create scene screen
142          place $w.oct -relwidth .5714 -relheight .0610 -relx .2143 -rely .0610
143          helplink $w.oct trad scene octree
144          button $w.odel -text Delete -relief raised -command oct_delete
145 <        place $w.odel -relwidth .1071 -relheight .0610 -relx .8214 -rely .0610
145 >        place $w.odel -relwidth .1071 -relheight .0610 -relx .8000 -rely .0610
146          helplink $w.odel trad scene octdelete
147          # Materials listbox
148          button $w.matb -text Materials -relief raised \
149                          -command "lbgetf materials"
150          set mybox(materials) $w.mat.lb
151 <        place $w.matb -relwidth .1071 -relheight .0610 -relx .0714 -rely .1463
151 >        place $w.matb -relwidth .1200 -relheight .0610 -relx .0714 -rely .1463
152          frame $w.mat
153          scrollbar $w.mat.sb -relief sunken -command "$w.mat.lb yview"
154          listbox $w.mat.lb -relief sunken -yscroll "$w.mat.sb set" -font $lbfont
# Line 162 | Line 162 | proc do_scene w {              # Create scene screen
162          button $w.illb -text Illum -relief raised \
163                          -command "lbgetf illum"
164          set mybox(illum) $w.ill.lb
165 <        place $w.illb -relwidth .1071 -relheight .0610 -relx .0714 -rely .2683
165 >        place $w.illb -relwidth .1200 -relheight .0610 -relx .0714 -rely .2683
166          frame $w.ill
167          scrollbar $w.ill.sb -relief sunken -command "$w.ill.lb yview"
168          listbox $w.ill.lb -relief sunken -yscroll "$w.ill.sb set" -font $lbfont
# Line 176 | Line 176 | proc do_scene w {              # Create scene screen
176          button $w.sceb -text Scene -relief raised \
177                          -command "lbgetf scene"
178          set mybox(scene) $w.sce.lb
179 <        place $w.sceb -relwidth .1071 -relheight .0610 -relx .0714 -rely .3902
179 >        place $w.sceb -relwidth .1200 -relheight .0610 -relx .0714 -rely .3902
180          frame $w.sce
181          scrollbar $w.sce.sb -relief sunken -command "$w.sce.lb yview"
182          listbox $w.sce.lb -relief sunken -yscroll "$w.sce.sb set" -font $lbfont
# Line 190 | Line 190 | proc do_scene w {              # Create scene screen
190          button $w.objb -text Objects -relief raised \
191                          -command "lbgetf objects"
192          set mybox(objects) $w.obj.lb
193 <        place $w.objb -relwidth .1071 -relheight .0610 -relx .0714 -rely .6829
193 >        place $w.objb -relwidth .1200 -relheight .0610 -relx .0714 -rely .6829
194          frame $w.obj
195          scrollbar $w.obj.sb -relief sunken -command "$w.obj.lb yview"
196          listbox $w.obj.lb -relief sunken -yscroll "$w.obj.sb set" -font $lbfont
# Line 200 | Line 200 | proc do_scene w {              # Create scene screen
200          place $w.obj -relwidth .5714 -relheight .2683 -relx .2143 -rely .6829
201          eval $w.obj.lb insert end $radvar(objects)
202          button $w.autob -text Auto -relief raised -command getdepend
203 <        place $w.autob -relwidth .1071 -relheight .0610 -relx .0714 -rely .7927
203 >        place $w.autob -relwidth .1200 -relheight .0610 -relx .0714 -rely .7927
204          helplink "$w.obj.lb $w.objb $w.autob" trad scene objects
205          # View button
206          button $w.vwb -text Edit -relief raised -command vwselfil
# Line 216 | Line 216 | proc do_scene w {              # Create scene screen
216          place $w.revert -relwidth .1071 -relheight .0610 -relx .98 -rely .98 \
217                          -anchor se
218          helplink $w.revert trad scene revert
219 <        button $w.copy -text Copy -relief raised -command {getfile \
219 >        button $w.copy -text Copy -relief raised -command {getfile -grab \
220                          -send copyscene -view view_txt -glob $rif_glob}
221          place $w.copy -relwidth .1071 -relheight .0610 -relx .98 -rely .90 \
222                          -anchor se

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines