--- ray/src/util/trad.wsh 1995/10/05 13:16:22 2.12 +++ ray/src/util/trad.wsh 2003/02/22 02:07:30 2.15 @@ -1,5 +1,5 @@ #!/usr/local/bin/wish4.0 -# SCCSid "$SunId$ LBL" +# RCSid: $Id: trad.wsh,v 2.15 2003/02/22 02:07:30 greg Exp $ # # TCL/TK-based Rad Input File Editor # @@ -11,6 +11,14 @@ set helplib $radlib set auto_path [linsert $auto_path 0 $radlib] +# Assign global globbing variables + +set myglob(rif) *.rif +set myglob(materials) *.mat +set myglob(illum) *.rad +set myglob(scene) *.rad +set myglob(objects) * + # Create required procedures proc modified {} { # check for radvar modification @@ -176,9 +184,12 @@ if {[llength $argv] == 0} { } elseif {[llength $argv] == 1} { cd [file dirname $argv] set curfile [file tail $argv] - if {! [file exists $curfile]} { - newnew $curfile - .scene invoke + if {! [file isfile $curfile]} { + if [newnew $curfile] { + .scene invoke + } else { + .file invoke + } } elseif {[newload $curfile]} { if $alldone { set curmess "All renderings are finished."