- Timestamp:
- Aug 27, 2013, 12:38:22 PM (11 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 8 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 { -
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 { -
trunk/gui/scripts/vtkglyphviewer.tcl
r3897 r3899 1486 1486 set font "Arial 8" 1487 1487 set lineht [font metrics $font -linespace] 1488 set c $itk_component(view)1489 1488 set w 12 1490 1489 set h [expr {$_height - 2 * ($lineht + 2)}] 1491 if { $h < 1 } {1490 if { $h < 1 } { 1492 1491 return 1493 1492 } … … 2226 2225 "move" { 2227 2226 set axis [lindex $args 0] 2228 set a [string toupper $axis]2229 set oldval $_settings(cutplane${a}Position)2230 2227 set newval [lindex $args 1] 2231 2228 if {[llength $args] != 2} { -
trunk/gui/scripts/vtkheightmapviewer.tcl
r3814 r3899 1660 1660 incr h -$lineht 1661 1661 } 1662 if { $h < 1 } {1662 if { $h < 1 } { 1663 1663 return 1664 1664 } … … 2422 2422 incr y $lineht 2423 2423 $c coords colormap $x $y 2424 set ix [image width $_image(legend)]2425 set ih [image height $_image(legend)]2426 2424 $c coords sensor [expr $x - $iw] $y $x [expr $y + $ih] 2427 2425 $c raise sensor -
trunk/gui/scripts/vtkisosurfaceviewer.tcl
r3897 r3899 1507 1507 set font "Arial 8" 1508 1508 set lineht [font metrics $font -linespace] 1509 set c $itk_component(view)1510 1509 set w 12 1511 1510 set h [expr {$_height - 2 * ($lineht + 2)}] 1512 if { $h < 1 } {1511 if { $h < 1 } { 1513 1512 return 1514 1513 } … … 2289 2288 "move" { 2290 2289 set axis [lindex $args 0] 2291 set a [string toupper $axis]2292 set oldval $_settings(cutplane${a}Position)2293 2290 set newval [lindex $args 1] 2294 2291 if {[llength $args] != 2} { -
trunk/gui/scripts/vtkstreamlinesviewer.tcl
r3833 r3899 1505 1505 set font "Arial 8" 1506 1506 set lineht [font metrics $font -linespace] 1507 set c $itk_component(legend)1508 1507 set w 12 1509 1508 set h [expr {$_height - 3 * ($lineht + 2)}] 1510 if { $h < 1 } {1509 if { $h < 1 } { 1511 1510 return 1512 1511 } … … 2361 2360 "move" { 2362 2361 set axis [lindex $args 0] 2363 set oldval $_settings(axis-${axis}position)2364 2362 set newval [lindex $args 1] 2365 2363 if {[llength $args] != 2} { -
trunk/gui/scripts/vtkviewer.tcl
r3847 r3899 1613 1613 set font "Arial 8" 1614 1614 set lineht [font metrics $font -linespace] 1615 set c $itk_component(legend)1616 1615 set w 12 1617 1616 set h [expr {$_height - 2 * ($lineht + 2)}] 1618 if { $h < 1 } {1617 if { $h < 1 } { 1619 1618 return 1620 1619 } … … 2132 2131 $itk_component(zCutScale) set 100 2133 2132 $itk_component(zCutScale) configure -state disabled 2134 #$itk_component(zCutScale) configure -state disabled2135 2133 Rappture::Tooltip::for $itk_component(zCutScale) \ 2136 2134 "@[itcl::code $this Slice tooltip z]" … … 2660 2658 "move" { 2661 2659 set axis [lindex $args 0] 2662 set oldval $_axis(${axis}position)2663 2660 set newval [lindex $args 1] 2664 2661 if {[llength $args] != 2} { -
trunk/gui/scripts/vtkvolumeviewer.tcl
r3896 r3899 1451 1451 set font "Arial 8" 1452 1452 set lineht [font metrics $font -linespace] 1453 set c $itk_component(legend)1454 1453 set w 12 1455 1454 set h [expr {$_height - 3 * ($lineht + 2)}] 1456 if { $h < 1 } {1455 if { $h < 1 } { 1457 1456 return 1458 1457 }
Note: See TracChangeset
for help on using the changeset viewer.