Changeset 4983 for branches


Ignore:
Timestamp:
Feb 8, 2015 6:51:07 PM (6 years ago)
Author:
ldelgass
Message:

Restore updated streamlines viewer from trunk/1.4 branch to 1.3 branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3/gui/scripts/vtkstreamlinesviewer.tcl

    r4928 r4983  
    11# -*- mode: tcl; indent-tabs-mode: nil -*-
    22# ----------------------------------------------------------------------
    3 #  COMPONENT: vtkviewer - Vtk drawing object viewer
     3#  COMPONENT: vtkstreamlinesviewer - Vtk streamlines object viewer
    44#
    55#  It connects to the Vtk server running on a rendering farm,
     
    77# ======================================================================
    88#  AUTHOR:  Michael McLennan, Purdue University
    9 #  Copyright (c) 2004-2012  HUBzero Foundation, LLC
     9#  Copyright (c) 2004-2014  HUBzero Foundation, LLC
    1010#
    1111#  See the file "license.terms" for information on usage and
     
    6262    public method scale {args}
    6363
    64     protected method Connect {}
    65     protected method CurrentDatasets {args}
    66     protected method Disconnect {}
    67     protected method DoResize {}
    68     protected method DoReseed {}
    69     protected method DoRotate {}
    70     protected method AdjustSetting {what {value ""}}
    71     protected method InitSettings { args  }
    72     protected method Pan {option x y}
    73     protected method Pick {x y}
    74     protected method Rebuild {}
    75     protected method ReceiveDataset { args }
    76     protected method ReceiveImage { args }
    77     protected method ReceiveLegend { colormap title vmin vmax size }
    78     protected method Rotate {option x y}
    79     protected method Zoom {option}
    80 
    8164    # The following methods are only used by this class.
     65    private method AdjustSetting {what {value ""}}
    8266    private method BuildAxisTab {}
    8367    private method BuildCameraTab {}
     
    8973    private method DrawLegend {}
    9074    private method Combo { option }
     75    private method Connect {}
     76    private method CurrentDatasets {args}
     77    private method Disconnect {}
     78    private method DoResize {}
     79    private method DoReseed {}
     80    private method DoRotate {}
    9181    private method EnterLegend { x y }
    9282    private method EventuallyResize { w h }
     
    9686    private method GetImage { args }
    9787    private method GetVtkData { args }
     88    private method InitSettings { args  }
    9889    private method IsValidObject { dataobj }
    9990    private method LeaveLegend {}
    10091    private method MotionLegend { x y }
     92    private method Pan {option x y}
    10193    private method PanCamera {}
     94    private method Pick {x y}
     95    private method QuaternionToView { q } {
     96        foreach { _view(-qw) _view(-qx) _view(-qy) _view(-qz) } $q break
     97    }
     98    private method Rebuild {}
     99    private method ReceiveDataset { args }
     100    private method ReceiveImage { args }
     101    private method ReceiveLegend { colormap title vmin vmax size }
    102102    private method RequestLegend {}
     103    private method Rotate {option x y}
    103104    private method SetColormap { dataobj comp }
    104105    private method ChangeColormap { dataobj comp color }
     
    107108    private method Slice {option args}
    108109    private method SetOrientation { side }
     110    private method ViewToQuaternion {} {
     111        return [list $_view(-qw) $_view(-qx) $_view(-qy) $_view(-qz)]
     112    }
     113    private method Zoom {option}
    109114
    110115    private variable _arcball ""
     
    189194    $_dispatcher register !xcutplane
    190195    $_dispatcher dispatch $this !xcutplane \
    191         "[itcl::code $this AdjustSetting cutplaneXPosition]; list"
     196        "[itcl::code $this AdjustSetting -cutplanexposition]; list"
    192197
    193198    # Y-Cutplane event
    194199    $_dispatcher register !ycutplane
    195200    $_dispatcher dispatch $this !ycutplane \
    196         "[itcl::code $this AdjustSetting cutplaneYPosition]; list"
     201        "[itcl::code $this AdjustSetting -cutplaneyposition]; list"
    197202
    198203    # Z-Cutplane event
    199204    $_dispatcher register !zcutplane
    200205    $_dispatcher dispatch $this !zcutplane \
    201         "[itcl::code $this AdjustSetting cutplaneZPosition]; list"
     206        "[itcl::code $this AdjustSetting -cutplanezposition]; list"
    202207
    203208    #
     
    210215    # Initialize the view to some default parameters.
    211216    array set _view {
    212         qw              0.853553
    213         qx              -0.353553
    214         qy              0.353553
    215         qz              0.146447
    216         zoom            1.0
    217         xpan            0
    218         ypan            0
    219         ortho           0
     217        -ortho           0
     218        -qw              0.853553
     219        -qx              -0.353553
     220        -qy              0.353553
     221        -qz              0.146447
     222        -xpan            0
     223        -ypan            0
     224        -zoom            1.0
    220225    }
    221226    set _arcball [blt::arcball create 100 100]
    222     set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
    223     $_arcball quaternion $q
     227    $_arcball quaternion [ViewToQuaternion]
    224228
    225229    array set _settings [subst {
    226         axesVisible             1
    227         axisLabelsVisible       1
    228         axisXGrid               0
    229         axisYGrid               0
    230         axisZGrid               0
    231         cutplaneEdges           0
    232         cutplaneLighting        1
    233         cutplaneOpacity         100
    234         cutplaneVisible         0
    235         cutplaneWireframe       0
    236         cutplaneXPosition       50
    237         cutplaneXVisible        1
    238         cutplaneYPosition       50
    239         cutplaneYVisible        1
    240         cutplaneZPosition       50
    241         cutplaneZVisible        1
    242         legendVisible           1
    243         streamlinesLighting     1
    244         streamlinesMode         lines
    245         streamlinesNumSeeds     200
    246         streamlinesOpacity      100
    247         streamlinesScale        1
    248         streamlinesSeedsVisible 0
    249         streamlinesVisible      1
    250         volumeEdges             0
    251         volumeLighting          1
    252         volumeOpacity           40
    253         volumeVisible           1
    254         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
    255261    }]
    256262
     
    331337            -onimage [Rappture::icon volume-on] \
    332338            -offimage [Rappture::icon volume-off] \
    333             -variable [itcl::scope _settings(volumeVisible)] \
    334             -command [itcl::code $this AdjustSetting volumeVisible]
     339            -variable [itcl::scope _settings(-volumevisible)] \
     340            -command [itcl::code $this AdjustSetting -volumevisible]
    335341    }
    336342    $itk_component(volume) select
     
    343349            -onimage [Rappture::icon streamlines-on] \
    344350            -offimage [Rappture::icon streamlines-off] \
    345             -variable [itcl::scope _settings(streamlinesVisible)] \
    346             -command [itcl::code $this AdjustSetting streamlinesVisible] \
     351            -variable [itcl::scope _settings(-streamlinesvisible)] \
     352            -command [itcl::code $this AdjustSetting -streamlinesvisible] \
    347353    }
    348354    $itk_component(streamlines) select
     
    355361            -onimage [Rappture::icon cutbutton] \
    356362            -offimage [Rappture::icon cutbutton] \
    357             -variable [itcl::scope _settings(cutplaneVisible)] \
    358             -command [itcl::code $this AdjustSetting cutplaneVisible]
     363            -variable [itcl::scope _settings(-cutplanevisible)] \
     364            -command [itcl::code $this AdjustSetting -cutplanevisible]
    359365    }
    360366    Rappture::Tooltip::for $itk_component(cutplane) \
     
    399405    bind $itk_component(view) <ButtonRelease-1> \
    400406        [itcl::code $this Rotate release %x %y]
    401     bind $itk_component(view) <Configure> \
    402         [itcl::code $this EventuallyResize %w %h]
    403 
    404     if 0 {
    405     bind $itk_component(view) <Configure> \
    406         [itcl::code $this EventuallyResize %w %h]
    407     }
     407
    408408    # Bindings for panning via mouse
    409409    bind $itk_component(view) <ButtonPress-2> \
     
    480480
    481481itcl::body Rappture::VtkStreamlinesViewer::DoRotate {} {
    482     set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
    483     SendCmd "camera orient $q"
     482    SendCmd "camera orient [ViewToQuaternion]"
    484483    set _rotatePending 0
    485484}
     
    515514
    516515itcl::body Rappture::VtkStreamlinesViewer::EventuallyRotate { q } {
    517     foreach { _view(qw) _view(qx) _view(qy) _view(qz) } $q break
     516    QuaternionToView $q
    518517    if { !$_rotatePending } {
    519518        set _rotatePending 1
     
    787786        if { $_reportClientInfo }  {
    788787            # Tell the server the viewer, hub, user and session.
    789             # Do this immediately on connect before buffing any commands
     788            # Do this immediately on connect before buffering any commands
    790789            global env
    791790
     
    877876    if { $info(-type) == "image" } {
    878877        if 0 {
    879             set f [open "last.ppm" "w"]
    880             puts $f $bytes
     878            set f [open "last.ppm" "w"]
     879            fconfigure $f -encoding binary
     880            puts -nonewline $f $bytes
    881881            close $f
    882882        }
     
    968968        $_arcball resize $w $h
    969969        DoResize
    970         InitSettings axisXGrid axisYGrid axisZGrid axis-mode \
    971             axesVisible axisLabelsVisible
     970        InitSettings -xgrid -ygrid -zgrid -axismode \
     971            -axesvisible -axislabelsvisible -axisminorticks
    972972        # This "imgflush" is to force an image returned before vtkvis starts
    973973        # reading a (big) dataset.  This will display an empty plot with axes
     
    991991                    set f [open /tmp/vtkstreamlines.vtk "w"]
    992992                    fconfigure $f -translation binary -encoding binary
    993                     puts $f $bytes
     993                    puts -nonewline $f $bytes
    994994                    close $f
    995995                }
     
    10251025            set label [$_first hints ${axis}label]
    10261026            if { $label != "" } {
    1027                 SendCmd "axis name $axis $label"
     1027                SendCmd [list axis name $axis $label]
    10281028            }
    10291029            set units [$_first hints ${axis}units]
    10301030            if { $units != "" } {
    1031                 SendCmd "axis units $axis $units"
     1031                SendCmd [list axis units $axis $units]
    10321032            }
    10331033        }
     
    10621062
    10631063    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
     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
    10731073
    10741074        # Reset the camera and other view parameters
    1075         set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
    1076         $_arcball quaternion $q
    1077         if {$_view(ortho)} {
     1075        $_arcball quaternion [ViewToQuaternion]
     1076        if {$_view(-ortho)} {
    10781077            SendCmd "camera mode ortho"
    10791078        } else {
     
    11491148    switch -- $option {
    11501149        "in" {
    1151             set _view(zoom) [expr {$_view(zoom)*1.25}]
    1152             SendCmd "camera zoom $_view(zoom)"
     1150            set _view(-zoom) [expr {$_view(-zoom)*1.25}]
     1151            SendCmd "camera zoom $_view(-zoom)"
    11531152        }
    11541153        "out" {
    1155             set _view(zoom) [expr {$_view(zoom)*0.8}]
    1156             SendCmd "camera zoom $_view(zoom)"
     1154            set _view(-zoom) [expr {$_view(-zoom)*0.8}]
     1155            SendCmd "camera zoom $_view(-zoom)"
    11571156        }
    11581157        "reset" {
    11591158            array set _view {
    1160                 qw      0.853553
    1161                 qx      -0.353553
    1162                 qy      0.353553
    1163                 qz      0.146447
    1164                 zoom    1.0
    1165                 xpan    0
    1166                 ypan    0
     1159                -qw      0.853553
     1160                -qx      -0.353553
     1161                -qy      0.353553
     1162                -qz      0.146447
     1163                -xpan    0
     1164                -ypan    0
     1165                -zoom    1.0
    11671166            }
    11681167            if { $_first != "" } {
     
    11721171                }
    11731172            }
    1174             set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
    1175             $_arcball quaternion $q
     1173            $_arcball quaternion [ViewToQuaternion]
    11761174            DoRotate
    11771175            SendCmd "camera reset"
     
    11811179
    11821180itcl::body Rappture::VtkStreamlinesViewer::PanCamera {} {
    1183     set x $_view(xpan)
    1184     set y $_view(ypan)
     1181    set x $_view(-xpan)
     1182    set y $_view(-ypan)
    11851183    SendCmd "camera pan $x $y"
    11861184}
    1187 
    11881185
    11891186# ----------------------------------------------------------------------
     
    12601257            set x [expr $x / double($w)]
    12611258            set y [expr $y / double($h)]
    1262             set _view(xpan) [expr $_view(xpan) + $x]
    1263             set _view(ypan) [expr $_view(ypan) + $y]
     1259            set _view(-xpan) [expr $_view(-xpan) + $x]
     1260            set _view(-ypan) [expr $_view(-ypan) + $y]
    12641261            PanCamera
    12651262            return
     
    12831280            set _click(x) $x
    12841281            set _click(y) $y
    1285             set _view(xpan) [expr $_view(xpan) - $dx]
    1286             set _view(ypan) [expr $_view(ypan) - $dy]
     1282            set _view(-xpan) [expr $_view(-xpan) - $dx]
     1283            set _view(-ypan) [expr $_view(-ypan) - $dy]
    12871284            PanCamera
    12881285        }
     
    13061303itcl::body Rappture::VtkStreamlinesViewer::InitSettings { args } {
    13071304    foreach spec $args {
    1308         if { [info exists _settings($_first-$spec)] } {
     1305        if { [info exists _settings($_first${spec})] } {
    13091306            # Reset global setting with dataobj specific setting
    1310             set _settings($spec) $_settings($_first-$spec)
     1307            set _settings($spec) $_settings($_first${spec})
    13111308        }
    13121309        AdjustSetting $spec
     
    13261323    }
    13271324    switch -- $what {
    1328         "volumeOpacity" {
    1329             set val $_settings(volumeOpacity)
    1330             set sval [expr { 0.01 * double($val) }]
    1331             SendCmd "polydata opacity $sval"
    1332         }
    1333         "volumeWireframe" {
    1334             set bool $_settings(volumeWireframe)
    1335             SendCmd "polydata wireframe $bool"
    1336         }
    1337         "volumeVisible" {
    1338             set bool $_settings(volumeVisible)
    1339             SendCmd "polydata visible $bool"
    1340             if { $bool } {
    1341                 Rappture::Tooltip::for $itk_component(volume) \
    1342                     "Hide the volume"
    1343             } else {
    1344                 Rappture::Tooltip::for $itk_component(volume) \
    1345                     "Show the volume"
    1346             }
    1347         }
    1348         "volumeLighting" {
    1349             set bool $_settings(volumeLighting)
    1350             SendCmd "polydata lighting $bool"
    1351         }
    1352         "volumeEdges" {
    1353             set bool $_settings(volumeEdges)
    1354             SendCmd "polydata edges $bool"
    1355         }
    1356         "axesVisible" {
    1357             set bool $_settings(axesVisible)
     1325        "-axesvisible" {
     1326            set bool $_settings($what)
    13581327            SendCmd "axis visible all $bool"
    13591328        }
    1360         "axisLabelsVisible" {
    1361             set bool $_settings(axisLabelsVisible)
     1329        "-axislabelsvisible" {
     1330            set bool $_settings($what)
    13621331            SendCmd "axis labels all $bool"
    13631332        }
    1364         "axisXGrid" - "axisYGrid" - "axisZGrid" {
    1365             set axis [string tolower [string range $what 4 4]]
     1333        "-axisminorticks" {
    13661334            set bool $_settings($what)
    1367             SendCmd "axis grid $axis $bool"
    1368         }
    1369         "axis-mode" {
     1335            SendCmd "axis minticks all $bool"
     1336        }
     1337        "-axismode" {
    13701338            set mode [$itk_component(axismode) value]
    13711339            set mode [$itk_component(axismode) translate $mode]
     
    13731341            SendCmd "axis flymode $mode"
    13741342        }
    1375         "cutplaneEdges" {
     1343        "-cutplaneedges" {
    13761344            set bool $_settings($what)
    13771345            SendCmd "cutplane edges $bool"
    13781346        }
    1379         "cutplaneVisible" {
     1347        "-cutplanevisible" {
    13801348            set bool $_settings($what)
    13811349            SendCmd "cutplane visible $bool"
    13821350        }
    1383         "cutplaneWireframe" {
     1351        "-cutplanewireframe" {
    13841352            set bool $_settings($what)
    13851353            SendCmd "cutplane wireframe $bool"
    13861354        }
    1387         "cutplaneLighting" {
     1355        "-cutplanelighting" {
    13881356            set bool $_settings($what)
    13891357            SendCmd "cutplane lighting $bool"
    13901358        }
    1391         "cutplaneOpacity" {
     1359        "-cutplaneopacity" {
    13921360            set val $_settings($what)
    13931361            set sval [expr { 0.01 * double($val) }]
    13941362            SendCmd "cutplane opacity $sval"
    13951363        }
    1396         "cutplaneXVisible" - "cutplaneYVisible" - "cutplaneZVisible" {
    1397             set axis [string tolower [string range $what 8 8]]
     1364        "-cutplanexvisible" - "-cutplaneyvisible" - "-cutplanezvisible" {
     1365            set axis [string range $what 9 9]
    13981366            set bool $_settings($what)
    13991367            if { $bool } {
     
    14061374            SendCmd "cutplane axis $axis $bool"
    14071375        }
    1408         "cutplaneXPosition" - "cutplaneYPosition" - "cutplaneZPosition" {
    1409             set axis [string tolower [string range $what 8 8]]
     1376        "-cutplanexposition" - "-cutplaneyposition" - "-cutplanezposition" {
     1377            set axis [string range $what 9 9]
    14101378            set pos [expr $_settings($what) * 0.01]
    14111379            SendCmd "cutplane slice ${axis} ${pos}"
    14121380            set _cutplanePending 0
    14131381        }
    1414         "streamlinesSeedsVisible" {
     1382        "-field" {
     1383            set label [$itk_component(field) value]
     1384            set fname [$itk_component(field) translate $label]
     1385            set _settings($what) $fname
     1386            if { [info exists _fields($fname)] } {
     1387                foreach { label units components } $_fields($fname) break
     1388                if { $components > 1 } {
     1389                    set _colorMode vmag
     1390                } else {
     1391                    set _colorMode scalar
     1392                }
     1393                set _curFldName $fname
     1394                set _curFldLabel $label
     1395            } else {
     1396                puts stderr "unknown field \"$fname\""
     1397                return
     1398            }
     1399            # Get the new limits because the field changed.
     1400            if { ![info exists _limits($_curFldName)] } {
     1401                SendCmd "dataset maprange all"
     1402            } else {
     1403                SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName"
     1404            }
     1405            SendCmd "streamlines colormode $_colorMode $_curFldName"
     1406            SendCmd "cutplane colormode $_colorMode $_curFldName"
     1407            DrawLegend
     1408        }
     1409        "-streamlinesseedsvisible" {
    14151410            set bool $_settings($what)
    14161411            SendCmd "streamlines seed visible $bool"
    14171412        }
    1418         "streamlinesNumSeeds" {
     1413        "-streamlinesnumseeds" {
    14191414            set density $_settings($what)
    14201415            EventuallyReseed $density
    14211416        }
    1422         "streamlinesVisible" {
     1417        "-streamlinesvisible" {
    14231418            set bool $_settings($what)
    14241419            SendCmd "streamlines visible $bool"
     
    14311426            }
    14321427        }
    1433         "streamlinesMode" {
     1428        "-streamlinesmode" {
    14341429            set mode [$itk_component(streammode) value]
    1435             set _settings(streamlinesMode) $mode
     1430            set _settings($what) $mode
    14361431            switch -- $mode {
    14371432                "lines" {
     
    14461441            }
    14471442        }
    1448         "streamlinesColormap" {
     1443        "-streamlinescolormap" {
    14491444            set colormap [$itk_component(colormap) value]
    1450             set _settings(streamlinesColormap) $colormap
     1445            set _settings($what) $colormap
    14511446            foreach dataset [CurrentDatasets -visible $_first] {
    14521447                foreach {dataobj comp} [split $dataset -] break
     
    14551450            set _legendPending 1
    14561451        }
    1457         "streamlinesOpacity" {
    1458             set val $_settings(streamlinesOpacity)
     1452        "-streamlinesopacity" {
     1453            set val $_settings($what)
    14591454            set sval [expr { 0.01 * double($val) }]
    14601455            SendCmd "streamlines opacity $sval"
    14611456        }
    1462         "streamlinesScale" {
    1463             set val $_settings(streamlinesScale)
     1457        "-streamlinesscale" {
     1458            set val $_settings($what)
    14641459            set sval [expr { 0.01 * double($val) }]
    14651460            SendCmd "streamlines scale $sval $sval $sval"
    14661461        }
    1467         "streamlinesLighting" {
    1468             set bool $_settings(streamlinesLighting)
     1462        "-streamlineslighting" {
     1463            set bool $_settings($what)
    14691464            SendCmd "streamlines lighting $bool"
    14701465        }
    1471         "field" {
    1472             set label [$itk_component(field) value]
    1473             set fname [$itk_component(field) translate $label]
    1474             set _settings(field) $fname
    1475             if { [info exists _fields($fname)] } {
    1476                 foreach { label units components } $_fields($fname) break
    1477                 if { $components > 1 } {
    1478                     set _colorMode vmag
    1479                 } else {
    1480                     set _colorMode scalar
    1481                 }
    1482                 set _curFldName $fname
    1483                 set _curFldLabel $label
     1466        "-volumeopacity" {
     1467            set val $_settings($what)
     1468            set sval [expr { 0.01 * double($val) }]
     1469            SendCmd "polydata opacity $sval"
     1470        }
     1471        "-volumewireframe" {
     1472            set bool $_settings($what)
     1473            SendCmd "polydata wireframe $bool"
     1474        }
     1475        "-volumevisible" {
     1476            set bool $_settings($what)
     1477            SendCmd "polydata visible $bool"
     1478            if { $bool } {
     1479                Rappture::Tooltip::for $itk_component(volume) \
     1480                    "Hide the volume"
    14841481            } else {
    1485                 puts stderr "unknown field \"$fname\""
    1486                 return
    1487             }
    1488             # Get the new limits because the field changed.
    1489             SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName"
    1490             SendCmd "streamlines colormode $_colorMode $_curFldName"
    1491             SendCmd "cutplane colormode $_colorMode $_curFldName"
    1492             DrawLegend
     1482                Rappture::Tooltip::for $itk_component(volume) \
     1483                    "Show the volume"
     1484            }
     1485        }
     1486        "-volumelighting" {
     1487            set bool $_settings($what)
     1488            SendCmd "polydata lighting $bool"
     1489        }
     1490        "-volumeedges" {
     1491            set bool $_settings($what)
     1492            SendCmd "polydata edges $bool"
     1493        }
     1494        "-xgrid" - "-ygrid" - "-zgrid" {
     1495            set axis [string range $what 1 1]
     1496            set bool $_settings($what)
     1497            SendCmd "axis grid $axis $bool"
    14931498        }
    14941499        default {
     
    15081513    set font "Arial 8"
    15091514    set lineht [font metrics $font -linespace]
    1510     set c $itk_component(legend)
    15111515    set w 12
    15121516    set h [expr {$_height - 3 * ($lineht + 2)}]
    1513     if { $h < 1} {
     1517    if { $h < 1 } {
    15141518        return
    15151519    }
     
    15761580}
    15771581
    1578 
    15791582#
    15801583# BuildColormap --
     
    15861589        set cmap "0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0"
    15871590    }
    1588     if { ![info exists _settings(volumeOpacity)] } {
    1589         set _settings(volumeOpacity) $style(-opacity)
    1590     }
    1591     set max $_settings(volumeOpacity)
     1591    if { ![info exists _settings(-volumeopacity)] } {
     1592        set _settings(-volumeopacity) $style(-opacity)
     1593    }
     1594    set max $_settings(-volumeopacity)
    15921595
    15931596    set wmap "0.0 1.0 1.0 1.0"
     
    16001603itcl::configbody Rappture::VtkStreamlinesViewer::plotbackground {
    16011604    if { [isconnected] } {
    1602         foreach {r g b} [Color2RGB $itk_option(-plotbackground)] break
    1603         SendCmd "screen bgcolor $r $g $b"
     1605        set rgb [Color2RGB $itk_option(-plotbackground)]
     1606        SendCmd "screen bgcolor $rgb"
    16041607    }
    16051608}
     
    16101613itcl::configbody Rappture::VtkStreamlinesViewer::plotforeground {
    16111614    if { [isconnected] } {
    1612         foreach {r g b} [Color2RGB $itk_option(-plotforeground)] break
    1613         #fix this!
    1614         #SendCmd "color background $r $g $b"
     1615        set rgb [Color2RGB $itk_option(-plotforeground)]
     1616        SendCmd "axis color all $rgb"
     1617        SendCmd "outline color $rgb"
     1618        SendCmd "cutplane color $rgb"
    16151619    }
    16161620}
     
    16281632    checkbutton $inner.volume \
    16291633        -text "Show Volume" \
    1630         -variable [itcl::scope _settings(volumeVisible)] \
    1631         -command [itcl::code $this AdjustSetting volumeVisible] \
     1634        -variable [itcl::scope _settings(-volumevisible)] \
     1635        -command [itcl::code $this AdjustSetting -volumevisible] \
    16321636        -font "Arial 9"
    16331637
    16341638    checkbutton $inner.wireframe \
    16351639        -text "Show Wireframe" \
    1636         -variable [itcl::scope _settings(volumeWireframe)] \
    1637         -command [itcl::code $this AdjustSetting volumeWireframe] \
     1640        -variable [itcl::scope _settings(-volumewireframe)] \
     1641        -command [itcl::code $this AdjustSetting -volumewireframe] \
    16381642        -font "Arial 9"
    16391643
    16401644    checkbutton $inner.lighting \
    16411645        -text "Enable Lighting" \
    1642         -variable [itcl::scope _settings(volumeLighting)] \
    1643         -command [itcl::code $this AdjustSetting volumeLighting] \
     1646        -variable [itcl::scope _settings(-volumelighting)] \
     1647        -command [itcl::code $this AdjustSetting -volumelighting] \
    16441648        -font "Arial 9"
    16451649
    16461650    checkbutton $inner.edges \
    16471651        -text "Show Edges" \
    1648         -variable [itcl::scope _settings(volumeEdges)] \
    1649         -command [itcl::code $this AdjustSetting volumeEdges] \
     1652        -variable [itcl::scope _settings(-volumeedges)] \
     1653        -command [itcl::code $this AdjustSetting -volumeedges] \
    16501654        -font "Arial 9"
    16511655
    16521656    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    16531657    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1654         -variable [itcl::scope _settings(volumeOpacity)] \
     1658        -variable [itcl::scope _settings(-volumeopacity)] \
    16551659        -width 10 \
    16561660        -showvalue off \
    1657         -command [itcl::code $this AdjustSetting volumeOpacity]
     1661        -command [itcl::code $this AdjustSetting -volumeopacity]
    16581662
    16591663    blt::table $inner \
     
    16681672}
    16691673
    1670 
    16711674itcl::body Rappture::VtkStreamlinesViewer::BuildStreamsTab {} {
    16721675
     
    16811684    checkbutton $inner.streamlines \
    16821685        -text "Show Streamlines" \
    1683         -variable [itcl::scope _settings(streamlinesVisible)] \
    1684         -command [itcl::code $this AdjustSetting streamlinesVisible] \
     1686        -variable [itcl::scope _settings(-streamlinesvisible)] \
     1687        -command [itcl::code $this AdjustSetting -streamlinesvisible] \
    16851688        -font "Arial 9"
    16861689   
    16871690    checkbutton $inner.lighting \
    16881691        -text "Enable Lighting" \
    1689         -variable [itcl::scope _settings(streamlinesLighting)] \
    1690         -command [itcl::code $this AdjustSetting streamlinesLighting] \
     1692        -variable [itcl::scope _settings(-streamlineslighting)] \
     1693        -command [itcl::code $this AdjustSetting -streamlineslighting] \
    16911694        -font "Arial 9"
    16921695
    16931696    checkbutton $inner.seeds \
    16941697        -text "Show Seeds" \
    1695         -variable [itcl::scope _settings(streamlinesSeedsVisible)] \
    1696         -command [itcl::code $this AdjustSetting streamlinesSeedsVisible] \
     1698        -variable [itcl::scope _settings(-streamlinesseedsvisible)] \
     1699        -command [itcl::code $this AdjustSetting -streamlinesseedsvisible] \
    16971700        -font "Arial 9"
    16981701
     
    17051708        "ribbons"   "ribbons" \
    17061709        "tubes"     "tubes"
    1707     $itk_component(streammode) value $_settings(streamlinesMode)
    1708     bind $inner.mode <<Value>> [itcl::code $this AdjustSetting streamlinesMode]
     1710    $itk_component(streammode) value $_settings(-streamlinesmode)
     1711    bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -streamlinesmode]
    17091712
    17101713    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    17111714    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1712         -variable [itcl::scope _settings(streamlinesOpacity)] \
     1715        -variable [itcl::scope _settings(-streamlinesopacity)] \
    17131716        -width 10 \
    17141717        -showvalue off \
    1715         -command [itcl::code $this AdjustSetting streamlinesOpacity]
     1718        -command [itcl::code $this AdjustSetting -streamlinesopacity]
    17161719
    17171720    label $inner.density_l -text "No. Seeds" -font "Arial 9"
    17181721    ::scale $inner.density -from 1 -to 1000 -orient horizontal \
    1719         -variable [itcl::scope _settings(streamlinesNumSeeds)] \
     1722        -variable [itcl::scope _settings(-streamlinesnumseeds)] \
    17201723        -width 10 \
    17211724        -showvalue on \
    1722         -command [itcl::code $this AdjustSetting streamlinesNumSeeds]
     1725        -command [itcl::code $this AdjustSetting -streamlinesnumseeds]
    17231726
    17241727    label $inner.scale_l -text "Scale" -font "Arial 9"
    17251728    ::scale $inner.scale -from 1 -to 100 -orient horizontal \
    1726         -variable [itcl::scope _settings(streamlinesScale)] \
     1729        -variable [itcl::scope _settings(-streamlinesscale)] \
    17271730        -width 10 \
    17281731        -showvalue off \
    1729         -command [itcl::code $this AdjustSetting streamlinesScale]
     1732        -command [itcl::code $this AdjustSetting -streamlinesscale]
    17301733
    17311734    label $inner.field_l -text "Color by" -font "Arial 9"
     
    17341737    }
    17351738    bind $inner.field <<Value>> \
    1736         [itcl::code $this AdjustSetting field]
     1739        [itcl::code $this AdjustSetting -field]
    17371740
    17381741    label $inner.colormap_l -text "Colormap" -font "Arial 9"
     
    17401743        Rappture::Combobox $inner.colormap -width 10 -editable no
    17411744    }
    1742     $inner.colormap choices insert end \
    1743         "BCGYR"              "BCGYR"            \
    1744         "BGYOR"              "BGYOR"            \
    1745         "blue"               "blue"             \
    1746         "blue-to-brown"      "blue-to-brown"    \
    1747         "blue-to-orange"     "blue-to-orange"   \
    1748         "blue-to-grey"       "blue-to-grey"     \
    1749         "green-to-magenta"   "green-to-magenta" \
    1750         "greyscale"          "greyscale"        \
    1751         "nanohub"            "nanohub"          \
    1752         "rainbow"            "rainbow"          \
    1753         "spectral"           "spectral"         \
    1754         "ROYGB"              "ROYGB"            \
    1755         "RYGCB"              "RYGCB"            \
    1756         "brown-to-blue"      "brown-to-blue"    \
    1757         "grey-to-blue"       "grey-to-blue"     \
    1758         "orange-to-blue"     "orange-to-blue"   
     1745    $inner.colormap choices insert end [GetColormapList]
    17591746
    17601747    $itk_component(colormap) value "BCGYR"
    17611748    bind $inner.colormap <<Value>> \
    1762         [itcl::code $this AdjustSetting streamlinesColormap]
     1749        [itcl::code $this AdjustSetting -streamlinescolormap]
    17631750
    17641751    blt::table $inner \
     
    17871774    set inner [$itk_component(main) insert end \
    17881775        -title "Axis Settings" \
    1789         -icon [Rappture::icon axis1]]
     1776        -icon [Rappture::icon axis2]]
    17901777    $inner configure -borderwidth 4
    17911778
    17921779    checkbutton $inner.visible \
    1793         -text "Show Axes" \
    1794         -variable [itcl::scope _settings(axesVisible)] \
    1795         -command [itcl::code $this AdjustSetting axesVisible] \
     1780        -text "Axes" \
     1781        -variable [itcl::scope _settings(-axesvisible)] \
     1782        -command [itcl::code $this AdjustSetting -axesvisible] \
    17961783        -font "Arial 9"
    17971784
    17981785    checkbutton $inner.labels \
    1799         -text "Show Axis Labels" \
    1800         -variable [itcl::scope _settings(axisLabelsVisible)] \
    1801         -command [itcl::code $this AdjustSetting axisLabelsVisible] \
     1786        -text "Axis Labels" \
     1787        -variable [itcl::scope _settings(-axislabelsvisible)] \
     1788        -command [itcl::code $this AdjustSetting -axislabelsvisible] \
    18021789        -font "Arial 9"
    1803 
     1790    label $inner.grid_l -text "Grid" -font "Arial 9"
    18041791    checkbutton $inner.xgrid \
    1805         -text "Show X Grid" \
    1806         -variable [itcl::scope _settings(axisXGrid)] \
    1807         -command [itcl::code $this AdjustSetting axisXGrid] \
     1792        -text "X" \
     1793        -variable [itcl::scope _settings(-xgrid)] \
     1794        -command [itcl::code $this AdjustSetting -xgrid] \
    18081795        -font "Arial 9"
    18091796    checkbutton $inner.ygrid \
    1810         -text "Show Y Grid" \
    1811         -variable [itcl::scope _settings(axisYGrid)] \
    1812         -command [itcl::code $this AdjustSetting axisYGrid] \
     1797        -text "Y" \
     1798        -variable [itcl::scope _settings(-ygrid)] \
     1799        -command [itcl::code $this AdjustSetting -ygrid] \
    18131800        -font "Arial 9"
    18141801    checkbutton $inner.zgrid \
    1815         -text "Show Z Grid" \
    1816         -variable [itcl::scope _settings(axisZGrid)] \
    1817         -command [itcl::code $this AdjustSetting axisZGrid] \
     1802        -text "Z" \
     1803        -variable [itcl::scope _settings(-zgrid)] \
     1804        -command [itcl::code $this AdjustSetting -zgrid] \
     1805        -font "Arial 9"
     1806    checkbutton $inner.minorticks \
     1807        -text "Minor Ticks" \
     1808        -variable [itcl::scope _settings(-axisminorticks)] \
     1809        -command [itcl::code $this AdjustSetting -axisminorticks] \
    18181810        -font "Arial 9"
    18191811
     
    18261818        "static_triad"    "static" \
    18271819        "closest_triad"   "closest" \
    1828         "furthest_triad"  "furthest" \
     1820        "furthest_triad"  "farthest" \
    18291821        "outer_edges"     "outer"         
    1830     $itk_component(axismode) value "static"
    1831     bind $inner.mode <<Value>> [itcl::code $this AdjustSetting axis-mode]
     1822    $itk_component(axismode) value $_settings(-axismode)
     1823    bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -axismode]
    18321824
    18331825    blt::table $inner \
    1834         0,0 $inner.visible -anchor w -cspan 2 \
    1835         1,0 $inner.labels  -anchor w -cspan 2 \
    1836         2,0 $inner.xgrid   -anchor w -cspan 2 \
    1837         3,0 $inner.ygrid   -anchor w -cspan 2 \
    1838         4,0 $inner.zgrid   -anchor w -cspan 2 \
    1839         5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
    1840         6,0 $inner.mode    -fill x   -cspan 2
     1826        0,0 $inner.visible -anchor w -cspan 4 \
     1827        1,0 $inner.labels  -anchor w -cspan 4 \
     1828        2,0 $inner.minorticks  -anchor w -cspan 4 \
     1829        4,0 $inner.grid_l  -anchor w \
     1830        4,1 $inner.xgrid   -anchor w \
     1831        4,2 $inner.ygrid   -anchor w \
     1832        4,3 $inner.zgrid   -anchor w \
     1833        5,0 $inner.mode_l  -anchor w -padx { 2 0 } \
     1834        5,1 $inner.mode    -fill x   -cspan 3
    18411835
    18421836    blt::table configure $inner r* c* -resize none
    1843     blt::table configure $inner r7 c1 -resize expand
    1844 }
    1845 
     1837    blt::table configure $inner r7 c6 -resize expand
     1838    blt::table configure $inner r3 -height 0.125i
     1839}
    18461840
    18471841itcl::body Rappture::VtkStreamlinesViewer::BuildCameraTab {} {
     
    18631857        0,0 $inner.view_l -anchor e -pady 2 \
    18641858        0,1 $inner.view -anchor w -pady 2
     1859    blt::table configure $inner r0 -resize none
    18651860
    18661861    set labels { qx qy qz qw xpan ypan zoom }
     
    18691864        label $inner.${tag}label -text $tag -font "Arial 9"
    18701865        entry $inner.${tag} -font "Arial 9"  -bg white \
    1871             -textvariable [itcl::scope _view($tag)]
    1872         bind $inner.${tag} <KeyPress-Return> \
    1873             [itcl::code $this camera set ${tag}]
     1866            -textvariable [itcl::scope _view(-$tag)]
     1867        bind $inner.${tag} <Return> \
     1868            [itcl::code $this camera set -${tag}]
     1869        bind $inner.${tag} <KP_Enter> \
     1870            [itcl::code $this camera set -${tag}]
    18741871        blt::table $inner \
    18751872            $row,0 $inner.${tag}label -anchor e -pady 2 \
     
    18801877    checkbutton $inner.ortho \
    18811878        -text "Orthographic Projection" \
    1882         -variable [itcl::scope _view(ortho)] \
    1883         -command [itcl::code $this camera set ortho] \
     1879        -variable [itcl::scope _view(-ortho)] \
     1880        -command [itcl::code $this camera set -ortho] \
    18841881        -font "Arial 9"
    18851882    blt::table $inner \
     
    18881885    incr row
    18891886
    1890     blt::table configure $inner c* r* -resize none
     1887    blt::table configure $inner c* -resize none
    18911888    blt::table configure $inner c2 -resize expand
    18921889    blt::table configure $inner r$row -resize expand
     
    19051902    checkbutton $inner.visible \
    19061903        -text "Show Cutplanes" \
    1907         -variable [itcl::scope _settings(cutplaneVisible)] \
    1908         -command [itcl::code $this AdjustSetting cutplaneVisible] \
     1904        -variable [itcl::scope _settings(-cutplanevisible)] \
     1905        -command [itcl::code $this AdjustSetting -cutplanevisible] \
    19091906        -font "Arial 9"
    19101907
    19111908    checkbutton $inner.wireframe \
    19121909        -text "Show Wireframe" \
    1913         -variable [itcl::scope _settings(cutplaneWireframe)] \
    1914         -command [itcl::code $this AdjustSetting cutplaneWireframe] \
     1910        -variable [itcl::scope _settings(-cutplanewireframe)] \
     1911        -command [itcl::code $this AdjustSetting -cutplanewireframe] \
    19151912        -font "Arial 9"
    19161913
    19171914    checkbutton $inner.lighting \
    19181915        -text "Enable Lighting" \
    1919         -variable [itcl::scope _settings(cutplaneLighting)] \
    1920         -command [itcl::code $this AdjustSetting cutplaneLighting] \
     1916        -variable [itcl::scope _settings(-cutplanelighting)] \
     1917        -command [itcl::code $this AdjustSetting -cutplanelighting] \
    19211918        -font "Arial 9"
    19221919
    19231920    checkbutton $inner.edges \
    19241921        -text "Show Edges" \
    1925         -variable [itcl::scope _settings(cutplaneEdges)] \
    1926         -command [itcl::code $this AdjustSetting cutplaneEdges] \
     1922        -variable [itcl::scope _settings(-cutplaneedges)] \
     1923        -command [itcl::code $this AdjustSetting -cutplaneedges] \
    19271924        -font "Arial 9"
    19281925
    19291926    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    19301927    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1931         -variable [itcl::scope _settings(cutplaneOpacity)] \
     1928        -variable [itcl::scope _settings(-cutplaneopacity)] \
    19321929        -width 10 \
    19331930        -showvalue off \
    1934         -command [itcl::code $this AdjustSetting cutplaneOpacity]
    1935     $inner.opacity set $_settings(cutplaneOpacity)
     1931        -command [itcl::code $this AdjustSetting -cutplaneopacity]
     1932    $inner.opacity set $_settings(-cutplaneopacity)
    19361933
    19371934    # X-value slicer...
     
    19401937            -onimage [Rappture::icon x-cutplane-red] \
    19411938            -offimage [Rappture::icon x-cutplane-red] \
    1942             -command [itcl::code $this AdjustSetting cutplaneXVisible] \
    1943             -variable [itcl::scope _settings(cutplaneXVisible)]
     1939            -command [itcl::code $this AdjustSetting -cutplanexvisible] \
     1940            -variable [itcl::scope _settings(-cutplanexvisible)]
    19441941    }
    19451942    Rappture::Tooltip::for $itk_component(xCutButton) \
     
    19521949            -borderwidth 1 -highlightthickness 0 \
    19531950            -command [itcl::code $this EventuallySetCutplane x] \
    1954             -variable [itcl::scope _settings(cutplaneXPosition)] \
     1951            -variable [itcl::scope _settings(-cutplanexposition)] \
    19551952            -foreground red3 -font "Arial 9 bold"
    19561953    } {
     
    19691966            -onimage [Rappture::icon y-cutplane-green] \
    19701967            -offimage [Rappture::icon y-cutplane-green] \
    1971             -command [itcl::code $this AdjustSetting cutplaneYVisible] \
    1972             -variable [itcl::scope _settings(cutplaneYVisible)]
     1968            -command [itcl::code $this AdjustSetting -cutplaneyvisible] \
     1969            -variable [itcl::scope _settings(-cutplaneyvisible)]
    19731970    }
    19741971    Rappture::Tooltip::for $itk_component(yCutButton) \
     
    19811978            -borderwidth 1 -highlightthickness 0 \
    19821979            -command [itcl::code $this EventuallySetCutplane y] \
    1983             -variable [itcl::scope _settings(cutplaneYPosition)] \
     1980            -variable [itcl::scope _settings(-cutplaneyposition)] \
    19841981            -foreground green3 -font "Arial 9 bold"
    19851982    } {
     
    19981995            -onimage [Rappture::icon z-cutplane-blue] \
    19991996            -offimage [Rappture::icon z-cutplane-blue] \
    2000             -command [itcl::code $this AdjustSetting cutplaneZVisible] \
    2001             -variable [itcl::scope _settings(cutplaneZVisible)]
     1997            -command [itcl::code $this AdjustSetting -cutplanezvisible] \
     1998            -variable [itcl::scope _settings(-cutplanezvisible)]
    20021999    }
    20032000    Rappture::Tooltip::for $itk_component(zCutButton) \
     
    20102007            -borderwidth 1 -highlightthickness 0 \
    20112008            -command [itcl::code $this EventuallySetCutplane z] \
    2012             -variable [itcl::scope _settings(cutplaneZPosition)] \
     2009            -variable [itcl::scope _settings(-cutplanezposition)] \
    20132010            -foreground blue3 -font "Arial 9 bold"
    20142011    } {
     
    20472044        }
    20482045        "set" {
    2049             set who [lindex $args 0]
    2050             set x $_view($who)
     2046            set what [lindex $args 0]
     2047            set x $_view($what)
    20512048            set code [catch { string is double $x } result]
    20522049            if { $code != 0 || !$result } {
    20532050                return
    20542051            }
    2055             switch -- $who {
    2056                 "ortho" {
    2057                     if {$_view(ortho)} {
     2052            switch -- $what {
     2053                "-ortho" {
     2054                    if {$_view($what)} {
    20582055                        SendCmd "camera mode ortho"
    20592056                    } else {
     
    20612058                    }
    20622059                }
    2063                 "xpan" - "ypan" {
     2060                "-xpan" - "-ypan" {
    20642061                    PanCamera
    20652062                }
    2066                 "qx" - "qy" - "qz" - "qw" {
    2067                     set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
     2063                "-qx" - "-qy" - "-qz" - "-qw" {
     2064                    set q [ViewToQuaternion]
    20682065                    $_arcball quaternion $q
    20692066                    EventuallyRotate $q
    20702067                }
    2071                 "zoom" {
    2072                     SendCmd "camera zoom $_view(zoom)"
     2068                "-zoom" {
     2069                    SendCmd "camera zoom $_view($what)"
    20732070                }
    20742071            }
     
    21602157    }
    21612158    array set settings $style
     2159    StartBufferingCommands
    21622160    SendCmd "streamlines add $tag"
    21632161    SendCmd "streamlines seed visible off $tag"
     
    21662164        set length [string length $seeds]
    21672165        SendCmd "streamlines seed fmesh 200 data follows $length $tag"
    2168         SendCmd "$seeds"
     2166        append _outbuf $seeds
    21692167        set _seeds($dataobj) 1
    21702168    }
     
    21722170    SendCmd "polydata add $tag"
    21732171    SendCmd "polydata colormode constant {} $tag"
    2174     set _settings(volumeEdges) $settings(-edges)
    2175     set _settings(volumeLighting) $settings(-lighting)
    2176     set _settings(volumeOpacity) $settings(-opacity)
    2177     set _settings(volumeWireframe) $settings(-wireframe)
    2178     set _settings(volumeOpacity) [expr $settings(-opacity) * 100.0]
     2172    set _settings(-volumeedges) $settings(-edges)
     2173    set _settings(-volumelighting) $settings(-lighting)
     2174    set _settings(-volumeopacity) $settings(-opacity)
     2175    set _settings(-volumewireframe) $settings(-wireframe)
     2176    set _settings(-volumeopacity) [expr $settings(-opacity) * 100.0]
     2177    StopBufferingCommands
    21792178    SetColormap $dataobj $comp
    21802179}
     
    22332232        set title $fname
    22342233    }
    2235     if { $_settings(legendVisible) } {
     2234    if { $_settings(-legendvisible) } {
    22362235        set x [expr $w - 2]
    22372236        if { [$c find withtag "legend"] == "" } {
     
    23642363        "move" {
    23652364            set axis [lindex $args 0]
    2366             set oldval $_settings(axis-${axis}position)
    23672365            set newval [lindex $args 1]
    23682366            if {[llength $args] != 2} {
     
    24122410        invoke {
    24132411            $itk_component(field) value $_curFldLabel
    2414             AdjustSetting field
     2412            AdjustSetting -field
    24152413        }
    24162414        default {
     
    24292427        bottom "0.707107 0.707107 0 0"
    24302428    }
    2431     foreach name { qw qx qy qz } value $positions($side) {
     2429    foreach name { -qw -qx -qy -qz } value $positions($side) {
    24322430        set _view($name) $value
    24332431    }
    2434     set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
     2432    set q [ViewToQuaternion]
    24352433    $_arcball quaternion $q
    24362434    SendCmd "camera orient $q"
    24372435    SendCmd "camera reset"
    2438     set _view(xpan) 0
    2439     set _view(ypan) 0
    2440     set _view(zoom) 1.0
    2441 }
     2436    set _view(-xpan) 0
     2437    set _view(-ypan) 0
     2438    set _view(-zoom) 1.0
     2439}
Note: See TracChangeset for help on using the changeset viewer.