Changeset 3899 for trunk/gui/scripts/flowvisviewer.tcl
- Timestamp:
- Aug 27, 2013 12:38:22 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/flowvisviewer.tcl
r3898 r3899 253 253 $this-streams 0 254 254 $this-volume 1 255 $this-xcutplane 0 255 $this-cutplaneVisible 0 256 $this-xcutplane 1 256 257 $this-xcutposition 0 257 $this-ycutplane 0258 $this-ycutplane 1 258 259 $this-ycutposition 0 259 $this-zcutplane 0260 $this-zcutplane 1 260 261 $this-zcutposition 0 261 262 }] … … 318 319 "Toggle the volume cloud on/off" 319 320 pack $itk_component(volume) -padx 2 -pady 2 321 322 itk_component add cutplane { 323 Rappture::PushButton $f.cutplane \ 324 -onimage [Rappture::icon cutbutton] \ 325 -offimage [Rappture::icon cutbutton] \ 326 -variable [itcl::scope _settings($this-cutplaneVisible)] \ 327 -command [itcl::code $this AdjustSetting cutplaneVisible] 328 } 329 Rappture::Tooltip::for $itk_component(cutplane) \ 330 "Show/Hide cutplanes" 331 pack $itk_component(cutplane) -padx 2 -pady 2 320 332 321 333 if { [catch { … … 1238 1250 set _first [lindex [get] 0] 1239 1251 1252 foreach axis {x y z} { 1253 # Turn off cutplanes for all volumes 1254 SendCmd "cutplane state 0 $axis" 1255 } 1256 1240 1257 # Reset the camera and other view parameters 1241 InitSettings light2side light transp isosurface grid axes volume outline 1258 InitSettings light2side light transp isosurface grid axes volume outline \ 1259 cutplaneVisible xcutplane ycutplane zcutplane 1242 1260 1243 1261 # nothing to send -- activate the proper volume … … 1295 1313 set vols [CurrentVolumeIds -cutplanes] 1296 1314 foreach axis {x y z} { 1297 SendCmd "cutplane state $_settings($this-${axis}cutplane) $axis $vols"1298 1315 set pos [expr {0.01*$_settings($this-${axis}cutposition)}] 1299 1316 SendCmd "cutplane position $pos $axis $vols" … … 1707 1724 } 1708 1725 } 1726 "cutplaneVisible" { 1727 set bool $_settings($this-$what) 1728 set datasets [CurrentVolumeIds -cutplanes] 1729 set tag [lindex $datasets 0] 1730 SendCmd "cutplane visible $bool $tag" 1731 } 1709 1732 "xcutplane" - "ycutplane" - "zcutplane" { 1710 1733 set axis [string range $what 0 0] … … 2304 2327 Rappture::Tooltip::for $itk_component(xCutButton) \ 2305 2328 "Toggle the X cut plane on/off" 2329 $itk_component(xCutButton) select 2306 2330 2307 2331 itk_component add xCutScale { … … 2331 2355 Rappture::Tooltip::for $itk_component(yCutButton) \ 2332 2356 "Toggle the Y cut plane on/off" 2357 $itk_component(yCutButton) select 2333 2358 2334 2359 itk_component add yCutScale { … … 2358 2383 Rappture::Tooltip::for $itk_component(zCutButton) \ 2359 2384 "Toggle the Z cut plane on/off" 2385 $itk_component(zCutButton) select 2360 2386 2361 2387 itk_component add zCutScale {
Note: See TracChangeset
for help on using the changeset viewer.