- Timestamp:
- Nov 23, 2014 5:08:52 AM (9 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/flowvisviewer.tcl
r4767 r4771 2377 2377 0,0 $inner.view_l -anchor e -pady 2 \ 2378 2378 0,1 $inner.view -anchor w -pady 2 2379 blt::table configure $inner r0 -resize none 2379 2380 2380 2381 set row 1 … … 2395 2396 } 2396 2397 2397 blt::table configure $inner c* r*-resize none2398 blt::table configure $inner c* -resize none 2398 2399 blt::table configure $inner c2 -resize expand 2399 2400 blt::table configure $inner r$row -resize expand -
trunk/gui/scripts/nanovisviewer.tcl
r4767 r4771 1951 1951 0,0 $inner.view_l -anchor e -pady 2 \ 1952 1952 0,1 $inner.view -anchor w -pady 2 1953 blt::table configure $inner r0 -resize none 1953 1954 1954 1955 set row 1 … … 1969 1970 } 1970 1971 1971 blt::table configure $inner c* r*-resize none1972 blt::table configure $inner c* -resize none 1972 1973 blt::table configure $inner c2 -resize expand 1973 1974 blt::table configure $inner r$row -resize expand -
trunk/gui/scripts/vtkmeshviewer.tcl
r4767 r4771 1441 1441 0,0 $inner.view_l -anchor e -pady 2 \ 1442 1442 0,1 $inner.view -anchor w -pady 2 1443 blt::table configure $inner r0 -resize none 1443 1444 1444 1445 set labels { qx qy qz qw xpan ypan zoom } … … 1468 1469 incr row 1469 1470 1470 blt::table configure $inner c* r*-resize none1471 blt::table configure $inner c* -resize none 1471 1472 blt::table configure $inner c2 -resize expand 1472 1473 blt::table configure $inner r$row -resize expand -
trunk/gui/scripts/vtkstreamlinesviewer.tcl
r4767 r4771 194 194 $_dispatcher register !xcutplane 195 195 $_dispatcher dispatch $this !xcutplane \ 196 "[itcl::code $this AdjustSetting cutplaneXPosition]; list"196 "[itcl::code $this AdjustSetting -cutplanexposition]; list" 197 197 198 198 # Y-Cutplane event 199 199 $_dispatcher register !ycutplane 200 200 $_dispatcher dispatch $this !ycutplane \ 201 "[itcl::code $this AdjustSetting cutplaneYPosition]; list"201 "[itcl::code $this AdjustSetting -cutplaneyposition]; list" 202 202 203 203 # Z-Cutplane event 204 204 $_dispatcher register !zcutplane 205 205 $_dispatcher dispatch $this !zcutplane \ 206 "[itcl::code $this AdjustSetting cutplaneZPosition]; list"206 "[itcl::code $this AdjustSetting -cutplanezposition]; list" 207 207 208 208 # … … 228 228 229 229 array set _settings [subst { 230 axesVisible 1 231 axisLabelsVisible 1 232 axisMinorTicks 1 233 axisXGrid 0 234 axisYGrid 0 235 axisZGrid 0 236 cutplaneEdges 0 237 cutplaneLighting 1 238 cutplaneOpacity 100 239 cutplaneVisible 0 240 cutplaneWireframe 0 241 cutplaneXPosition 50 242 cutplaneXVisible 1 243 cutplaneYPosition 50 244 cutplaneYVisible 1 245 cutplaneZPosition 50 246 cutplaneZVisible 1 247 legendVisible 1 248 streamlinesLighting 1 249 streamlinesMode lines 250 streamlinesNumSeeds 200 251 streamlinesOpacity 100 252 streamlinesScale 1 253 streamlinesSeedsVisible 0 254 streamlinesVisible 1 255 volumeEdges 0 256 volumeLighting 1 257 volumeOpacity 40 258 volumeVisible 1 259 volumeWireframe 0 230 -axesvisible 1 231 -axislabelsvisible 1 232 -axisminorticks 1 233 -axismode "static" 234 -cutplaneedges 0 235 -cutplanelighting 1 236 -cutplaneopacity 100 237 -cutplanevisible 0 238 -cutplanewireframe 0 239 -cutplanexposition 50 240 -cutplanexvisible 1 241 -cutplaneyposition 50 242 -cutplaneyvisible 1 243 -cutplanezposition 50 244 -cutplanezvisible 1 245 -legendvisible 1 246 -streamlineslighting 1 247 -streamlinesmode lines 248 -streamlinesnumseeds 200 249 -streamlinesopacity 100 250 -streamlinesscale 1 251 -streamlinesseedsvisible 0 252 -streamlinesvisible 1 253 -volumeedges 0 254 -volumelighting 1 255 -volumeopacity 40 256 -volumevisible 1 257 -volumewireframe 0 258 -xgrid 0 259 -ygrid 0 260 -zgrid 0 260 261 }] 261 262 … … 336 337 -onimage [Rappture::icon volume-on] \ 337 338 -offimage [Rappture::icon volume-off] \ 338 -variable [itcl::scope _settings( volumeVisible)] \339 -command [itcl::code $this AdjustSetting volumeVisible]339 -variable [itcl::scope _settings(-volumevisible)] \ 340 -command [itcl::code $this AdjustSetting -volumevisible] 340 341 } 341 342 $itk_component(volume) select … … 348 349 -onimage [Rappture::icon streamlines-on] \ 349 350 -offimage [Rappture::icon streamlines-off] \ 350 -variable [itcl::scope _settings( streamlinesVisible)] \351 -command [itcl::code $this AdjustSetting streamlinesVisible] \351 -variable [itcl::scope _settings(-streamlinesvisible)] \ 352 -command [itcl::code $this AdjustSetting -streamlinesvisible] \ 352 353 } 353 354 $itk_component(streamlines) select … … 360 361 -onimage [Rappture::icon cutbutton] \ 361 362 -offimage [Rappture::icon cutbutton] \ 362 -variable [itcl::scope _settings( cutplaneVisible)] \363 -command [itcl::code $this AdjustSetting cutplaneVisible]363 -variable [itcl::scope _settings(-cutplanevisible)] \ 364 -command [itcl::code $this AdjustSetting -cutplanevisible] 364 365 } 365 366 Rappture::Tooltip::for $itk_component(cutplane) \ … … 968 969 $_arcball resize $w $h 969 970 DoResize 970 InitSettings axisXGrid axisYGrid axisZGrid axis-mode \971 axesVisible axisLabelsVisible axisMinorTicks971 InitSettings -xgrid -ygrid -zgrid -axismode \ 972 -axesvisible -axislabelsvisible -axisminorticks 972 973 # This "imgflush" is to force an image returned before vtkvis starts 973 974 # reading a (big) dataset. This will display an empty plot with axes … … 1062 1063 1063 1064 if { $_reset } { 1064 InitSettings streamlinesSeedsVisible streamlinesOpacity \1065 streamlinesVisible streamlinesColormap \1066 streamlinesLighting \1067 streamlinesColormapfield \1068 volumeVisible volumeEdges volumeLighting volumeOpacity \1069 volumeWireframe \1070 cutplaneVisible \1071 cutplaneXPosition cutplaneYPosition cutplaneZPosition \1072 cutplaneXVisible cutplaneYVisible cutplaneZVisible1065 InitSettings -streamlinesseedsvisible -streamlinesopacity \ 1066 -streamlinesvisible -streamlinescolormap \ 1067 -streamlineslighting \ 1068 -streamlinescolormap -field \ 1069 -volumevisible -volumeedges -volumelighting -volumeopacity \ 1070 -volumewireframe \ 1071 -cutplanevisible \ 1072 -cutplanexposition -cutplaneyposition -cutplanezposition \ 1073 -cutplanexvisible -cutplaneyvisible -cutplanezvisible 1073 1074 1074 1075 # Reset the camera and other view parameters … … 1303 1304 itcl::body Rappture::VtkStreamlinesViewer::InitSettings { args } { 1304 1305 foreach spec $args { 1305 if { [info exists _settings($_first -$spec)] } {1306 if { [info exists _settings($_first${spec})] } { 1306 1307 # Reset global setting with dataobj specific setting 1307 set _settings($spec) $_settings($_first -$spec)1308 set _settings($spec) $_settings($_first${spec}) 1308 1309 } 1309 1310 AdjustSetting $spec … … 1323 1324 } 1324 1325 switch -- $what { 1325 "volumeOpacity" { 1326 "-axesvisible" { 1327 set bool $_settings($what) 1328 SendCmd "axis visible all $bool" 1329 } 1330 "-axislabelsvisible" { 1331 set bool $_settings($what) 1332 SendCmd "axis labels all $bool" 1333 } 1334 "-axisminorticks" { 1335 set bool $_settings($what) 1336 SendCmd "axis minticks all $bool" 1337 } 1338 "-axismode" { 1339 set mode [$itk_component(axismode) value] 1340 set mode [$itk_component(axismode) translate $mode] 1341 set _settings($what) $mode 1342 SendCmd "axis flymode $mode" 1343 } 1344 "-cutplaneedges" { 1345 set bool $_settings($what) 1346 SendCmd "cutplane edges $bool" 1347 } 1348 "-cutplanevisible" { 1349 set bool $_settings($what) 1350 SendCmd "cutplane visible $bool" 1351 } 1352 "-cutplanewireframe" { 1353 set bool $_settings($what) 1354 SendCmd "cutplane wireframe $bool" 1355 } 1356 "-cutplanelighting" { 1357 set bool $_settings($what) 1358 SendCmd "cutplane lighting $bool" 1359 } 1360 "-cutplaneopacity" { 1361 set val $_settings($what) 1362 set sval [expr { 0.01 * double($val) }] 1363 SendCmd "cutplane opacity $sval" 1364 } 1365 "-cutplanexvisible" - "-cutplaneyvisible" - "-cutplanezvisible" { 1366 set axis [string range $what 9 9] 1367 set bool $_settings($what) 1368 if { $bool } { 1369 $itk_component(${axis}CutScale) configure -state normal \ 1370 -troughcolor white 1371 } else { 1372 $itk_component(${axis}CutScale) configure -state disabled \ 1373 -troughcolor grey82 1374 } 1375 SendCmd "cutplane axis $axis $bool" 1376 } 1377 "-cutplanexposition" - "-cutplaneyposition" - "-cutplanezposition" { 1378 set axis [string range $what 9 9] 1379 set pos [expr $_settings($what) * 0.01] 1380 SendCmd "cutplane slice ${axis} ${pos}" 1381 set _cutplanePending 0 1382 } 1383 "-field" { 1384 set label [$itk_component(field) value] 1385 set fname [$itk_component(field) translate $label] 1386 set _settings($what) $fname 1387 if { [info exists _fields($fname)] } { 1388 foreach { label units components } $_fields($fname) break 1389 if { $components > 1 } { 1390 set _colorMode vmag 1391 } else { 1392 set _colorMode scalar 1393 } 1394 set _curFldName $fname 1395 set _curFldLabel $label 1396 } else { 1397 puts stderr "unknown field \"$fname\"" 1398 return 1399 } 1400 # Get the new limits because the field changed. 1401 if { ![info exists _limits($_curFldName)] } { 1402 SendCmd "dataset maprange all" 1403 } else { 1404 SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName" 1405 } 1406 SendCmd "streamlines colormode $_colorMode $_curFldName" 1407 SendCmd "cutplane colormode $_colorMode $_curFldName" 1408 DrawLegend 1409 } 1410 "-streamlinesseedsvisible" { 1411 set bool $_settings($what) 1412 SendCmd "streamlines seed visible $bool" 1413 } 1414 "-streamlinesnumseeds" { 1415 set density $_settings($what) 1416 EventuallyReseed $density 1417 } 1418 "-streamlinesvisible" { 1419 set bool $_settings($what) 1420 SendCmd "streamlines visible $bool" 1421 if { $bool } { 1422 Rappture::Tooltip::for $itk_component(streamlines) \ 1423 "Hide the streamlines" 1424 } else { 1425 Rappture::Tooltip::for $itk_component(streamlines) \ 1426 "Show the streamlines" 1427 } 1428 } 1429 "-streamlinesmode" { 1430 set mode [$itk_component(streammode) value] 1431 set _settings($what) $mode 1432 switch -- $mode { 1433 "lines" { 1434 SendCmd "streamlines lines" 1435 } 1436 "ribbons" { 1437 SendCmd "streamlines ribbons 3 0" 1438 } 1439 "tubes" { 1440 SendCmd "streamlines tubes 5 3" 1441 } 1442 } 1443 } 1444 "-streamlinescolormap" { 1445 set colormap [$itk_component(colormap) value] 1446 set _settings($what) $colormap 1447 foreach dataset [CurrentDatasets -visible $_first] { 1448 foreach {dataobj comp} [split $dataset -] break 1449 ChangeColormap $dataobj $comp $colormap 1450 } 1451 set _legendPending 1 1452 } 1453 "-streamlinesopacity" { 1454 set val $_settings($what) 1455 set sval [expr { 0.01 * double($val) }] 1456 SendCmd "streamlines opacity $sval" 1457 } 1458 "-streamlinesscale" { 1459 set val $_settings($what) 1460 set sval [expr { 0.01 * double($val) }] 1461 SendCmd "streamlines scale $sval $sval $sval" 1462 } 1463 "-streamlineslighting" { 1464 set bool $_settings($what) 1465 SendCmd "streamlines lighting $bool" 1466 } 1467 "-volumeopacity" { 1326 1468 set val $_settings($what) 1327 1469 set sval [expr { 0.01 * double($val) }] 1328 1470 SendCmd "polydata opacity $sval" 1329 1471 } 1330 " volumeWireframe" {1472 "-volumewireframe" { 1331 1473 set bool $_settings($what) 1332 1474 SendCmd "polydata wireframe $bool" 1333 1475 } 1334 " volumeVisible" {1476 "-volumevisible" { 1335 1477 set bool $_settings($what) 1336 1478 SendCmd "polydata visible $bool" … … 1343 1485 } 1344 1486 } 1345 " volumeLighting" {1487 "-volumelighting" { 1346 1488 set bool $_settings($what) 1347 1489 SendCmd "polydata lighting $bool" 1348 1490 } 1349 " volumeEdges" {1491 "-volumeedges" { 1350 1492 set bool $_settings($what) 1351 1493 SendCmd "polydata edges $bool" 1352 1494 } 1353 "axesVisible" { 1354 set bool $_settings($what) 1355 SendCmd "axis visible all $bool" 1356 } 1357 "axisLabelsVisible" { 1358 set bool $_settings($what) 1359 SendCmd "axis labels all $bool" 1360 } 1361 "axisMinorTicks" { 1362 set bool $_settings($what) 1363 SendCmd "axis minticks all $bool" 1364 } 1365 "axisXGrid" - "axisYGrid" - "axisZGrid" { 1366 set axis [string tolower [string range $what 4 4]] 1495 "-xgrid" - "-ygrid" - "-zgrid" { 1496 set axis [string range $what 1 1] 1367 1497 set bool $_settings($what) 1368 1498 SendCmd "axis grid $axis $bool" 1369 }1370 "axis-mode" {1371 set mode [$itk_component(axismode) value]1372 set mode [$itk_component(axismode) translate $mode]1373 set _settings($what) $mode1374 SendCmd "axis flymode $mode"1375 }1376 "cutplaneEdges" {1377 set bool $_settings($what)1378 SendCmd "cutplane edges $bool"1379 }1380 "cutplaneVisible" {1381 set bool $_settings($what)1382 SendCmd "cutplane visible $bool"1383 }1384 "cutplaneWireframe" {1385 set bool $_settings($what)1386 SendCmd "cutplane wireframe $bool"1387 }1388 "cutplaneLighting" {1389 set bool $_settings($what)1390 SendCmd "cutplane lighting $bool"1391 }1392 "cutplaneOpacity" {1393 set val $_settings($what)1394 set sval [expr { 0.01 * double($val) }]1395 SendCmd "cutplane opacity $sval"1396 }1397 "cutplaneXVisible" - "cutplaneYVisible" - "cutplaneZVisible" {1398 set axis [string tolower [string range $what 8 8]]1399 set bool $_settings($what)1400 if { $bool } {1401 $itk_component(${axis}CutScale) configure -state normal \1402 -troughcolor white1403 } else {1404 $itk_component(${axis}CutScale) configure -state disabled \1405 -troughcolor grey821406 }1407 SendCmd "cutplane axis $axis $bool"1408 }1409 "cutplaneXPosition" - "cutplaneYPosition" - "cutplaneZPosition" {1410 set axis [string tolower [string range $what 8 8]]1411 set pos [expr $_settings($what) * 0.01]1412 SendCmd "cutplane slice ${axis} ${pos}"1413 set _cutplanePending 01414 }1415 "streamlinesSeedsVisible" {1416 set bool $_settings($what)1417 SendCmd "streamlines seed visible $bool"1418 }1419 "streamlinesNumSeeds" {1420 set density $_settings($what)1421 EventuallyReseed $density1422 }1423 "streamlinesVisible" {1424 set bool $_settings($what)1425 SendCmd "streamlines visible $bool"1426 if { $bool } {1427 Rappture::Tooltip::for $itk_component(streamlines) \1428 "Hide the streamlines"1429 } else {1430 Rappture::Tooltip::for $itk_component(streamlines) \1431 "Show the streamlines"1432 }1433 }1434 "streamlinesMode" {1435 set mode [$itk_component(streammode) value]1436 set _settings(streamlinesMode) $mode1437 switch -- $mode {1438 "lines" {1439 SendCmd "streamlines lines"1440 }1441 "ribbons" {1442 SendCmd "streamlines ribbons 3 0"1443 }1444 "tubes" {1445 SendCmd "streamlines tubes 5 3"1446 }1447 }1448 }1449 "streamlinesColormap" {1450 set colormap [$itk_component(colormap) value]1451 set _settings(streamlinesColormap) $colormap1452 foreach dataset [CurrentDatasets -visible $_first] {1453 foreach {dataobj comp} [split $dataset -] break1454 ChangeColormap $dataobj $comp $colormap1455 }1456 set _legendPending 11457 }1458 "streamlinesOpacity" {1459 set val $_settings($what)1460 set sval [expr { 0.01 * double($val) }]1461 SendCmd "streamlines opacity $sval"1462 }1463 "streamlinesScale" {1464 set val $_settings($what)1465 set sval [expr { 0.01 * double($val) }]1466 SendCmd "streamlines scale $sval $sval $sval"1467 }1468 "streamlinesLighting" {1469 set bool $_settings($what)1470 SendCmd "streamlines lighting $bool"1471 }1472 "field" {1473 set label [$itk_component(field) value]1474 set fname [$itk_component(field) translate $label]1475 set _settings(field) $fname1476 if { [info exists _fields($fname)] } {1477 foreach { label units components } $_fields($fname) break1478 if { $components > 1 } {1479 set _colorMode vmag1480 } else {1481 set _colorMode scalar1482 }1483 set _curFldName $fname1484 set _curFldLabel $label1485 } else {1486 puts stderr "unknown field \"$fname\""1487 return1488 }1489 # Get the new limits because the field changed.1490 if { ![info exists _limits($_curFldName)] } {1491 SendCmd "dataset maprange all"1492 } else {1493 SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName"1494 }1495 SendCmd "streamlines colormode $_colorMode $_curFldName"1496 SendCmd "cutplane colormode $_colorMode $_curFldName"1497 DrawLegend1498 1499 } 1499 1500 default { … … 1580 1581 } 1581 1582 1582 1583 1583 # 1584 1584 # BuildColormap -- … … 1590 1590 set cmap "0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0" 1591 1591 } 1592 if { ![info exists _settings( volumeOpacity)] } {1593 set _settings( volumeOpacity) $style(-opacity)1594 } 1595 set max $_settings( volumeOpacity)1592 if { ![info exists _settings(-volumeopacity)] } { 1593 set _settings(-volumeopacity) $style(-opacity) 1594 } 1595 set max $_settings(-volumeopacity) 1596 1596 1597 1597 set wmap "0.0 1.0 1.0 1.0" … … 1633 1633 checkbutton $inner.volume \ 1634 1634 -text "Show Volume" \ 1635 -variable [itcl::scope _settings( volumeVisible)] \1636 -command [itcl::code $this AdjustSetting volumeVisible] \1635 -variable [itcl::scope _settings(-volumevisible)] \ 1636 -command [itcl::code $this AdjustSetting -volumevisible] \ 1637 1637 -font "Arial 9" 1638 1638 1639 1639 checkbutton $inner.wireframe \ 1640 1640 -text "Show Wireframe" \ 1641 -variable [itcl::scope _settings( volumeWireframe)] \1642 -command [itcl::code $this AdjustSetting volumeWireframe] \1641 -variable [itcl::scope _settings(-volumewireframe)] \ 1642 -command [itcl::code $this AdjustSetting -volumewireframe] \ 1643 1643 -font "Arial 9" 1644 1644 1645 1645 checkbutton $inner.lighting \ 1646 1646 -text "Enable Lighting" \ 1647 -variable [itcl::scope _settings( volumeLighting)] \1648 -command [itcl::code $this AdjustSetting volumeLighting] \1647 -variable [itcl::scope _settings(-volumelighting)] \ 1648 -command [itcl::code $this AdjustSetting -volumelighting] \ 1649 1649 -font "Arial 9" 1650 1650 1651 1651 checkbutton $inner.edges \ 1652 1652 -text "Show Edges" \ 1653 -variable [itcl::scope _settings( volumeEdges)] \1654 -command [itcl::code $this AdjustSetting volumeEdges] \1653 -variable [itcl::scope _settings(-volumeedges)] \ 1654 -command [itcl::code $this AdjustSetting -volumeedges] \ 1655 1655 -font "Arial 9" 1656 1656 1657 1657 label $inner.opacity_l -text "Opacity" -font "Arial 9" 1658 1658 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1659 -variable [itcl::scope _settings( volumeOpacity)] \1659 -variable [itcl::scope _settings(-volumeopacity)] \ 1660 1660 -width 10 \ 1661 1661 -showvalue off \ 1662 -command [itcl::code $this AdjustSetting volumeOpacity]1662 -command [itcl::code $this AdjustSetting -volumeopacity] 1663 1663 1664 1664 blt::table $inner \ … … 1673 1673 } 1674 1674 1675 1676 1675 itcl::body Rappture::VtkStreamlinesViewer::BuildStreamsTab {} { 1677 1676 … … 1686 1685 checkbutton $inner.streamlines \ 1687 1686 -text "Show Streamlines" \ 1688 -variable [itcl::scope _settings( streamlinesVisible)] \1689 -command [itcl::code $this AdjustSetting streamlinesVisible] \1687 -variable [itcl::scope _settings(-streamlinesvisible)] \ 1688 -command [itcl::code $this AdjustSetting -streamlinesvisible] \ 1690 1689 -font "Arial 9" 1691 1690 1692 1691 checkbutton $inner.lighting \ 1693 1692 -text "Enable Lighting" \ 1694 -variable [itcl::scope _settings( streamlinesLighting)] \1695 -command [itcl::code $this AdjustSetting streamlinesLighting] \1693 -variable [itcl::scope _settings(-streamlineslighting)] \ 1694 -command [itcl::code $this AdjustSetting -streamlineslighting] \ 1696 1695 -font "Arial 9" 1697 1696 1698 1697 checkbutton $inner.seeds \ 1699 1698 -text "Show Seeds" \ 1700 -variable [itcl::scope _settings( streamlinesSeedsVisible)] \1701 -command [itcl::code $this AdjustSetting streamlinesSeedsVisible] \1699 -variable [itcl::scope _settings(-streamlinesseedsvisible)] \ 1700 -command [itcl::code $this AdjustSetting -streamlinesseedsvisible] \ 1702 1701 -font "Arial 9" 1703 1702 … … 1710 1709 "ribbons" "ribbons" \ 1711 1710 "tubes" "tubes" 1712 $itk_component(streammode) value $_settings( streamlinesMode)1713 bind $inner.mode <<Value>> [itcl::code $this AdjustSetting streamlinesMode]1711 $itk_component(streammode) value $_settings(-streamlinesmode) 1712 bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -streamlinesmode] 1714 1713 1715 1714 label $inner.opacity_l -text "Opacity" -font "Arial 9" 1716 1715 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1717 -variable [itcl::scope _settings( streamlinesOpacity)] \1716 -variable [itcl::scope _settings(-streamlinesopacity)] \ 1718 1717 -width 10 \ 1719 1718 -showvalue off \ 1720 -command [itcl::code $this AdjustSetting streamlinesOpacity]1719 -command [itcl::code $this AdjustSetting -streamlinesopacity] 1721 1720 1722 1721 label $inner.density_l -text "No. Seeds" -font "Arial 9" 1723 1722 ::scale $inner.density -from 1 -to 1000 -orient horizontal \ 1724 -variable [itcl::scope _settings( streamlinesNumSeeds)] \1723 -variable [itcl::scope _settings(-streamlinesnumseeds)] \ 1725 1724 -width 10 \ 1726 1725 -showvalue on \ 1727 -command [itcl::code $this AdjustSetting streamlinesNumSeeds]1726 -command [itcl::code $this AdjustSetting -streamlinesnumseeds] 1728 1727 1729 1728 label $inner.scale_l -text "Scale" -font "Arial 9" 1730 1729 ::scale $inner.scale -from 1 -to 100 -orient horizontal \ 1731 -variable [itcl::scope _settings( streamlinesScale)] \1730 -variable [itcl::scope _settings(-streamlinesscale)] \ 1732 1731 -width 10 \ 1733 1732 -showvalue off \ 1734 -command [itcl::code $this AdjustSetting streamlinesScale]1733 -command [itcl::code $this AdjustSetting -streamlinesscale] 1735 1734 1736 1735 label $inner.field_l -text "Color by" -font "Arial 9" … … 1739 1738 } 1740 1739 bind $inner.field <<Value>> \ 1741 [itcl::code $this AdjustSetting field]1740 [itcl::code $this AdjustSetting -field] 1742 1741 1743 1742 label $inner.colormap_l -text "Colormap" -font "Arial 9" … … 1749 1748 $itk_component(colormap) value "BCGYR" 1750 1749 bind $inner.colormap <<Value>> \ 1751 [itcl::code $this AdjustSetting streamlinesColormap]1750 [itcl::code $this AdjustSetting -streamlinescolormap] 1752 1751 1753 1752 blt::table $inner \ … … 1781 1780 checkbutton $inner.visible \ 1782 1781 -text "Axes" \ 1783 -variable [itcl::scope _settings( axesVisible)] \1784 -command [itcl::code $this AdjustSetting axesVisible] \1782 -variable [itcl::scope _settings(-axesvisible)] \ 1783 -command [itcl::code $this AdjustSetting -axesvisible] \ 1785 1784 -font "Arial 9" 1786 1785 1787 1786 checkbutton $inner.labels \ 1788 1787 -text "Axis Labels" \ 1789 -variable [itcl::scope _settings( axisLabelsVisible)] \1790 -command [itcl::code $this AdjustSetting axisLabelsVisible] \1788 -variable [itcl::scope _settings(-axislabelsvisible)] \ 1789 -command [itcl::code $this AdjustSetting -axislabelsvisible] \ 1791 1790 -font "Arial 9" 1792 1791 label $inner.grid_l -text "Grid" -font "Arial 9" 1793 1792 checkbutton $inner.xgrid \ 1794 1793 -text "X" \ 1795 -variable [itcl::scope _settings( axisXGrid)] \1796 -command [itcl::code $this AdjustSetting axisXGrid] \1794 -variable [itcl::scope _settings(-xgrid)] \ 1795 -command [itcl::code $this AdjustSetting -xgrid] \ 1797 1796 -font "Arial 9" 1798 1797 checkbutton $inner.ygrid \ 1799 1798 -text "Y" \ 1800 -variable [itcl::scope _settings( axisYGrid)] \1801 -command [itcl::code $this AdjustSetting axisYGrid] \1799 -variable [itcl::scope _settings(-ygrid)] \ 1800 -command [itcl::code $this AdjustSetting -ygrid] \ 1802 1801 -font "Arial 9" 1803 1802 checkbutton $inner.zgrid \ 1804 1803 -text "Z" \ 1805 -variable [itcl::scope _settings( axisZGrid)] \1806 -command [itcl::code $this AdjustSetting axisZGrid] \1804 -variable [itcl::scope _settings(-zgrid)] \ 1805 -command [itcl::code $this AdjustSetting -zgrid] \ 1807 1806 -font "Arial 9" 1808 1807 checkbutton $inner.minorticks \ 1809 1808 -text "Minor Ticks" \ 1810 -variable [itcl::scope _settings( axisMinorTicks)] \1811 -command [itcl::code $this AdjustSetting axisMinorTicks] \1809 -variable [itcl::scope _settings(-axisminorticks)] \ 1810 -command [itcl::code $this AdjustSetting -axisminorticks] \ 1812 1811 -font "Arial 9" 1813 1812 … … 1822 1821 "furthest_triad" "farthest" \ 1823 1822 "outer_edges" "outer" 1824 $itk_component(axismode) value "static"1825 bind $inner.mode <<Value>> [itcl::code $this AdjustSetting axis-mode]1823 $itk_component(axismode) value $_settings(-axismode) 1824 bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -axismode] 1826 1825 1827 1826 blt::table $inner \ … … 1859 1858 0,0 $inner.view_l -anchor e -pady 2 \ 1860 1859 0,1 $inner.view -anchor w -pady 2 1860 blt::table configure $inner r0 -resize none 1861 1861 1862 1862 set labels { qx qy qz qw xpan ypan zoom } … … 1886 1886 incr row 1887 1887 1888 blt::table configure $inner c* r*-resize none1888 blt::table configure $inner c* -resize none 1889 1889 blt::table configure $inner c2 -resize expand 1890 1890 blt::table configure $inner r$row -resize expand … … 1903 1903 checkbutton $inner.visible \ 1904 1904 -text "Show Cutplanes" \ 1905 -variable [itcl::scope _settings( cutplaneVisible)] \1906 -command [itcl::code $this AdjustSetting cutplaneVisible] \1905 -variable [itcl::scope _settings(-cutplanevisible)] \ 1906 -command [itcl::code $this AdjustSetting -cutplanevisible] \ 1907 1907 -font "Arial 9" 1908 1908 1909 1909 checkbutton $inner.wireframe \ 1910 1910 -text "Show Wireframe" \ 1911 -variable [itcl::scope _settings( cutplaneWireframe)] \1912 -command [itcl::code $this AdjustSetting cutplaneWireframe] \1911 -variable [itcl::scope _settings(-cutplanewireframe)] \ 1912 -command [itcl::code $this AdjustSetting -cutplanewireframe] \ 1913 1913 -font "Arial 9" 1914 1914 1915 1915 checkbutton $inner.lighting \ 1916 1916 -text "Enable Lighting" \ 1917 -variable [itcl::scope _settings( cutplaneLighting)] \1918 -command [itcl::code $this AdjustSetting cutplaneLighting] \1917 -variable [itcl::scope _settings(-cutplanelighting)] \ 1918 -command [itcl::code $this AdjustSetting -cutplanelighting] \ 1919 1919 -font "Arial 9" 1920 1920 1921 1921 checkbutton $inner.edges \ 1922 1922 -text "Show Edges" \ 1923 -variable [itcl::scope _settings( cutplaneEdges)] \1924 -command [itcl::code $this AdjustSetting cutplaneEdges] \1923 -variable [itcl::scope _settings(-cutplaneedges)] \ 1924 -command [itcl::code $this AdjustSetting -cutplaneedges] \ 1925 1925 -font "Arial 9" 1926 1926 1927 1927 label $inner.opacity_l -text "Opacity" -font "Arial 9" 1928 1928 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1929 -variable [itcl::scope _settings( cutplaneOpacity)] \1929 -variable [itcl::scope _settings(-cutplaneopacity)] \ 1930 1930 -width 10 \ 1931 1931 -showvalue off \ 1932 -command [itcl::code $this AdjustSetting cutplaneOpacity]1933 $inner.opacity set $_settings( cutplaneOpacity)1932 -command [itcl::code $this AdjustSetting -cutplaneopacity] 1933 $inner.opacity set $_settings(-cutplaneopacity) 1934 1934 1935 1935 # X-value slicer... … … 1938 1938 -onimage [Rappture::icon x-cutplane-red] \ 1939 1939 -offimage [Rappture::icon x-cutplane-red] \ 1940 -command [itcl::code $this AdjustSetting cutplaneXVisible] \1941 -variable [itcl::scope _settings( cutplaneXVisible)]1940 -command [itcl::code $this AdjustSetting -cutplanexvisible] \ 1941 -variable [itcl::scope _settings(-cutplanexvisible)] 1942 1942 } 1943 1943 Rappture::Tooltip::for $itk_component(xCutButton) \ … … 1950 1950 -borderwidth 1 -highlightthickness 0 \ 1951 1951 -command [itcl::code $this EventuallySetCutplane x] \ 1952 -variable [itcl::scope _settings( cutplaneXPosition)] \1952 -variable [itcl::scope _settings(-cutplanexposition)] \ 1953 1953 -foreground red3 -font "Arial 9 bold" 1954 1954 } { … … 1967 1967 -onimage [Rappture::icon y-cutplane-green] \ 1968 1968 -offimage [Rappture::icon y-cutplane-green] \ 1969 -command [itcl::code $this AdjustSetting cutplaneYVisible] \1970 -variable [itcl::scope _settings( cutplaneYVisible)]1969 -command [itcl::code $this AdjustSetting -cutplaneyvisible] \ 1970 -variable [itcl::scope _settings(-cutplaneyvisible)] 1971 1971 } 1972 1972 Rappture::Tooltip::for $itk_component(yCutButton) \ … … 1979 1979 -borderwidth 1 -highlightthickness 0 \ 1980 1980 -command [itcl::code $this EventuallySetCutplane y] \ 1981 -variable [itcl::scope _settings( cutplaneYPosition)] \1981 -variable [itcl::scope _settings(-cutplaneyposition)] \ 1982 1982 -foreground green3 -font "Arial 9 bold" 1983 1983 } { … … 1996 1996 -onimage [Rappture::icon z-cutplane-blue] \ 1997 1997 -offimage [Rappture::icon z-cutplane-blue] \ 1998 -command [itcl::code $this AdjustSetting cutplaneZVisible] \1999 -variable [itcl::scope _settings( cutplaneZVisible)]1998 -command [itcl::code $this AdjustSetting -cutplanezvisible] \ 1999 -variable [itcl::scope _settings(-cutplanezvisible)] 2000 2000 } 2001 2001 Rappture::Tooltip::for $itk_component(zCutButton) \ … … 2008 2008 -borderwidth 1 -highlightthickness 0 \ 2009 2009 -command [itcl::code $this EventuallySetCutplane z] \ 2010 -variable [itcl::scope _settings( cutplaneZPosition)] \2010 -variable [itcl::scope _settings(-cutplanezposition)] \ 2011 2011 -foreground blue3 -font "Arial 9 bold" 2012 2012 } { … … 2171 2171 SendCmd "polydata add $tag" 2172 2172 SendCmd "polydata colormode constant {} $tag" 2173 set _settings( volumeEdges) $settings(-edges)2174 set _settings( volumeLighting) $settings(-lighting)2175 set _settings( volumeOpacity) $settings(-opacity)2176 set _settings( volumeWireframe) $settings(-wireframe)2177 set _settings( volumeOpacity) [expr $settings(-opacity) * 100.0]2173 set _settings(-volumeedges) $settings(-edges) 2174 set _settings(-volumelighting) $settings(-lighting) 2175 set _settings(-volumeopacity) $settings(-opacity) 2176 set _settings(-volumewireframe) $settings(-wireframe) 2177 set _settings(-volumeopacity) [expr $settings(-opacity) * 100.0] 2178 2178 StopBufferingCommands 2179 2179 SetColormap $dataobj $comp … … 2233 2233 set title $fname 2234 2234 } 2235 if { $_settings( legendVisible) } {2235 if { $_settings(-legendvisible) } { 2236 2236 set x [expr $w - 2] 2237 2237 if { [$c find withtag "legend"] == "" } { … … 2411 2411 invoke { 2412 2412 $itk_component(field) value $_curFldLabel 2413 AdjustSetting field2413 AdjustSetting -field 2414 2414 } 2415 2415 default { -
trunk/gui/scripts/vtkviewer.tcl
r4767 r4771 2226 2226 0,0 $inner.view_l -anchor e -pady 2 \ 2227 2227 0,1 $inner.view -anchor w -pady 2 2228 blt::table configure $inner r0 -resize none 2228 2229 2229 2230 set labels { qx qy qz qw xpan ypan zoom } … … 2253 2254 incr row 2254 2255 2255 blt::table configure $inner c* r*-resize none2256 blt::table configure $inner c* -resize none 2256 2257 blt::table configure $inner c2 -resize expand 2257 2258 blt::table configure $inner r$row -resize expand
Note: See TracChangeset
for help on using the changeset viewer.