Changeset 3899 for trunk/gui/scripts/nanovisviewer.tcl
- Timestamp:
- Aug 27, 2013 12:38:22 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/nanovisviewer.tcl
r3898 r3899 220 220 $this-ypan $_view(ypan) 221 221 $this-volume 1 222 $this-xcutplane 0 222 $this-cutplaneVisible 0 223 $this-xcutplane 1 223 224 $this-xcutposition 0 224 $this-ycutplane 0225 $this-ycutplane 1 225 226 $this-ycutposition 0 226 $this-zcutplane 0227 $this-zcutplane 1 227 228 $this-zcutposition 0 228 229 }] … … 285 286 "Toggle the volume cloud on/off" 286 287 pack $itk_component(volume) -padx 2 -pady 2 288 289 itk_component add cutplane { 290 Rappture::PushButton $f.cutplane \ 291 -onimage [Rappture::icon cutbutton] \ 292 -offimage [Rappture::icon cutbutton] \ 293 -variable [itcl::scope _settings($this-cutplaneVisible)] \ 294 -command [itcl::code $this AdjustSetting cutplaneVisible] 295 } 296 Rappture::Tooltip::for $itk_component(cutplane) \ 297 "Show/Hide cutplanes" 298 pack $itk_component(cutplane) -padx 2 -pady 2 287 299 288 300 if { [catch { … … 944 956 PanCamera 945 957 SendCmd "camera zoom $_view(zoom)" 946 InitSettings light2side light transp isosurface grid axes 947 958 948 959 foreach axis {x y z} { 949 960 # Turn off cutplanes for all volumes 950 961 SendCmd "cutplane state 0 $axis" 951 962 } 963 964 InitSettings light2side light transp isosurface grid axes \ 965 cutplaneVisible xcutplane ycutplane zcutplane 966 952 967 if {"" != $_first} { 953 968 set axis [$_first hints updir] … … 1268 1283 set datasets [CurrentDatasets -cutplanes] 1269 1284 SendCmd "volume data state $_settings($this-volume) $datasets" 1285 } 1286 "cutplaneVisible" { 1287 set bool $_settings($this-$what) 1288 set datasets [CurrentDatasets -cutplanes] 1289 set tag [lindex $datasets 0] 1290 SendCmd "cutplane visible $bool $tag" 1270 1291 } 1271 1292 "xcutplane" - "ycutplane" - "zcutplane" { … … 1826 1847 Rappture::Tooltip::for $itk_component(xCutButton) \ 1827 1848 "Toggle the X cut plane on/off" 1849 $itk_component(xCutButton) select 1828 1850 1829 1851 itk_component add xCutScale { … … 1853 1875 Rappture::Tooltip::for $itk_component(yCutButton) \ 1854 1876 "Toggle the Y cut plane on/off" 1877 $itk_component(yCutButton) select 1855 1878 1856 1879 itk_component add yCutScale { … … 1880 1903 Rappture::Tooltip::for $itk_component(zCutButton) \ 1881 1904 "Toggle the Z cut plane on/off" 1905 $itk_component(zCutButton) select 1882 1906 1883 1907 itk_component add zCutScale {
Note: See TracChangeset
for help on using the changeset viewer.