Changeset 4709 for trunk


Ignore:
Timestamp:
Nov 12, 2014 10:04:55 PM (5 years ago)
Author:
ldelgass
Message:

Some changes to sync nanovis viewer with release branch

File:
1 edited

Legend:

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

    r4686 r4709  
    221221        -axesvisible            1
    222222        -background             black
    223         -colormap               default
     223        -colormap               "default"
    224224        -cutplanesvisible       0
    225225        -diffuse                40
     
    557557itcl::body Rappture::NanovisViewer::scale {args} {
    558558    array set styles {
    559         -color BCGYR
    560         -levels 6
    561         -markers ""
     559        -color    BCGYR
     560        -levels   6
     561        -markers  ""
    562562    }
    563563    array unset _limits
     
    911911        DoResize
    912912    }
     913
    913914    foreach dataobj [get] {
    914915        foreach cname [$dataobj components] {
     
    17081709    $inner configure -borderwidth 4
    17091710
    1710     set font [option get $itk_component(hull) font Font]
    1711     #set bfont [option get $itk_component(hull) boldFont Font]
     1711    set fg [option get $itk_component(hull) font Font]
     1712    #set bfg [option get $itk_component(hull) boldFont Font]
    17121713
    17131714    label $inner.lighting_l \
     
    17151716        -font "Arial 9 bold"
    17161717
    1717     checkbutton $inner.light2side \
    1718         -text "Two-sided lighting" \
    1719         -font $font \
     1718    checkbutton $inner.light2side -text "Two-sided lighting" -font $fg \
    17201719        -variable [itcl::scope _settings(-light2side)] \
    17211720        -command [itcl::code $this AdjustSetting -light2side]
    17221721
    1723     checkbutton $inner.visibility \
    1724         -text "Visible" \
    1725         -font $font \
     1722    checkbutton $inner.visibility -text "Visible" -font $fg \
    17261723        -variable [itcl::scope _settings(-volumevisible)] \
    17271724        -command [itcl::code $this AdjustSetting -volumevisible] \
    17281725
    1729     label $inner.ambient_l \
    1730         -text "Ambient" \
    1731         -font $font
     1726    label $inner.ambient_l -text "Ambient" -font $fg
    17321727    ::scale $inner.ambient -from 0 -to 100 -orient horizontal \
    17331728        -variable [itcl::scope _settings(-ambient)] \
     
    17351730        -troughcolor grey92
    17361731
    1737     label $inner.diffuse_l -text "Diffuse" -font $font
     1732    label $inner.diffuse_l -text "Diffuse" -font $fg
    17381733    ::scale $inner.diffuse -from 0 -to 100 -orient horizontal \
    17391734        -variable [itcl::scope _settings(-diffuse)] \
     
    17411736        -troughcolor grey92
    17421737
    1743     label $inner.specularLevel_l -text "Specular" -font $font
     1738    label $inner.specularLevel_l -text "Specular" -font $fg
    17441739    ::scale $inner.specularLevel -from 0 -to 100 -orient horizontal \
    17451740        -variable [itcl::scope _settings(-specularlevel)] \
     
    17481743        -troughcolor grey92
    17491744
    1750     label $inner.specularExponent_l -text "Shininess" -font $font
     1745    label $inner.specularExponent_l -text "Shininess" -font $fg
    17511746    ::scale $inner.specularExponent -from 10 -to 128 -orient horizontal \
    17521747        -variable [itcl::scope _settings(-specularexponent)] \
     
    17551750        -troughcolor grey92
    17561751
    1757     label $inner.opacity_l -text "Opacity" -font $font
     1752    label $inner.opacity_l -text "Opacity" -font $fg
    17581753    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    17591754        -variable [itcl::scope _settings(-opacity)] \
     
    17641759        -text "Transfer Function" -font "Arial 9 bold"
    17651760
    1766     label $inner.thin -text "Thin" -font $font
     1761    label $inner.thin -text "Thin" -font $fg
    17671762    ::scale $inner.thickness -from 0 -to 1000 -orient horizontal \
    17681763        -variable [itcl::scope _settings(-thickness)] \
     
    17701765        -troughcolor grey92
    17711766
    1772     label $inner.thick -text "Thick" -font $font
    1773 
    1774     label $inner.colormap_l -text "Colormap" -font $font
     1767    label $inner.thick -text "Thick" -font $fg
     1768
     1769    label $inner.colormap_l -text "Colormap" -font $fg
    17751770    itk_component add colormap {
    17761771        Rappture::Combobox $inner.colormap -width 10 -editable no
     
    17831778    set _settings(-colormap) "default"
    17841779
    1785     label $inner.volcomponents_l -text "Component" -font $font
     1780    label $inner.volcomponents_l -text "Component" -font $fg
    17861781    itk_component add volcomponents {
    17871782        Rappture::Combobox $inner.volcomponents -editable no
     
    21552150# InitComponentSettings --
    21562151#
    2157 #       Initializes the volume settings for a specific component. This
    2158 #       should match what's used as global settings above. This
    2159 #       is called the first time we try to switch to a given component
    2160 #       in SwitchComponent below.
     2152#    Initializes the volume settings for a specific component. This should
     2153#    match what's used as global settings above. This is called the first
     2154#    time we try to switch to a given component in SwitchComponent below.
    21612155#
    21622156itcl::body Rappture::NanovisViewer::InitComponentSettings { cname } {
     
    21782172# SwitchComponent --
    21792173#
    2180 #       This is called when the current component is changed by the
    2181 #       dropdown menu in the volume tab.  It synchronizes the global
    2182 #       volume settings with the settings of the new current component.
     2174#    This is called when the current component is changed by the dropdown
     2175#    menu in the volume tab.  It synchronizes the global volume settings
     2176#    with the settings of the new current component.
    21832177#
    21842178itcl::body Rappture::NanovisViewer::SwitchComponent { cname } {
     
    22032197# BuildVolumeComponents --
    22042198#
    2205 #       This is called from the "scale" method which is called when a
    2206 #       new dataset is added or deleted.  It repopulates the dropdown
    2207 #       menu of volume component names.  It sets the current component
    2208 #       to the first component in the list (of components found).
    2209 #       Finally, if there is only one component, don't display the
    2210 #       label or the combobox in the volume settings tab.
     2199#    This is called from the "scale" method which is called when a new
     2200#    dataset is added or deleted.  It repopulates the dropdown menu of
     2201#    volume component names.  It sets the current component to the first
     2202#    component in the list (of components found).  Finally, if there is
     2203#    only one component, don't display the label or the combobox in the
     2204#    volume settings tab.
    22112205#
    22122206itcl::body Rappture::NanovisViewer::BuildVolumeComponents {} {
     
    22342228# GetDatasetsWithComponents --
    22352229#
    2236 #       Returns a list of all the datasets (known by the combination of
    2237 #       their data object and component name) that match the given
    2238 #       component name.  For example, this is used where we want to change
    2239 #       the settings of volumes that have the current component.
     2230#    Returns a list of all the datasets (known by the combination of their
     2231#    data object and component name) that match the given component name.
     2232#    For example, this is used where we want to change the settings of
     2233#    volumes that have the current component.
    22402234#
    22412235itcl::body Rappture::NanovisViewer::GetDatasetsWithComponent { cname } {
     
    22562250# HideAllMarkers --
    22572251#
    2258 #       Hide all the markers in all the transfer functions.  Can't simply
    2259 #       delete and recreate markers from the <style> since the user may
    2260 #       have create, deleted, or moved markers.
     2252#    Hide all the markers in all the transfer functions.  Can't simply
     2253#    delete and recreate markers from the <style> since the user may have
     2254#    created, deleted, or moved markers.
    22612255#
    22622256itcl::body Rappture::NanovisViewer::HideAllMarkers {} {
Note: See TracChangeset for help on using the changeset viewer.