Changeset 4444


Ignore:
Timestamp:
Jun 27, 2014, 2:56:21 AM (10 years ago)
Author:
ldelgass
Message:

settings name updates

Location:
trunk/gui/scripts
Files:
3 edited

Legend:

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

    r4441 r4444  
    217217
    218218    array set _settings [subst {
    219         background              black
    220         colormap                BCGYR
    221         colormapVisible         1
    222         field                   "Default"
    223         axesVisible             1
    224         axisLabelsVisible       1
    225         axisXGrid               0
    226         axisYGrid               0
    227         axisZGrid               0
    228         cutplaneEdges           0
    229         cutplaneLighting        1
    230         cutplanePreinterp       1
    231         cutplaneOpacity         100
    232         cutplaneVisible         0
    233         cutplaneWireframe       0
    234         cutplaneXPosition       50
    235         cutplaneXVisible        1
    236         cutplaneYPosition       50
    237         cutplaneYVisible        1
    238         cutplaneZPosition       50
    239         cutplaneZVisible        1
    240         glyphEdges              0
    241         glyphLighting           1
    242         glyphNormscale          1
    243         glyphOpacity            100
    244         saveGlyphOpacity        100
    245         glyphOrient             1
    246         glyphOutline            0
    247         glyphScale              1
    248         glyphScaleMode          "vmag"
    249         glyphShape              "arrow"
    250         glyphVisible            1
    251         glyphWireframe          0
    252         legendVisible           1
     219        -axesvisible            1
     220        -axislabelsvisible      1
     221        -axismode               "static"
     222        -background             black
     223        -colormap               BCGYR
     224        -colormapvisible        1
     225        -cutplaneedges          0
     226        -cutplanelighting       1
     227        -cutplanepreinterp      1
     228        -cutplaneopacity        100
     229        -cutplanevisible        0
     230        -cutplanewireframe      0
     231        -cutplanexposition      50
     232        -cutplanexvisible       1
     233        -cutplaneyposition      50
     234        -cutplaneyvisible       1
     235        -cutplanezposition      50
     236        -cutplanezvisible       1
     237        -field                  "Default"
     238        -glyphedges              0
     239        -glyphlighting           1
     240        -glyphnormscale          1
     241        -glyphopacity            100
     242        -glyphorient             1
     243        -glyphoutline            0
     244        -glyphscale              1
     245        -glyphscalemode          "vmag"
     246        -glyphshape              "arrow"
     247        -glyphvisible            1
     248        -glyphwireframe          0
     249        -legendvisible          1
     250        -saveglyphopacity       100
     251        -xgrid                  0
     252        -ygrid                  0
     253        -zgrid                  0       
    253254    }]
    254255    array set _changed {
    255         glyphOpacity            0
    256         colormap                0
     256        -colormap               0
     257        -glyphopacity           0
    257258    }
    258259
     
    334335            -onimage [Rappture::icon volume-on] \
    335336            -offimage [Rappture::icon volume-off] \
    336             -variable [itcl::scope _settings(glyphVisible)] \
    337             -command [itcl::code $this AdjustSetting glyphVisible]
     337            -variable [itcl::scope _settings(-glyphvisible)] \
     338            -command [itcl::code $this AdjustSetting -glyphvisible]
    338339    }
    339340    $itk_component(glyphs) select
     
    347348            -onimage [Rappture::icon cutbutton] \
    348349            -offimage [Rappture::icon cutbutton] \
    349             -variable [itcl::scope _settings(cutplaneVisible)] \
    350             -command [itcl::code $this AdjustSetting cutplaneVisible]
     350            -variable [itcl::scope _settings(-cutplanevisible)] \
     351            -command [itcl::code $this AdjustSetting -cutplanevisible]
    351352    }
    352353    Rappture::Tooltip::for $itk_component(cutplane) \
     
    954955        PanCamera
    955956        set _first ""
    956         InitSettings axisXGrid axisYGrid axisZGrid axisMode \
    957             axesVisible axisLabelsVisible
     957        InitSettings -xgrid -ygrid -zgrid -axismode \
     958            -axesvisible -axislabelsvisible
    958959        foreach axis { x y z } {
    959960            SendCmd "axis lformat $axis %g"
     
    10341035        $itk_component(field) value $_curFldLabel
    10351036    }
    1036     InitSettings glyphOutline
    1037         #cutplaneVisible
     1037    InitSettings -glyphoutline
     1038        #-cutplanevisible
    10381039    if { $_reset } {
    10391040        # These are settings that rely on a dataset being loaded.
    10401041        InitSettings \
    1041             glyphLighting \
    1042             field \
    1043             glyphEdges glyphLighting glyphOpacity \
    1044             glyphWireframe
    1045 
    1046         #cutplaneXPosition cutplaneYPosition cutplaneZPosition \
    1047             cutplaneXVisible cutplaneYVisible cutplaneZVisible \
    1048             cutplanePreinterp
     1042            -glyphlighting \
     1043            -field \
     1044            -glyphedges -glyphlighting -glyphopacity \
     1045            -glyphwireframe
     1046
     1047        #-cutplanexposition -cutplaneyposition -cutplanezposition \
     1048            -cutplanexvisible -cutplaneyvisible -cutplanezvisible \
     1049            -cutplanepreinterp
    10491050
    10501051        Zoom reset
     
    12861287itcl::body Rappture::VtkGlyphViewer::InitSettings { args } {
    12871288    foreach spec $args {
    1288         if { [info exists _settings($_first-$spec)] } {
     1289        if { [info exists _settings($_first${spec})] } {
    12891290            # Reset global setting with dataobj specific setting
    1290             set _settings($spec) $_settings($_first-$spec)
     1291            set _settings($spec) $_settings($_first${spec})
    12911292        }
    12921293        AdjustSetting $spec
     
    13061307    }
    13071308    switch -- $what {
    1308         "background" {
     1309        "-background" {
    13091310            set bgcolor [$itk_component(background) value]
    13101311            array set fgcolors {
     
    13181319            DrawLegend
    13191320        }
    1320         "axesVisible" {
     1321        "-axesvisible" {
    13211322            set bool $_settings($what)
    13221323            SendCmd "axis visible all $bool"
    13231324        }
    1324         "axisLabelsVisible" {
     1325        "-axislabelsvisible" {
    13251326            set bool $_settings($what)
    13261327            SendCmd "axis labels all $bool"
    13271328        }
    1328         "axisXGrid" - "axisYGrid" - "axisZGrid" {
    1329             set axis [string tolower [string range $what 4 4]]
     1329        "-xgrid" - "-ygrid" - "-zgrid" {
     1330            set axis [string tolower [string range $what 1 1]]
    13301331            set bool $_settings($what)
    13311332            SendCmd "axis grid $axis $bool"
    13321333        }
    1333         "axisMode" {
     1334        "-axismode" {
    13341335            set mode [$itk_component(axisMode) value]
    13351336            set mode [$itk_component(axisMode) translate $mode]
     
    13371338            SendCmd "axis flymode $mode"
    13381339        }
    1339         "cutplaneEdges" {
     1340        "-cutplaneedges" {
    13401341            set bool $_settings($what)
    13411342            SendCmd "cutplane edges $bool"
    13421343        }
    1343         "cutplaneVisible" {
     1344        "-cutplanevisible" {
    13441345            set bool $_settings($what)
    13451346            SendCmd "cutplane visible $bool"
    13461347        }
    1347         "cutplaneWireframe" {
     1348        "-cutplanewireframe" {
    13481349            set bool $_settings($what)
    13491350            SendCmd "cutplane wireframe $bool"
    13501351        }
    1351         "cutplaneLighting" {
     1352        "-cutplanelighting" {
    13521353            set bool $_settings($what)
    13531354            SendCmd "cutplane lighting $bool"
    13541355        }
    1355         "cutplaneOpacity" {
     1356        "-cutplaneopacity" {
    13561357            set val $_settings($what)
    13571358            set sval [expr { 0.01 * double($val) }]
    13581359            SendCmd "cutplane opacity $sval"
    13591360        }
    1360         "cutplanePreinterp" {
     1361        "-cutplanepreinterp" {
    13611362            set bool $_settings($what)
    13621363            SendCmd "cutplane preinterp $bool"
    13631364        }
    1364         "cutplaneXVisible" - "cutplaneYVisible" - "cutplaneZVisible" {
    1365             set axis [string tolower [string range $what 8 8]]
     1365        "-cutplanexvisible" - "-cutplaneyvisible" - "-cutplanezvisible" {
     1366            set axis [string tolower [string range $what 9 9]]
    13661367            set bool $_settings($what)
    13671368            if { $bool } {
     
    13741375            SendCmd "cutplane axis $axis $bool"
    13751376        }
    1376         "cutplaneXPosition" - "cutplaneYPosition" - "cutplaneZPosition" {
    1377             set axis [string tolower [string range $what 8 8]]
     1377        "-cutplanexposition" - "-cutplaneyposition" - "-cutplanezposition" {
     1378            set axis [string tolower [string range $what 9 9]]
    13781379            set pos [expr $_settings($what) * 0.01]
    13791380            SendCmd "cutplane slice ${axis} ${pos}"
    13801381            set _cutplanePending 0
    13811382        }
    1382         "colormap" {
     1383        "-colormap" {
    13831384            set _changed($what) 1
    13841385            StartBufferingCommands
     
    13861387            set _settings($what) $color
    13871388            if { $color == "none" } {
    1388                 if { $_settings(colormapVisible) } {
     1389                if { $_settings(-colormapvisible) } {
    13891390                    SendCmd "glyphs colormode constant {}"
    1390                     set _settings(colormapVisible) 0
     1391                    set _settings(-colormapvisible) 0
    13911392                }
    13921393            } else {
    1393                 if { !$_settings(colormapVisible) } {
     1394                if { !$_settings(-colormapvisible) } {
    13941395                    SendCmd "glyphs colormode $_colorMode $_curFldName"
    1395                     set _settings(colormapVisible) 1
     1396                    set _settings(-colormapvisible) 1
    13961397                }
    13971398                SetCurrentColormap $color
     
    14001401            EventuallyRequestLegend
    14011402        }
    1402         "glyphWireframe" {
     1403        "-glyphwireframe" {
    14031404            set bool $_settings($what)
    14041405            SendCmd "glyphs wireframe $bool"
    14051406        }
    1406         "glyphVisible" {
     1407        "-glyphvisible" {
    14071408            set bool $_settings($what)
    14081409            SendCmd "glyphs visible $bool"
     
    14161417            DrawLegend
    14171418        }
    1418         "glyphLighting" {
     1419        "-glyphlighting" {
    14191420            set bool $_settings($what)
    14201421            SendCmd "glyphs lighting $bool"
    14211422        }
    1422         "glyphEdges" {
     1423        "-glyphedges" {
    14231424            set bool $_settings($what)
    14241425            SendCmd "glyphs edges $bool"
     
    14281429            SendCmd "outline visible $bool"
    14291430        }
    1430         "glyphOpacity" {
     1431        "-glyphopacity" {
    14311432            set val $_settings($what)
    14321433            set sval [expr { 0.01 * double($val) }]
    14331434            SendCmd "glyphs opacity $sval"
    14341435        }
    1435         "glyphNormscale" {
     1436        "-glyphnormscale" {
    14361437            set bool $_settings($what)
    14371438            SendCmd "glyphs normscale $bool"
    14381439        }
    1439         "glyphOrient" {
     1440        "-glyphorient" {
    14401441            set bool $_settings($what)
    14411442            SendCmd "glyphs gorient $bool {}"
    14421443        }
    1443         "glyphScale" {
     1444        "-glyphscale" {
    14441445            set val $_settings($what)
    14451446            SendCmd "glyphs gscale $val"
    14461447        }
    1447         "glyphScaleMode" {
     1448        "-glyphscalemode" {
    14481449            set label [$itk_component(scaleMode) value]
    14491450            set mode [$itk_component(scaleMode) translate $label]
     
    14511452            SendCmd "glyphs smode $mode {}"
    14521453        }
    1453         "glyphShape" {
     1454        "-glyphshape" {
    14541455            set label [$itk_component(gshape) value]
    14551456            set shape [$itk_component(gshape) translate $label]
     
    14571458            SendCmd "glyphs shape $shape"
    14581459        }
    1459         "field" {
     1460        "-field" {
    14601461            set label [$itk_component(field) value]
    14611462            set fname [$itk_component(field) translate $label]
     
    14831484            DrawLegend
    14841485        }
    1485         "legendVisible" {
     1486        "-legendvisible" {
    14861487            if { !$_settings($what) } {
    14871488                $itk_component(view) delete legend
     
    15861587    checkbutton $inner.glyphs \
    15871588        -text "Glyphs" \
    1588         -variable [itcl::scope _settings(glyphVisible)] \
    1589         -command [itcl::code $this AdjustSetting glyphVisible] \
     1589        -variable [itcl::scope _settings(-glyphvisible)] \
     1590        -command [itcl::code $this AdjustSetting -glyphvisible] \
    15901591        -font "Arial 9"
    15911592
     
    16071608        "tetrahedron"        "tetrahedron"
    16081609
    1609     $itk_component(gshape) value $_settings(glyphShape)
    1610     bind $inner.gshape <<Value>> [itcl::code $this AdjustSetting glyphShape]
     1610    $itk_component(gshape) value $_settings(-glyphshape)
     1611    bind $inner.gshape <<Value>> [itcl::code $this AdjustSetting -glyphshape]
    16111612
    16121613    label $inner.scaleMode_l -text "Scale by" -font "Arial 9"
     
    16201621        "off"    "Constant size"
    16211622
    1622     $itk_component(scaleMode) value "[$itk_component(scaleMode) label $_settings(glyphScaleMode)]"
    1623     bind $inner.scaleMode <<Value>> [itcl::code $this AdjustSetting glyphScaleMode]
     1623    $itk_component(scaleMode) value "[$itk_component(scaleMode) label $_settings(-glyphscalemode)]"
     1624    bind $inner.scaleMode <<Value>> [itcl::code $this AdjustSetting -glyphscalemode]
    16241625
    16251626    checkbutton $inner.normscale \
    16261627        -text "Normalize scaling" \
    1627         -variable [itcl::scope _settings(glyphNormscale)] \
    1628         -command [itcl::code $this AdjustSetting glyphNormscale] \
     1628        -variable [itcl::scope _settings(-glyphnormscale)] \
     1629        -command [itcl::code $this AdjustSetting -glyphnormscale] \
    16291630        -font "Arial 9"
    16301631    Rappture::Tooltip::for $inner.normscale "If enabled, field values are normalized to \[0,1\] before scaling and scale factor is relative to a default size"
     
    16321633    checkbutton $inner.gorient \
    16331634        -text "Orient" \
    1634         -variable [itcl::scope _settings(glyphOrient)] \
    1635         -command [itcl::code $this AdjustSetting glyphOrient] \
     1635        -variable [itcl::scope _settings(-glyphorient)] \
     1636        -command [itcl::code $this AdjustSetting -glyphorient] \
    16361637        -font "Arial 9"
    16371638    Rappture::Tooltip::for $inner.gorient "Orient glyphs by vector field directions"
     
    16391640    checkbutton $inner.wireframe \
    16401641        -text "Wireframe" \
    1641         -variable [itcl::scope _settings(glyphWireframe)] \
    1642         -command [itcl::code $this AdjustSetting glyphWireframe] \
     1642        -variable [itcl::scope _settings(-glyphwireframe)] \
     1643        -command [itcl::code $this AdjustSetting -glyphwireframe] \
    16431644        -font "Arial 9"
    16441645
    16451646    checkbutton $inner.lighting \
    16461647        -text "Enable Lighting" \
    1647         -variable [itcl::scope _settings(glyphLighting)] \
    1648         -command [itcl::code $this AdjustSetting glyphLighting] \
     1648        -variable [itcl::scope _settings(-glyphlighting)] \
     1649        -command [itcl::code $this AdjustSetting -glyphlighting] \
    16491650        -font "Arial 9"
    16501651
    16511652    checkbutton $inner.edges \
    16521653        -text "Edges" \
    1653         -variable [itcl::scope _settings(glyphEdges)] \
    1654         -command [itcl::code $this AdjustSetting glyphEdges] \
     1654        -variable [itcl::scope _settings(-glyphedges)] \
     1655        -command [itcl::code $this AdjustSetting -glyphedges] \
    16551656        -font "Arial 9"
    16561657
    16571658    checkbutton $inner.outline \
    16581659        -text "Outline" \
    1659         -variable [itcl::scope _settings(glyphOutline)] \
    1660         -command [itcl::code $this AdjustSetting glyphOutline] \
     1660        -variable [itcl::scope _settings(-glyphoutline)] \
     1661        -command [itcl::code $this AdjustSetting -glyphoutline] \
    16611662        -font "Arial 9"
    16621663
    16631664    checkbutton $inner.legend \
    16641665        -text "Legend" \
    1665         -variable [itcl::scope _settings(legendVisible)] \
    1666         -command [itcl::code $this AdjustSetting legendVisible] \
     1666        -variable [itcl::scope _settings(-legendvisible)] \
     1667        -command [itcl::code $this AdjustSetting -legendvisible] \
    16671668        -font "Arial 9"
    16681669
     
    16761677        "grey"               "grey"             
    16771678
    1678     $itk_component(background) value $_settings(background)
    1679     bind $inner.background <<Value>> [itcl::code $this AdjustSetting background]
     1679    $itk_component(background) value $_settings(-background)
     1680    bind $inner.background <<Value>> [itcl::code $this AdjustSetting -background]
    16801681
    16811682    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    16821683    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1683         -variable [itcl::scope _settings(glyphOpacity)] \
     1684        -variable [itcl::scope _settings(-glyphopacity)] \
    16841685        -width 10 \
    16851686        -showvalue off \
    1686         -command [itcl::code $this AdjustSetting glyphOpacity]
     1687        -command [itcl::code $this AdjustSetting -glyphopacity]
    16871688
    16881689    label $inner.gscale_l -text "Scale factor" -font "Arial 9"
    16891690    if {0} {
    16901691    ::scale $inner.gscale -from 1 -to 100 -orient horizontal \
    1691         -variable [itcl::scope _settings(glyphScale)] \
     1692        -variable [itcl::scope _settings(-glyphscale)] \
    16921693        -width 10 \
    16931694        -showvalue off \
    1694         -command [itcl::code $this AdjustSetting glyphScale]
     1695        -command [itcl::code $this AdjustSetting -glyphscale]
    16951696    } else {
    16961697    itk_component add gscale {
    16971698        entry $inner.gscale -font "Arial 9" -bg white \
    1698             -textvariable [itcl::scope _settings(glyphScale)]
     1699            -textvariable [itcl::scope _settings(-glyphscale)]
    16991700    } {
    17001701        ignore -font -background
    17011702    }
    17021703    bind $inner.gscale <Return> \
    1703         [itcl::code $this AdjustSetting glyphScale]
     1704        [itcl::code $this AdjustSetting -glyphscale]
    17041705    bind $inner.gscale <KP_Enter> \
    1705         [itcl::code $this AdjustSetting glyphScale]
     1706        [itcl::code $this AdjustSetting -glyphscale]
    17061707    }
    17071708    Rappture::Tooltip::for $inner.gscale "Set scaling multiplier (or constant size)"
     
    17251726    $itk_component(colormap) value "BCGYR"
    17261727    bind $inner.colormap <<Value>> \
    1727         [itcl::code $this AdjustSetting colormap]
     1728        [itcl::code $this AdjustSetting -colormap]
    17281729
    17291730    blt::table $inner \
     
    17661767    checkbutton $inner.visible \
    17671768        -text "Show Axes" \
    1768         -variable [itcl::scope _settings(axesVisible)] \
    1769         -command [itcl::code $this AdjustSetting axesVisible] \
     1769        -variable [itcl::scope _settings(-axesvisible)] \
     1770        -command [itcl::code $this AdjustSetting -axesvisible] \
    17701771        -font "Arial 9"
    17711772
    17721773    checkbutton $inner.labels \
    17731774        -text "Show Axis Labels" \
    1774         -variable [itcl::scope _settings(axisLabelsVisible)] \
    1775         -command [itcl::code $this AdjustSetting axisLabelsVisible] \
     1775        -variable [itcl::scope _settings(-axislabelsvisible)] \
     1776        -command [itcl::code $this AdjustSetting -axislabelsvisible] \
    17761777        -font "Arial 9"
    17771778
    17781779    checkbutton $inner.gridx \
    17791780        -text "Show X Grid" \
    1780         -variable [itcl::scope _settings(axisXGrid)] \
    1781         -command [itcl::code $this AdjustSetting axisXGrid] \
     1781        -variable [itcl::scope _settings(-xgrid)] \
     1782        -command [itcl::code $this AdjustSetting -xgrid] \
    17821783        -font "Arial 9"
    17831784    checkbutton $inner.gridy \
    17841785        -text "Show Y Grid" \
    1785         -variable [itcl::scope _settings(axisYGrid)] \
    1786         -command [itcl::code $this AdjustSetting axisYGrid] \
     1786        -variable [itcl::scope _settings(-ygrid)] \
     1787        -command [itcl::code $this AdjustSetting -ygrid] \
    17871788        -font "Arial 9"
    17881789    checkbutton $inner.gridz \
    17891790        -text "Show Z Grid" \
    1790         -variable [itcl::scope _settings(axisZGrid)] \
    1791         -command [itcl::code $this AdjustSetting axisZGrid] \
     1791        -variable [itcl::scope _settings(-zgrid)] \
     1792        -command [itcl::code $this AdjustSetting -zgrid] \
    17921793        -font "Arial 9"
    17931794
     
    18021803        "furthest_triad"  "farthest" \
    18031804        "outer_edges"     "outer"         
    1804     $itk_component(axisMode) value "static"
    1805     bind $inner.mode <<Value>> [itcl::code $this AdjustSetting axisMode]
     1805    $itk_component(axisMode) value $_settings(-axismode)
     1806    bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -axismode]
    18061807
    18071808    blt::table $inner \
     
    18791880    checkbutton $inner.visible \
    18801881        -text "Cutplanes" \
    1881         -variable [itcl::scope _settings(cutplaneVisible)] \
    1882         -command [itcl::code $this AdjustSetting cutplaneVisible] \
     1882        -variable [itcl::scope _settings(-cutplanevisible)] \
     1883        -command [itcl::code $this AdjustSetting -cutplanevisible] \
    18831884        -font "Arial 9"
    18841885
    18851886    checkbutton $inner.wireframe \
    18861887        -text "Wireframe" \
    1887         -variable [itcl::scope _settings(cutplaneWireframe)] \
    1888         -command [itcl::code $this AdjustSetting cutplaneWireframe] \
     1888        -variable [itcl::scope _settings(-cutplanewireframe)] \
     1889        -command [itcl::code $this AdjustSetting -cutplanewireframe] \
    18891890        -font "Arial 9"
    18901891
    18911892    checkbutton $inner.lighting \
    18921893        -text "Enable Lighting" \
    1893         -variable [itcl::scope _settings(cutplaneLighting)] \
    1894         -command [itcl::code $this AdjustSetting cutplaneLighting] \
     1894        -variable [itcl::scope _settings(-cutplanelighting)] \
     1895        -command [itcl::code $this AdjustSetting -cutplanelighting] \
    18951896        -font "Arial 9"
    18961897
    18971898    checkbutton $inner.edges \
    18981899        -text "Edges" \
    1899         -variable [itcl::scope _settings(cutplaneEdges)] \
    1900         -command [itcl::code $this AdjustSetting cutplaneEdges] \
     1900        -variable [itcl::scope _settings(-cutplaneedges)] \
     1901        -command [itcl::code $this AdjustSetting -cutplaneedges] \
    19011902        -font "Arial 9"
    19021903
    19031904    checkbutton $inner.preinterp \
    19041905        -text "Interpolate Scalars" \
    1905         -variable [itcl::scope _settings(cutplanePreinterp)] \
    1906         -command [itcl::code $this AdjustSetting cutplanePreinterp] \
     1906        -variable [itcl::scope _settings(-cutplanepreinterp)] \
     1907        -command [itcl::code $this AdjustSetting -cutplanepreinterp] \
    19071908        -font "Arial 9"
    19081909
    19091910    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    19101911    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1911         -variable [itcl::scope _settings(cutplaneOpacity)] \
     1912        -variable [itcl::scope _settings(-cutplaneopacity)] \
    19121913        -width 10 \
    19131914        -showvalue off \
    1914         -command [itcl::code $this AdjustSetting cutplaneOpacity]
    1915     $inner.opacity set $_settings(cutplaneOpacity)
     1915        -command [itcl::code $this AdjustSetting -cutplaneopacity]
     1916    $inner.opacity set $_settings(-cutplaneopacity)
    19161917
    19171918    # X-value slicer...
     
    19201921            -onimage [Rappture::icon x-cutplane-red] \
    19211922            -offimage [Rappture::icon x-cutplane-red] \
    1922             -command [itcl::code $this AdjustSetting cutplaneXVisible] \
    1923             -variable [itcl::scope _settings(cutplaneXVisible)] \
     1923            -command [itcl::code $this AdjustSetting -cutplanexvisible] \
     1924            -variable [itcl::scope _settings(-cutplanexvisible)] \
    19241925    }
    19251926    Rappture::Tooltip::for $itk_component(xbutton) \
     
    19311932            -borderwidth 1 -highlightthickness 0 \
    19321933            -command [itcl::code $this EventuallySetCutplane x] \
    1933             -variable [itcl::scope _settings(cutplaneXPosition)] \
     1934            -variable [itcl::scope _settings(-cutplanexposition)] \
    19341935            -foreground red2 -font "Arial 9 bold"
    19351936    } {
     
    19481949            -onimage [Rappture::icon y-cutplane-green] \
    19491950            -offimage [Rappture::icon y-cutplane-green] \
    1950             -command [itcl::code $this AdjustSetting cutplaneYVisible] \
    1951             -variable [itcl::scope _settings(cutplaneYVisible)] \
     1951            -command [itcl::code $this AdjustSetting -cutplaneyvisible] \
     1952            -variable [itcl::scope _settings(-cutplaneyvisible)] \
    19521953    }
    19531954    Rappture::Tooltip::for $itk_component(ybutton) \
     
    19601961            -borderwidth 1 -highlightthickness 0 \
    19611962            -command [itcl::code $this EventuallySetCutplane y] \
    1962             -variable [itcl::scope _settings(cutplaneYPosition)] \
     1963            -variable [itcl::scope _settings(-cutplaneyposition)] \
    19631964            -foreground green3 -font "Arial 9 bold"
    19641965    } {
     
    19771978            -onimage [Rappture::icon z-cutplane-blue] \
    19781979            -offimage [Rappture::icon z-cutplane-blue] \
    1979             -command [itcl::code $this AdjustSetting cutplaneZVisible] \
    1980             -variable [itcl::scope _settings(cutplaneZVisible)] \
     1980            -command [itcl::code $this AdjustSetting -cutplanezvisible] \
     1981            -variable [itcl::scope _settings(-cutplanezvisible)] \
    19811982    } {
    19821983        usual
     
    19921993            -borderwidth 1 -highlightthickness 0 \
    19931994            -command [itcl::code $this EventuallySetCutplane z] \
    1994             -variable [itcl::scope _settings(cutplaneZPosition)] \
     1995            -variable [itcl::scope _settings(-cutplanezposition)] \
    19951996            -foreground blue3 -font "Arial 9 bold"
    19961997    } {
     
    20222023    blt::table configure $inner r9 c4 -resize expand
    20232024}
    2024 
    2025 
    20262025
    20272026#
     
    21802179    # the code to handle aberrant cases.
    21812180
    2182     if { $_changed(glyphOpacity) } {
    2183         set style(-opacity) [expr $_settings(glyphOpacity) * 0.01]
    2184     }
    2185     if { $_changed(colormap) } {
    2186         set style(-colormap) $_settings(colormap)
     2181    if { $_changed(-glyphopacity) } {
     2182        set style(-opacity) [expr $_settings(-glyphopacity) * 0.01]
     2183    }
     2184    if { $_changed(-colormap) } {
     2185        set style(-colormap) $_settings(-colormap)
    21872186    }
    21882187    if { $_currentColormap == "" } {
    21892188        $itk_component(colormap) value $style(-colormap)
    21902189    }
     2190
     2191    SendCmd "outline add $tag"
     2192    SendCmd "outline color [Color2RGB $style(-color)] $tag"
     2193    SendCmd "outline visible $style(-outline) $tag"
     2194    set _settings(-glyphoutline) $style(-outline)
     2195
    21912196    SendCmd "glyphs add $style(-shape) $tag"
    2192     set _settings(glyphShape) $style(-shape)
     2197    set _settings(-glyphshape) $style(-shape)
    21932198    $itk_component(gshape) value $style(-shape)
    21942199    SendCmd "glyphs edges $style(-edges) $tag"
     
    22002205        SendCmd "glyphs gscale $style(-gscale) $tag"
    22012206    }
    2202     set _settings(glyphNormscale) $style(-normscale)
    2203     set _settings(glyphScale) $style(-gscale)
    2204     SendCmd "outline add $tag"
    2205     SendCmd "outline color [Color2RGB $style(-color)] $tag"
    2206     SendCmd "outline visible $style(-outline) $tag"
    2207     set _settings(glyphOutline) $style(-outline)
    2208     set _settings(glyphEdges) $style(-edges)
     2207    set _settings(-glyphnormscale) $style(-normscale)
     2208    set _settings(-glyphscale) $style(-gscale)
     2209
     2210    set _settings(-glyphedges) $style(-edges)
    22092211    if {$style(-colorMode) == "constant" || $style(-colormap) == "none"} {
    22102212        SendCmd "glyphs colormode constant {} $tag"
    2211         set _settings(colormapVisible) 0
    2212         set _settings(colormap) "none"
     2213        set _settings(-colormapvisible) 0
     2214        set _settings(-colormap) "none"
    22132215    } else {
    22142216        SendCmd "glyphs colormode $style(-colorMode) $_curFldName $tag"
    2215         set _settings(colormapVisible) 1
    2216         set _settings(colormap) $style(-colormap)
     2217        set _settings(-colormapvisible) 1
     2218        set _settings(-colormap) $style(-colormap)
    22172219        SetCurrentColormap $style(-colormap)
    22182220    }
    2219     $itk_component(colormap) value $_settings(colormap)
     2221    $itk_component(colormap) value $_settings(-colormap)
    22202222    set _colorMode $style(-colorMode)
    22212223    # constant color only used if colormode set to constant
     
    22252227    SendCmd "glyphs gorient $style(-orientGlyphs) {} $tag"
    22262228    SendCmd "glyphs smode $style(-scaleMode) {} $tag"
    2227     set _settings(glyphScaleMode) $style(-scaleMode)
     2229    set _settings(-glyphscalemode) $style(-scaleMode)
    22282230    $itk_component(scaleMode) value "[$itk_component(scaleMode) label $style(-scaleMode)]"
    22292231    SendCmd "glyphs quality $style(-quality) $tag"
    22302232    SendCmd "glyphs lighting $style(-lighting) $tag"
    2231     set _settings(glyphLighting) $style(-lighting)
     2233    set _settings(-glyphlighting) $style(-lighting)
    22322234    SendCmd "glyphs linecolor [Color2RGB $style(-edgecolor)] $tag"
    22332235    SendCmd "glyphs linewidth $style(-linewidth) $tag"
    22342236    SendCmd "glyphs ptsize $style(-ptsize) $tag"
    22352237    SendCmd "glyphs opacity $style(-opacity) $tag"
    2236     set _settings(glyphOpacity) [expr $style(-opacity) * 100.0]
     2238    set _settings(-glyphopacity) [expr $style(-opacity) * 100.0]
    22372239    SendCmd "glyphs wireframe $style(-wireframe) $tag"
    2238     set _settings(glyphWireframe) $style(-wireframe)
     2240    set _settings(-glyphwireframe) $style(-wireframe)
    22392241}
    22402242
     
    24132415    }
    24142416    set x [expr $w - 2]
    2415     if { !$_settings(legendVisible) } {
     2417    if { !$_settings(-legendvisible) } {
    24162418        $c delete legend
    24172419        return
  • trunk/gui/scripts/vtkstreamlinesviewer.tcl

    r4344 r4444  
    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,
  • trunk/gui/scripts/vtkvolumeviewer.tcl

    r4402 r4444  
    163163    private variable _start 0
    164164    private variable _title ""
    165     private variable _seeds
    166165
    167166    common _downloadPopup;              # download options from popup
     
    887886    array unset _data
    888887    array unset _colormaps
    889     array unset _seeds
    890888    array unset _dataset2style
    891889    array unset _obj2datasets
     
    13781376        "-background" {
    13791377            set bgcolor [$itk_component(background) value]
    1380             set _settings(${what}) $bgcolor
     1378            set _settings($what) $bgcolor
    13811379            array set fgcolors {
    13821380                "black" "white"
     
    13901388        }
    13911389        "-volumeoutline" {
    1392             set bool $_settings(${what})
     1390            set bool $_settings($what)
    13931391            SendCmd "outline visible 0"
    13941392            foreach tag [GetDatasetsWithComponent $_current] {
     
    13971395        }
    13981396        "-legendvisible" {
    1399             set bool $_settings(${what})
     1397            set bool $_settings($what)
    14001398            set _settings($_current${what}) $bool
    14011399            if { $bool } {
     
    14071405        }
    14081406        "-volumevisible" {
    1409             set bool $_settings(${what})
     1407            set bool $_settings($what)
    14101408            set _settings($_current${what}) $bool
    14111409            # Only the data objects in the array _obj2ovride(*-raise) are
     
    14341432            set val [$itk_component(blendmode) value]
    14351433            set mode [$itk_component(blendmode) translate $val]
    1436             set _settings(${what}) $mode
     1434            set _settings($what) $mode
    14371435            set _settings($_current${what}) $mode
    14381436            foreach tag [GetDatasetsWithComponent $_current] {
     
    14461444                InitComponentSettings $_current
    14471445            }
    1448             set val $_settings(${what})
     1446            set val $_settings($what)
    14491447            set _settings($_current${what}) $val
    14501448            set ambient [expr {0.01*$val}]
     
    14541452        }
    14551453        "-volumediffuse" {
    1456             set val $_settings(${what})
     1454            set val $_settings($what)
    14571455            set _settings($_current${what}) $val
    14581456            set diffuse [expr {0.01*$val}]
     
    14621460        }
    14631461        "-volumespecularlevel" - "-volumespecularexponent" {
    1464             set val $_settings(${what})
     1462            set val $_settings($what)
    14651463            set _settings($_current${what}) $val
    14661464            set level [expr {0.01*$val}]
    1467             set exp $_settings(${what})
     1465            set exp $_settings($what)
    14681466            foreach tag [GetDatasetsWithComponent $_current] {
    14691467                SendCmd "volume shading specular $level $exp $tag"
     
    14781476        }
    14791477        "-volumeopacity" {
    1480             set val $_settings(${what})
     1478            set val $_settings($what)
    14811479            set _settings($_current${what}) $val
    14821480            set val [expr {0.01*$val}]
     
    14861484        }
    14871485        "-volumequality" {
    1488             set val $_settings(${what})
     1486            set val $_settings($what)
    14891487            set _settings($_current${what}) $val
    14901488            set val [expr {0.01*$val}]
     
    14941492        }
    14951493        "-axesvisible" {
    1496             set bool $_settings(${what})
     1494            set bool $_settings($what)
    14971495            SendCmd "axis visible all $bool"
    14981496        }
    14991497        "-axislabelsvisible" {
    1500             set bool $_settings(${what})
     1498            set bool $_settings($what)
    15011499            SendCmd "axis labels all $bool"
    15021500        }
    15031501        "-xgridvisible" - "-ygridvisible" - "-zgridvisible" {
    15041502            set axis [string tolower [string range $what 1 1 ]]
    1505             set bool $_settings(${what})
     1503            set bool $_settings($what)
    15061504            SendCmd "axis grid $axis $bool"
    15071505        }
     
    15091507            set mode [$itk_component(axismode) value]
    15101508            set mode [$itk_component(axismode) translate $mode]
    1511             set _settings(${what}) $mode
     1509            set _settings($what) $mode
    15121510            SendCmd "axis flymode $mode"
    15131511        }
    15141512        "-cutplanesvisible" {
    1515             set bool $_settings(${what})
     1513            set bool $_settings($what)
    15161514            foreach dataset [CurrentDatasets -visible] {
    15171515                SendCmd "$_cutplaneCmd visible $bool $dataset"
     
    15191517        }
    15201518        "-cutplanelighting" {
    1521             set bool $_settings(${what})
     1519            set bool $_settings($what)
    15221520            foreach dataset [CurrentDatasets -visible] {
    15231521                if {$_cutplaneCmd != "imgcutplane"} {
     
    15361534        }
    15371535        "-cutplaneopacity" {
    1538             set val $_settings(${what})
     1536            set val $_settings($what)
    15391537            set sval [expr { 0.01 * double($val) }]
    15401538            foreach dataset [CurrentDatasets -visible] {
     
    15441542        "-xcutplanevisible" - "-ycutplanevisible" - "-zcutplanevisible" {
    15451543            set axis [string tolower [string range $what 1 1]]
    1546             set bool $_settings(${what})
     1544            set bool $_settings($what)
    15471545            if { $bool } {
    15481546                $itk_component(${axis}CutScale) configure -state normal \
     
    15581556        "-xcutplaneposition" - "-ycutplaneposition" - "-zcutplaneposition" {
    15591557            set axis [string tolower [string range $what 1 1]]
    1560             set pos [expr $_settings(${what}) * 0.01]
     1558            set pos [expr $_settings($what) * 0.01]
    15611559            foreach dataset [CurrentDatasets -visible] {
    15621560                SendCmd "$_cutplaneCmd slice ${axis} ${pos} $dataset"
     
    15651563        }
    15661564        "-volumethickness" {
    1567             set _settings($_current${what}) $_settings(${what})
     1565            set _settings($_current${what}) $_settings($what)
    15681566            updateTransferFunctions
    15691567        }
    15701568        "-color" {
    15711569            set color [$itk_component(colormap) value]
    1572             set _settings(${what}) $color
     1570            set _settings($what) $color
    15731571            set _settings($_current${what}) $color
    15741572            ResetColormap $_current $color
     
    15771575            set label [$itk_component(field) value]
    15781576            set fname [$itk_component(field) translate $label]
    1579             set _settings(${what}) $fname
     1577            set _settings($what) $fname
    15801578            if { [info exists _fields($fname)] } {
    15811579                foreach { label units components } $_fields($fname) break
     
    16481646        set color $itk_option(-plotforeground)
    16491647        set rgb [Color2RGB $color]
    1650         SendCmd "axis color all $rgb"
     1648        SendCmd "axis color all $rgb"
    16511649        SendCmd "outline color $rgb"
    16521650        SendCmd "cutplane color $rgb"
Note: See TracChangeset for help on using the changeset viewer.