Changeset 4404


Ignore:
Timestamp:
Jun 20, 2014, 8:28:56 PM (5 years ago)
Author:
ldelgass
Message:

s/style/styles

Location:
trunk/gui/scripts
Files:
2 edited

Legend:

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

    r4402 r4404  
    736736# ----------------------------------------------------------------------
    737737itcl::body Rappture::FlowvisViewer::scale {args} {
    738     array set style {
     738    array set styles {
    739739        -color BCGYR
    740740        -levels 6
     
    751751            if { ![info exists _volcomponents($cname)] } {
    752752                lappend _componentsList $cname
    753                 array set style [lindex [$dataobj components -style $cname] 0]
    754                 set cmap [ColorsToColormap $style(-color)]
     753                array set styles [lindex [$dataobj components -style $cname] 0]
     754                set cmap [ColorsToColormap $styles(-color)]
    755755                set _cname2defaultcolormap($cname) $cmap
    756                 set _settings($cname-colormap) $style(-color)
     756                set _settings($cname-colormap) $styles(-color)
    757757            }
    758758            lappend _volcomponents($cname) $dataobj-$cname
     
    12791279    foreach key [array names _serverObjs *-*] {
    12801280        if {[string match $_first-* $key]} {
    1281             array set style {
     1281            array set styles {
    12821282                -cutplanes 1
    12831283            }
    12841284            foreach {dataobj comp} [split $key -] break
    1285             array set style [lindex [$dataobj components -style $comp] 0]
    1286             if {$what != "-cutplanes" || $style(-cutplanes)} {
     1285            array set styles [lindex [$dataobj components -style $comp] 0]
     1286            if {$what != "-cutplanes" || $styles(-cutplanes)} {
    12871287                lappend rlist $_serverObjs($key)
    12881288            }
     
    17571757#
    17581758itcl::body Rappture::FlowvisViewer::NameTransferFunc { dataobj cname } {
    1759     array set style {
     1759    array set styles {
    17601760        -color BCGYR
    17611761        -levels 6
     
    17641764        -transp 50
    17651765    }
    1766     array set style [lindex [$dataobj components -style $cname] 0]
    1767     set _settings($this-light) $style(-light)
    1768     set _settings($this-transp) $style(-transp)
    1769     set _settings($this-opacity) [expr $style(-opacity) * 100]
     1766    array set styles [lindex [$dataobj components -style $cname] 0]
     1767    set _settings($this-light) $styles(-light)
     1768    set _settings($this-transp) $styles(-transp)
     1769    set _settings($this-opacity) [expr $styles(-opacity) * 100]
    17701770    set _obj2style($dataobj-$cname) $cname
    17711771    lappend _style2objs($cname) $dataobj $cname
     
    17831783#
    17841784itcl::body Rappture::FlowvisViewer::ComputeTransferFunc { tf } {
    1785     array set style {
     1785    array set styles {
    17861786        -color BCGYR
    17871787        -levels 6
     
    17951795        return 0
    17961796    }
    1797     array set style [lindex [$dataobj components -style $comp] 0]
     1797    array set styles [lindex [$dataobj components -style $comp] 0]
    17981798
    17991799
     
    18131813    if { ![info exists _isomarkers($tf)] } {
    18141814        # Have to defer creation of isomarkers until we have data limits
    1815         if { [info exists style(-markers)] &&
    1816              [llength $style(-markers)] > 0  } {
    1817             ParseMarkersOption $tf $style(-markers)
     1815        if { [info exists styles(-markers)] &&
     1816             [llength $styles(-markers)] > 0  } {
     1817            ParseMarkersOption $tf $styles(-markers)
    18181818        } else {
    1819             ParseLevelsOption $tf $style(-levels)
    1820         }
    1821     }
    1822     if { [info exists style(-nonuniformcolors)] } {
    1823         foreach { value color } $style(-nonuniformcolors) {
     1819            ParseLevelsOption $tf $styles(-levels)
     1820        }
     1821    }
     1822    if { [info exists styles(-nonuniformcolors)] } {
     1823        foreach { value color } $styles(-nonuniformcolors) {
    18241824            append cmap "$value [Color2RGB $color] "
    18251825        }
    18261826    } else {
    1827         set cmap [ColorsToColormap $style(-color)]
     1827        set cmap [ColorsToColormap $styles(-color)]
    18281828    }
    18291829    set tag $this-$tf
    18301830    if { ![info exists _settings($tag-opacity)] } {
    1831         set _settings($tag-opacity) $style(-opacity)
     1831        set _settings($tag-opacity) $styles(-opacity)
    18321832    }
    18331833    set max 1.0 ;#$_settings($tag-opacity)
  • trunk/gui/scripts/nanovisviewer.tcl

    r4402 r4404  
    557557# ----------------------------------------------------------------------
    558558itcl::body Rappture::NanovisViewer::scale {args} {
    559     array set style {
     559    array set styles {
    560560        -color BCGYR
    561561        -levels 6
     
    571571            if { ![info exists _volcomponents($cname)] } {
    572572                lappend _componentsList $cname
    573                 array set style [lindex [$dataobj components -style $cname] 0]
    574                 set cmap [ColorsToColormap $style(-color)]
     573                array set styles [lindex [$dataobj components -style $cname] 0]
     574                set cmap [ColorsToColormap $styles(-color)]
    575575                set _cname2defaultcolormap($cname) $cmap
    576                 set _settings($cname-colormap) $style(-color)
     576                set _settings($cname-colormap) $styles(-color)
    577577            }
    578578            lappend _volcomponents($cname) $dataobj-$cname
     
    10551055        set tag $_first-$cname
    10561056        if { [info exists _serverDatasets($tag)] && $_serverDatasets($tag) } {
    1057             array set style {
     1057            array set styles {
    10581058                -cutplanes 1
    10591059            }
    1060             array set style [lindex [$_first components -style $cname] 0]
    1061             if { $what != "-cutplanes" || $style(-cutplanes) } {
     1060            array set styles [lindex [$_first components -style $cname] 0]
     1061            if { $what != "-cutplanes" || $styles(-cutplanes) } {
    10621062                lappend rlist $tag
    10631063            }
     
    14281428#
    14291429itcl::body Rappture::NanovisViewer::NameTransferFunction { dataobj cname } {
    1430     array set style {
     1430    array set styles {
    14311431        -color BCGYR
    14321432        -levels 6
     
    14341434    }
    14351435    set tag $dataobj-$cname
    1436     array set style [lindex [$dataobj components -style $cname] 0]
     1436    array set styles [lindex [$dataobj components -style $cname] 0]
    14371437    if { ![info exists _cname2transferFunction($cname)] } {
    14381438        # Get the colormap right now, since it doesn't change with marker
    14391439        # changes.
    1440         set cmap [ColorsToColormap $style(-color)]
     1440        set cmap [ColorsToColormap $styles(-color)]
    14411441        set wmap [list 0.0 0.0 1.0 1.0]
    14421442        set _cname2transferFunction($cname) [list $cmap $wmap]
     
    14741474    # reference.
    14751475    if { ![info exists _parsedFunction($cname)] } {
    1476         array set style {
     1476        array set styles {
    14771477            -color BCGYR
    14781478            -levels 6
     
    14821482        foreach tag [GetDatasetsWithComponent $cname] {
    14831483            foreach {dataobj cname} [split [lindex $tag 0] -] break
    1484             array set style [lindex [$dataobj components -style $cname] 0]
     1484            array set styles [lindex [$dataobj components -style $cname] 0]
    14851485        }
    14861486        eval $_transferFunctionEditors($cname) limits $_limits($cname)
    14871487        # Have to defer creation of isomarkers until we have data limits
    1488         if { [info exists style(-markers)] &&
    1489              [llength $style(-markers)] > 0 } {
    1490             ParseMarkersOption $cname $style(-markers)
     1488        if { [info exists styles(-markers)] &&
     1489             [llength $styles(-markers)] > 0 } {
     1490            ParseMarkersOption $cname $styles(-markers)
    14911491        } else {
    1492             ParseLevelsOption $cname $style(-levels)
     1492            ParseLevelsOption $cname $styles(-levels)
    14931493        }
    14941494       
Note: See TracChangeset for help on using the changeset viewer.