Changeset 2511 for trunk/gui/apps/vtkviewer-test
- Timestamp:
- Sep 13, 2011 12:42:39 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/apps/vtkviewer-test
r2470 r2511 147 147 148 148 # ---------------------------------------------------------------------- 149 # USAGE: send_spheres_file 150 # 151 # Prompts the user for a text file, and then sends the text within 152 # that file along to the rendering widget. 153 # ---------------------------------------------------------------------- 154 proc send_spheres_file {} { 155 global widgets 156 157 set file [tk_getOpenFile -title "Open VTK File as Spheres"] 158 if {"" != $file && [catch { 159 set fid [open $file r] 160 fconfigure $fid -translation binary 161 set info [read $fid] 162 close $fid 163 }] == 0} { 164 set obj [visData #auto $info "spheres"] 165 $widgets(vtkviewer) add $obj 166 } 167 } 168 169 # ---------------------------------------------------------------------- 149 170 # USAGE: load_script 150 171 # … … 343 364 .mbar.file add command -label "Send VTK File..." -underline 0 -command send_file 344 365 .mbar.file add command -label "Send VTK File as Streamlines..." -underline 0 -command send_streamlines_file 366 .mbar.file add command -label "Send VTK File as Spheres..." -underline 0 -command send_spheres_file 345 367 .mbar.file add command -label "Load script..." -underline 0 -command load_script 346 368 .mbar.file add command -label "Reset" -underline 0 -command reset
Note: See TracChangeset
for help on using the changeset viewer.