Changeset 3084 for trunk/gui/apps/vtkviewer-test
- Timestamp:
- Jul 6, 2012, 1:18:47 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/apps/vtkviewer-test
r3069 r3084 174 174 175 175 # ---------------------------------------------------------------------- 176 # USAGE: send_molecule_file 177 # 178 # Prompts the user for a text file, and then sends the text within 179 # that file along to the rendering widget. 180 # ---------------------------------------------------------------------- 181 proc send_molecule_file {} { 182 global widgets 183 184 set file [tk_getOpenFile -title "Open VTK File as Molecule"] 185 if {"" != $file && [catch { 186 set fid [open $file r] 187 fconfigure $fid -translation binary 188 set info [read $fid] 189 close $fid 190 }] == 0} { 191 set obj [visData #auto $info "molecule"] 192 $widgets(vtkviewer) add $obj 193 } 194 } 195 196 # ---------------------------------------------------------------------- 176 197 # USAGE: load_script 177 198 # … … 371 392 .mbar.file add command -label "Send VTK File as Streamlines..." -underline 0 -command send_streamlines_file 372 393 .mbar.file add command -label "Send VTK File as Glyphs..." -underline 0 -command send_glyphs_file 394 .mbar.file add command -label "Send VTK File as Molecule..." -underline 0 -command send_molecule_file 373 395 .mbar.file add command -label "Load script..." -underline 0 -command load_script 374 396 .mbar.file add command -label "Reset" -underline 0 -command reset
Note: See TracChangeset
for help on using the changeset viewer.