Changeset 4771 for trunk


Ignore:
Timestamp:
Nov 23, 2014 5:08:52 AM (9 years ago)
Author:
ldelgass
Message:

settings update for streamlines

Location:
trunk/gui/scripts
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/flowvisviewer.tcl

    r4767 r4771  
    23772377        0,0 $inner.view_l -anchor e -pady 2 \
    23782378        0,1 $inner.view -anchor w -pady 2
     2379    blt::table configure $inner r0 -resize none
    23792380
    23802381    set row 1
     
    23952396    }
    23962397
    2397     blt::table configure $inner c* r* -resize none
     2398    blt::table configure $inner c* -resize none
    23982399    blt::table configure $inner c2 -resize expand
    23992400    blt::table configure $inner r$row -resize expand
  • trunk/gui/scripts/nanovisviewer.tcl

    r4767 r4771  
    19511951        0,0 $inner.view_l -anchor e -pady 2 \
    19521952        0,1 $inner.view -anchor w -pady 2
     1953    blt::table configure $inner r0 -resize none
    19531954
    19541955    set row 1
     
    19691970    }
    19701971
    1971     blt::table configure $inner c* r* -resize none
     1972    blt::table configure $inner c* -resize none
    19721973    blt::table configure $inner c2 -resize expand
    19731974    blt::table configure $inner r$row -resize expand
  • trunk/gui/scripts/vtkmeshviewer.tcl

    r4767 r4771  
    14411441        0,0 $inner.view_l -anchor e -pady 2 \
    14421442        0,1 $inner.view -anchor w -pady 2
     1443    blt::table configure $inner r0 -resize none
    14431444
    14441445    set labels { qx qy qz qw xpan ypan zoom }
     
    14681469    incr row
    14691470
    1470     blt::table configure $inner c* r* -resize none
     1471    blt::table configure $inner c* -resize none
    14711472    blt::table configure $inner c2 -resize expand
    14721473    blt::table configure $inner r$row -resize expand
  • trunk/gui/scripts/vtkstreamlinesviewer.tcl

    r4767 r4771  
    194194    $_dispatcher register !xcutplane
    195195    $_dispatcher dispatch $this !xcutplane \
    196         "[itcl::code $this AdjustSetting cutplaneXPosition]; list"
     196        "[itcl::code $this AdjustSetting -cutplanexposition]; list"
    197197
    198198    # Y-Cutplane event
    199199    $_dispatcher register !ycutplane
    200200    $_dispatcher dispatch $this !ycutplane \
    201         "[itcl::code $this AdjustSetting cutplaneYPosition]; list"
     201        "[itcl::code $this AdjustSetting -cutplaneyposition]; list"
    202202
    203203    # Z-Cutplane event
    204204    $_dispatcher register !zcutplane
    205205    $_dispatcher dispatch $this !zcutplane \
    206         "[itcl::code $this AdjustSetting cutplaneZPosition]; list"
     206        "[itcl::code $this AdjustSetting -cutplanezposition]; list"
    207207
    208208    #
     
    228228
    229229    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
    260261    }]
    261262
     
    336337            -onimage [Rappture::icon volume-on] \
    337338            -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]
    340341    }
    341342    $itk_component(volume) select
     
    348349            -onimage [Rappture::icon streamlines-on] \
    349350            -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] \
    352353    }
    353354    $itk_component(streamlines) select
     
    360361            -onimage [Rappture::icon cutbutton] \
    361362            -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]
    364365    }
    365366    Rappture::Tooltip::for $itk_component(cutplane) \
     
    968969        $_arcball resize $w $h
    969970        DoResize
    970         InitSettings axisXGrid axisYGrid axisZGrid axis-mode \
    971             axesVisible axisLabelsVisible axisMinorTicks
     971        InitSettings -xgrid -ygrid -zgrid -axismode \
     972            -axesvisible -axislabelsvisible -axisminorticks
    972973        # This "imgflush" is to force an image returned before vtkvis starts
    973974        # reading a (big) dataset.  This will display an empty plot with axes
     
    10621063
    10631064    if { $_reset } {
    1064         InitSettings streamlinesSeedsVisible streamlinesOpacity \
    1065             streamlinesVisible streamlinesColormap \
    1066             streamlinesLighting \
    1067             streamlinesColormap field \
    1068             volumeVisible volumeEdges volumeLighting volumeOpacity \
    1069             volumeWireframe \
    1070             cutplaneVisible \
    1071             cutplaneXPosition cutplaneYPosition cutplaneZPosition \
    1072             cutplaneXVisible cutplaneYVisible cutplaneZVisible
     1065        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
    10731074
    10741075        # Reset the camera and other view parameters
     
    13031304itcl::body Rappture::VtkStreamlinesViewer::InitSettings { args } {
    13041305    foreach spec $args {
    1305         if { [info exists _settings($_first-$spec)] } {
     1306        if { [info exists _settings($_first${spec})] } {
    13061307            # Reset global setting with dataobj specific setting
    1307             set _settings($spec) $_settings($_first-$spec)
     1308            set _settings($spec) $_settings($_first${spec})
    13081309        }
    13091310        AdjustSetting $spec
     
    13231324    }
    13241325    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" {
    13261468            set val $_settings($what)
    13271469            set sval [expr { 0.01 * double($val) }]
    13281470            SendCmd "polydata opacity $sval"
    13291471        }
    1330         "volumeWireframe" {
     1472        "-volumewireframe" {
    13311473            set bool $_settings($what)
    13321474            SendCmd "polydata wireframe $bool"
    13331475        }
    1334         "volumeVisible" {
     1476        "-volumevisible" {
    13351477            set bool $_settings($what)
    13361478            SendCmd "polydata visible $bool"
     
    13431485            }
    13441486        }
    1345         "volumeLighting" {
     1487        "-volumelighting" {
    13461488            set bool $_settings($what)
    13471489            SendCmd "polydata lighting $bool"
    13481490        }
    1349         "volumeEdges" {
     1491        "-volumeedges" {
    13501492            set bool $_settings($what)
    13511493            SendCmd "polydata edges $bool"
    13521494        }
    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]
    13671497            set bool $_settings($what)
    13681498            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) $mode
    1374             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 white
    1403             } else {
    1404                 $itk_component(${axis}CutScale) configure -state disabled \
    1405                     -troughcolor grey82
    1406             }
    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 0
    1414         }
    1415         "streamlinesSeedsVisible" {
    1416             set bool $_settings($what)
    1417             SendCmd "streamlines seed visible $bool"
    1418         }
    1419         "streamlinesNumSeeds" {
    1420             set density $_settings($what)
    1421             EventuallyReseed $density
    1422         }
    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) $mode
    1437             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) $colormap
    1452             foreach dataset [CurrentDatasets -visible $_first] {
    1453                 foreach {dataobj comp} [split $dataset -] break
    1454                 ChangeColormap $dataobj $comp $colormap
    1455             }
    1456             set _legendPending 1
    1457         }
    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) $fname
    1476             if { [info exists _fields($fname)] } {
    1477                 foreach { label units components } $_fields($fname) break
    1478                 if { $components > 1 } {
    1479                     set _colorMode vmag
    1480                 } else {
    1481                     set _colorMode scalar
    1482                 }
    1483                 set _curFldName $fname
    1484                 set _curFldLabel $label
    1485             } else {
    1486                 puts stderr "unknown field \"$fname\""
    1487                 return
    1488             }
    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             DrawLegend
    14981499        }
    14991500        default {
     
    15801581}
    15811582
    1582 
    15831583#
    15841584# BuildColormap --
     
    15901590        set cmap "0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0"
    15911591    }
    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)
    15961596
    15971597    set wmap "0.0 1.0 1.0 1.0"
     
    16331633    checkbutton $inner.volume \
    16341634        -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] \
    16371637        -font "Arial 9"
    16381638
    16391639    checkbutton $inner.wireframe \
    16401640        -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] \
    16431643        -font "Arial 9"
    16441644
    16451645    checkbutton $inner.lighting \
    16461646        -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] \
    16491649        -font "Arial 9"
    16501650
    16511651    checkbutton $inner.edges \
    16521652        -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] \
    16551655        -font "Arial 9"
    16561656
    16571657    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    16581658    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1659         -variable [itcl::scope _settings(volumeOpacity)] \
     1659        -variable [itcl::scope _settings(-volumeopacity)] \
    16601660        -width 10 \
    16611661        -showvalue off \
    1662         -command [itcl::code $this AdjustSetting volumeOpacity]
     1662        -command [itcl::code $this AdjustSetting -volumeopacity]
    16631663
    16641664    blt::table $inner \
     
    16731673}
    16741674
    1675 
    16761675itcl::body Rappture::VtkStreamlinesViewer::BuildStreamsTab {} {
    16771676
     
    16861685    checkbutton $inner.streamlines \
    16871686        -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] \
    16901689        -font "Arial 9"
    16911690   
    16921691    checkbutton $inner.lighting \
    16931692        -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] \
    16961695        -font "Arial 9"
    16971696
    16981697    checkbutton $inner.seeds \
    16991698        -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] \
    17021701        -font "Arial 9"
    17031702
     
    17101709        "ribbons"   "ribbons" \
    17111710        "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]
    17141713
    17151714    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    17161715    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1717         -variable [itcl::scope _settings(streamlinesOpacity)] \
     1716        -variable [itcl::scope _settings(-streamlinesopacity)] \
    17181717        -width 10 \
    17191718        -showvalue off \
    1720         -command [itcl::code $this AdjustSetting streamlinesOpacity]
     1719        -command [itcl::code $this AdjustSetting -streamlinesopacity]
    17211720
    17221721    label $inner.density_l -text "No. Seeds" -font "Arial 9"
    17231722    ::scale $inner.density -from 1 -to 1000 -orient horizontal \
    1724         -variable [itcl::scope _settings(streamlinesNumSeeds)] \
     1723        -variable [itcl::scope _settings(-streamlinesnumseeds)] \
    17251724        -width 10 \
    17261725        -showvalue on \
    1727         -command [itcl::code $this AdjustSetting streamlinesNumSeeds]
     1726        -command [itcl::code $this AdjustSetting -streamlinesnumseeds]
    17281727
    17291728    label $inner.scale_l -text "Scale" -font "Arial 9"
    17301729    ::scale $inner.scale -from 1 -to 100 -orient horizontal \
    1731         -variable [itcl::scope _settings(streamlinesScale)] \
     1730        -variable [itcl::scope _settings(-streamlinesscale)] \
    17321731        -width 10 \
    17331732        -showvalue off \
    1734         -command [itcl::code $this AdjustSetting streamlinesScale]
     1733        -command [itcl::code $this AdjustSetting -streamlinesscale]
    17351734
    17361735    label $inner.field_l -text "Color by" -font "Arial 9"
     
    17391738    }
    17401739    bind $inner.field <<Value>> \
    1741         [itcl::code $this AdjustSetting field]
     1740        [itcl::code $this AdjustSetting -field]
    17421741
    17431742    label $inner.colormap_l -text "Colormap" -font "Arial 9"
     
    17491748    $itk_component(colormap) value "BCGYR"
    17501749    bind $inner.colormap <<Value>> \
    1751         [itcl::code $this AdjustSetting streamlinesColormap]
     1750        [itcl::code $this AdjustSetting -streamlinescolormap]
    17521751
    17531752    blt::table $inner \
     
    17811780    checkbutton $inner.visible \
    17821781        -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] \
    17851784        -font "Arial 9"
    17861785
    17871786    checkbutton $inner.labels \
    17881787        -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] \
    17911790        -font "Arial 9"
    17921791    label $inner.grid_l -text "Grid" -font "Arial 9"
    17931792    checkbutton $inner.xgrid \
    17941793        -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] \
    17971796        -font "Arial 9"
    17981797    checkbutton $inner.ygrid \
    17991798        -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] \
    18021801        -font "Arial 9"
    18031802    checkbutton $inner.zgrid \
    18041803        -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] \
    18071806        -font "Arial 9"
    18081807    checkbutton $inner.minorticks \
    18091808        -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] \
    18121811        -font "Arial 9"
    18131812
     
    18221821        "furthest_triad"  "farthest" \
    18231822        "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]
    18261825
    18271826    blt::table $inner \
     
    18591858        0,0 $inner.view_l -anchor e -pady 2 \
    18601859        0,1 $inner.view -anchor w -pady 2
     1860    blt::table configure $inner r0 -resize none
    18611861
    18621862    set labels { qx qy qz qw xpan ypan zoom }
     
    18861886    incr row
    18871887
    1888     blt::table configure $inner c* r* -resize none
     1888    blt::table configure $inner c* -resize none
    18891889    blt::table configure $inner c2 -resize expand
    18901890    blt::table configure $inner r$row -resize expand
     
    19031903    checkbutton $inner.visible \
    19041904        -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] \
    19071907        -font "Arial 9"
    19081908
    19091909    checkbutton $inner.wireframe \
    19101910        -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] \
    19131913        -font "Arial 9"
    19141914
    19151915    checkbutton $inner.lighting \
    19161916        -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] \
    19191919        -font "Arial 9"
    19201920
    19211921    checkbutton $inner.edges \
    19221922        -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] \
    19251925        -font "Arial 9"
    19261926
    19271927    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    19281928    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1929         -variable [itcl::scope _settings(cutplaneOpacity)] \
     1929        -variable [itcl::scope _settings(-cutplaneopacity)] \
    19301930        -width 10 \
    19311931        -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)
    19341934
    19351935    # X-value slicer...
     
    19381938            -onimage [Rappture::icon x-cutplane-red] \
    19391939            -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)]
    19421942    }
    19431943    Rappture::Tooltip::for $itk_component(xCutButton) \
     
    19501950            -borderwidth 1 -highlightthickness 0 \
    19511951            -command [itcl::code $this EventuallySetCutplane x] \
    1952             -variable [itcl::scope _settings(cutplaneXPosition)] \
     1952            -variable [itcl::scope _settings(-cutplanexposition)] \
    19531953            -foreground red3 -font "Arial 9 bold"
    19541954    } {
     
    19671967            -onimage [Rappture::icon y-cutplane-green] \
    19681968            -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)]
    19711971    }
    19721972    Rappture::Tooltip::for $itk_component(yCutButton) \
     
    19791979            -borderwidth 1 -highlightthickness 0 \
    19801980            -command [itcl::code $this EventuallySetCutplane y] \
    1981             -variable [itcl::scope _settings(cutplaneYPosition)] \
     1981            -variable [itcl::scope _settings(-cutplaneyposition)] \
    19821982            -foreground green3 -font "Arial 9 bold"
    19831983    } {
     
    19961996            -onimage [Rappture::icon z-cutplane-blue] \
    19971997            -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)]
    20002000    }
    20012001    Rappture::Tooltip::for $itk_component(zCutButton) \
     
    20082008            -borderwidth 1 -highlightthickness 0 \
    20092009            -command [itcl::code $this EventuallySetCutplane z] \
    2010             -variable [itcl::scope _settings(cutplaneZPosition)] \
     2010            -variable [itcl::scope _settings(-cutplanezposition)] \
    20112011            -foreground blue3 -font "Arial 9 bold"
    20122012    } {
     
    21712171    SendCmd "polydata add $tag"
    21722172    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]
    21782178    StopBufferingCommands
    21792179    SetColormap $dataobj $comp
     
    22332233        set title $fname
    22342234    }
    2235     if { $_settings(legendVisible) } {
     2235    if { $_settings(-legendvisible) } {
    22362236        set x [expr $w - 2]
    22372237        if { [$c find withtag "legend"] == "" } {
     
    24112411        invoke {
    24122412            $itk_component(field) value $_curFldLabel
    2413             AdjustSetting field
     2413            AdjustSetting -field
    24142414        }
    24152415        default {
  • trunk/gui/scripts/vtkviewer.tcl

    r4767 r4771  
    22262226        0,0 $inner.view_l -anchor e -pady 2 \
    22272227        0,1 $inner.view -anchor w -pady 2
     2228    blt::table configure $inner r0 -resize none
    22282229
    22292230    set labels { qx qy qz qw xpan ypan zoom }
     
    22532254    incr row
    22542255
    2255     blt::table configure $inner c* r* -resize none
     2256    blt::table configure $inner c* -resize none
    22562257    blt::table configure $inner c2 -resize expand
    22572258    blt::table configure $inner r$row -resize expand
Note: See TracChangeset for help on using the changeset viewer.