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

Comparing ray/src/util/do_zone.tcl (file contents):
Revision 2.1 by greg, Thu Oct 27 15:56:10 1994 UTC vs.
Revision 2.6 by greg, Thu May 30 16:15:27 1996 UTC

# Line 36 | Line 36 | proc zonechange {nm el op} {           # record change in ZONE
36                  return
37          }
38          trace vdelete radvar(ZONE) wu zonechange
39 <        set radvar(ZONE) "$zonevar(IE)  $zonevar(xmin) $zonevar(xmax)  $zonevar(ymin) $zonevar(ymax)  $zonevar(zmin) $zonevar(zmax)"
39 >        set radvar(ZONE) "$zonevar(IE) $zonevar(xmin) $zonevar(xmax) $zonevar(ymin) $zonevar(ymax) $zonevar(zmin) $zonevar(zmax)"
40          trace variable radvar(ZONE) wu zonechange
41   }
42  
# Line 49 | Line 49 | proc copyzone rf {             # copy ZONE settings from another
49          load_vars [file tail $rf] {ZONE DETAIL INDIRECT VARIABILITY EXPOSURE}
50   }
51  
52 + proc add2bb f {
53 +        global bbargs
54 +        lappend bbargs $f
55 + }
56 +
57 + proc get_bbox {} {
58 +        global radvar zonevar myglob bbargs curmess curpat
59 +        set bbargs {}
60 +        if [getfile -grab -perm -glob $myglob(scene) -view view_txt -send add2bb] {
61 +                set curmess "Running getbbox..."
62 +                update idletasks
63 +                if [catch {eval exec getbbox -h $bbargs} bbout] {
64 +                        set curmess $bbout
65 +                } else {
66 +                        set curmess "Done."
67 +                        set radvar(ZONE) "$zonevar(IE) $bbout"
68 +                }
69 +        }
70 +        set myglob(scene) $curpat
71 + }
72 +
73   proc do_zone w {                # set up ZONE screen
74 <        global radvar zonevar rifname rif_glob
74 >        global radvar zonevar rifname
75          if {"$w" == "done"} {
76                  trace vdelete radvar(ZONE) wu zonechange
77                  trace vdelete zonevar w zonechange
# Line 72 | Line 93 | proc do_zone w {               # set up ZONE screen
93          place $w.maxl -relx .0714 -rely .1829
94          label $w.minl -text Minimum
95          place $w.minl -relx .0714 -rely .3049
96 +        button $w.bbox -text Auto -relief raised -command get_bbox
97 +        place $w.bbox -relwidth .1071 -relheight .0610 -relx .0714 -rely .237
98 +        helplink $w.bbox trad zone auto
99          label $w.xl -text X:
100          place $w.xl -relx .2500 -rely .2439
101          entry $w.xmax -textvariable zonevar(xmax) -relief sunken
# Line 109 | Line 133 | proc do_zone w {               # set up ZONE screen
133          label $w.indl -text Indirect:
134          place $w.indl -relx .0714 -rely .5488
135          scale $w.inds -showvalue yes -from 0 -to 5 \
136 <                        -orient horizontal -command indscale \
113 <                        -length 450 -width 25
136 >                        -orient horizontal -command indscale
137          $w.inds set $radvar(INDIRECT)
138 <        place $w.inds -relx .2857 -rely .5488
138 >        place $w.inds -relx .2857 -rely .5488 -relwidth .6500 -relheight .1200
139          helplink $w.inds trad zone indirect
140          # Variability
141          label $w.varl -text Variability:
# Line 139 | Line 162 | proc do_zone w {               # set up ZONE screen
162          place $w.revert -relwidth .1071 -relheight .0610 -relx .98 -rely .98 \
163                          -anchor se
164          helplink $w.revert trad zone revert
165 <        button $w.copy -text Copy -relief raised -command {getfile \
166 <                        -send copyzone -view view_txt -glob $rif_glob}
165 >        button $w.copy -text Copy -relief raised -command {getfile -grab \
166 >                        -send copyzone -view view_txt -glob $myglob(rif)}
167          place $w.copy -relwidth .1071 -relheight .0610 -relx .98 -rely .90 \
168                          -anchor se
169          helplink $w.copy trad zone copy

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines