Changeset 5188


Ignore:
Timestamp:
Apr 2, 2015, 9:35:24 AM (10 years ago)
Author:
ldelgass
Message:

merge r5187 from 1.4 branch

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/gui/scripts/flowvisviewer.tcl

    r5184 r5188  
    732732# ----------------------------------------------------------------------
    733733itcl::body Rappture::FlowvisViewer::scale {args} {
    734     array set styles {
     734    array set style {
    735735        -color BCGYR
    736736        -levels 6
     
    747747            if { ![info exists _volcomponents($cname)] } {
    748748                lappend _componentsList $cname
    749                 array set styles [lindex [$dataobj components -style $cname] 0]
    750                 set cmap [ColorsToColormap $styles(-color)]
     749                array set style [lindex [$dataobj components -style $cname] 0]
     750                set cmap [ColorsToColormap $style(-color)]
    751751                set _cname2defaultcolormap($cname) $cmap
    752                 set _settings($cname-colormap) $styles(-color)
     752                set _settings($cname-colormap) $style(-color)
    753753            }
    754754            lappend _volcomponents($cname) $dataobj-$cname
     
    12761276    foreach key [array names _serverObjs *-*] {
    12771277        if {[string match $_first-* $key]} {
    1278             array set styles {
     1278            array set style {
    12791279                -cutplanes 1
    12801280            }
    12811281            foreach {dataobj comp} [split $key -] break
    1282             array set styles [lindex [$dataobj components -style $comp] 0]
    1283             if {$what != "-cutplanes" || $styles(-cutplanes)} {
     1282            array set style [lindex [$dataobj components -style $comp] 0]
     1283            if {$what != "-cutplanes" || $style(-cutplanes)} {
    12841284                lappend rlist $_serverObjs($key)
    12851285            }
     
    17451745#
    17461746itcl::body Rappture::FlowvisViewer::NameTransferFunc { dataobj cname } {
    1747     array set styles {
     1747    array set style {
    17481748        -color BCGYR
    17491749        -levels 6
    17501750        -opacity 0.5
    17511751    }
    1752     array set styles [lindex [$dataobj components -style $cname] 0]
    1753     set _settings($this-opacity) [expr $styles(-opacity) * 100]
     1752    array set style [lindex [$dataobj components -style $cname] 0]
     1753    set _settings($this-opacity) [expr $style(-opacity) * 100]
    17541754    set _obj2style($dataobj-$cname) $cname
    17551755    lappend _style2objs($cname) $dataobj $cname
     
    17671767#
    17681768itcl::body Rappture::FlowvisViewer::ComputeTransferFunc { tf } {
    1769     array set styles {
     1769    array set style {
    17701770        -color BCGYR
    17711771        -levels 6
     
    17771777        return 0
    17781778    }
    1779     array set styles [lindex [$dataobj components -style $comp] 0]
     1779    array set style [lindex [$dataobj components -style $comp] 0]
    17801780
    17811781    # We have to parse the style attributes for a volume using this
     
    17941794    if { ![info exists _isomarkers($tf)] } {
    17951795        # Have to defer creation of isomarkers until we have data limits
    1796         if { [info exists styles(-markers)] &&
    1797              [llength $styles(-markers)] > 0  } {
    1798             ParseMarkersOption $tf $styles(-markers)
     1796        if { [info exists style(-markers)] &&
     1797             [llength $style(-markers)] > 0  } {
     1798            ParseMarkersOption $tf $style(-markers)
    17991799        } else {
    1800             ParseLevelsOption $tf $styles(-levels)
    1801         }
    1802     }
    1803     if { [info exists styles(-nonuniformcolors)] } {
    1804         foreach { value color } $styles(-nonuniformcolors) {
     1800            ParseLevelsOption $tf $style(-levels)
     1801        }
     1802    }
     1803    if { [info exists style(-nonuniformcolors)] } {
     1804        foreach { value color } $style(-nonuniformcolors) {
    18051805            append cmap "$value [Color2RGB $color] "
    18061806        }
    18071807    } else {
    1808         set cmap [ColorsToColormap $styles(-color)]
     1808        set cmap [ColorsToColormap $style(-color)]
    18091809    }
    18101810
    18111811    if { ![info exists _settings($this-opacity)] } {
    1812         set _settings($this-opacity) [expr $styles(-opacity) * 100]
     1812        set _settings($this-opacity) [expr $style(-opacity) * 100]
    18131813    }
    18141814
  • trunk/gui/scripts/mapviewer.tcl

    r5165 r5188  
    147147    private variable _opacity
    148148    private variable _visibility
    149     private variable _style;            # Array of current component styles.
    150     private variable _initialStyle;     # Array of initial component styles.
    151149    private variable _reset 1;          # Indicates that server was reset and
    152150                                        # needs to be reinitialized.
  • trunk/gui/scripts/nanovisviewer.tcl

    r5184 r5188  
    560560# ----------------------------------------------------------------------
    561561itcl::body Rappture::NanovisViewer::scale {args} {
    562     array set styles {
     562    array set style {
    563563        -color    BCGYR
    564564        -levels   6
     
    574574            if { ![info exists _volcomponents($cname)] } {
    575575                lappend _componentsList $cname
    576                 array set styles [lindex [$dataobj components -style $cname] 0]
    577                 set cmap [ColorsToColormap $styles(-color)]
     576                array set style [lindex [$dataobj components -style $cname] 0]
     577                set cmap [ColorsToColormap $style(-color)]
    578578                set _cname2defaultcolormap($cname) $cmap
    579                 set _settings($cname-colormap) $styles(-color)
     579                set _settings($cname-colormap) $style(-color)
    580580            }
    581581            lappend _volcomponents($cname) $dataobj-$cname
     
    10381038        set tag $_first-$cname
    10391039        if { [info exists _serverDatasets($tag)] && $_serverDatasets($tag) } {
    1040             array set styles {
     1040            array set style {
    10411041                -cutplanes 1
    10421042            }
    1043             array set styles [lindex [$_first components -style $cname] 0]
    1044             if { $what != "-cutplanes" || $styles(-cutplanes) } {
     1043            array set style [lindex [$_first components -style $cname] 0]
     1044            if { $what != "-cutplanes" || $style(-cutplanes) } {
    10451045                lappend rlist $tag
    10461046            }
     
    14131413#
    14141414itcl::body Rappture::NanovisViewer::NameTransferFunction { dataobj cname } {
    1415     array set styles {
     1415    array set style {
    14161416        -color BCGYR
    14171417        -levels 6
     
    14191419    }
    14201420    set tag $dataobj-$cname
    1421     array set styles [lindex [$dataobj components -style $cname] 0]
     1421    array set style [lindex [$dataobj components -style $cname] 0]
    14221422    if { ![info exists _cname2transferFunction($cname)] } {
    14231423        # Get the colormap right now, since it doesn't change with marker
    14241424        # changes.
    1425         set cmap [ColorsToColormap $styles(-color)]
     1425        set cmap [ColorsToColormap $style(-color)]
    14261426        set amap [list 0.0 0.0 1.0 1.0]
    14271427        set _cname2transferFunction($cname) [list $cmap $amap]
     
    14591459    # reference.
    14601460    if { ![info exists _parsedFunction($cname)] } {
    1461         array set styles {
     1461        array set style {
    14621462            -color BCGYR
    14631463            -levels 6
     
    14671467        foreach tag [GetDatasetsWithComponent $cname] {
    14681468            foreach {dataobj cname} [split [lindex $tag 0] -] break
    1469             array set styles [lindex [$dataobj components -style $cname] 0]
     1469            array set style [lindex [$dataobj components -style $cname] 0]
    14701470        }
    14711471        eval $_transferFunctionEditors($cname) limits $_limits($cname)
    14721472        # Have to defer creation of isomarkers until we have data limits
    1473         if { [info exists styles(-markers)] &&
    1474              [llength $styles(-markers)] > 0 } {
    1475             ParseMarkersOption $cname $styles(-markers)
     1473        if { [info exists style(-markers)] &&
     1474             [llength $style(-markers)] > 0 } {
     1475            ParseMarkersOption $cname $style(-markers)
    14761476        } else {
    1477             ParseLevelsOption $cname $styles(-levels)
     1477            ParseLevelsOption $cname $style(-levels)
    14781478        }
    14791479
  • trunk/gui/scripts/vtkglyphviewer.tcl

    r5184 r5188  
    129129    private variable _view         ;    # view params for 3D view
    130130    private variable _settings
    131     private variable _style;            # Array of current component styles.
    132131    private variable _changed
    133     private variable _initialStyle;     # Array of initial component styles.
    134132    private variable _reset 1;          # Connection to server has been reset.
    135133
  • trunk/gui/scripts/vtkheightmapviewer.tcl

    r5184 r5188  
    138138    private variable _settings
    139139    private variable _changed
    140     private variable _initialStyle "";  # First found style in dataobjects.
    141140    private variable _reset 1;          # Connection to server has been reset.
    142141
  • trunk/gui/scripts/vtkimageviewer.tcl

    r5184 r5188  
    133133    private variable _settings
    134134    private variable _changed
    135     private variable _initialStyle "";  # First found style in dataobjects.
    136135    private variable _reset 1;          # Connection to server has been reset.
    137136
  • trunk/gui/scripts/vtkisosurfaceviewer.tcl

    r5184 r5188  
    146146    private variable _view         ;    # view params for 3D view
    147147    private variable _settings
    148     private variable _style;            # Array of current component styles.
    149148    private variable _changed
    150     private variable _initialStyle;     # Array of initial component styles.
    151149    private variable _reset 1;          # Connection to server has been reset.
    152150
  • trunk/gui/scripts/vtkmeshviewer.tcl

    r5156 r5188  
    113113    private variable _settings
    114114    private variable _widget
    115     private variable _style;            # Array of current component styles.
    116     private variable _initialStyle;     # Array of initial component styles.
    117115    private variable _reset 1;          # Connection to server has been reset.
    118116
  • trunk/gui/scripts/vtksurfaceviewer.tcl

    r5184 r5188  
    129129    private variable _view         ;    # view params for 3D view
    130130    private variable _settings
    131     private variable _style;            # Array of current component styles.
    132131    private variable _changed
    133     private variable _initialStyle;     # Array of initial component styles.
    134132    private variable _reset 1;          # Connection to server has been reset.
    135133
  • trunk/gui/scripts/vtkvolumeviewer.tcl

    r5156 r5188  
    153153    private variable _view         ;    # view params for 3D view
    154154    private variable _settings
    155     private variable _style;            # Array of current component styles.
    156     private variable _initialStyle;     # Array of initial component styles.
    157155    private variable _reset 1;          # Connection to server has been reset.
    158156
     
    22362234    # Parse style string.
    22372235    set tag $dataobj-$cname
    2238     array set styles {
     2236    array set style {
    22392237        -color      BCGYR
    22402238        -lighting   1
     
    22432241        -visible    1
    22442242    }
    2245     array set styles [$dataobj style $cname]
    2246     set _settings($cname-volumelighting)        $styles(-lighting)
    2247     set _settings($cname-volumeopacity)         [expr $styles(-opacity) * 100]
    2248     set _settings($cname-volumeoutline)         $styles(-outline)
    2249     set _settings($cname-volumevisible)         $styles(-visible)
     2243    array set style [$dataobj style $cname]
     2244    set _settings($cname-volumelighting)        $style(-lighting)
     2245    set _settings($cname-volumeopacity)         [expr $style(-opacity) * 100]
     2246    set _settings($cname-volumeoutline)         $style(-outline)
     2247    set _settings($cname-volumevisible)         $style(-visible)
    22502248
    22512249    $itk_component(colormap) value $styles(-color)
     
    22532251    SendCmd "outline add $tag"
    22542252    SendCmd "outline color [Color2RGB $itk_option(-plotforeground)] $tag"
    2255     SendCmd "outline visible $styles(-outline) $tag"
     2253    SendCmd "outline visible $style(-outline) $tag"
    22562254
    22572255    SendCmd "$_cutplaneCmd add $tag"
     
    22602258
    22612259    SendCmd "volume add $tag"
    2262     SendCmd "volume lighting $styles(-lighting) $tag"
    2263     SendCmd "volume opacity $styles(-opacity) $tag"
    2264     SendCmd "volume visible $styles(-visible) $tag"
     2260    SendCmd "volume lighting $style(-lighting) $tag"
     2261    SendCmd "volume opacity $style(-opacity) $tag"
     2262    SendCmd "volume visible $style(-visible) $tag"
    22652263
    22662264    SetInitialTransferFunction $dataobj $cname
Note: See TracChangeset for help on using the changeset viewer.