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 |
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 { |
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 |
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." |