Changeset 5187 for branches/1.4/gui/scripts/flowvisviewer.tcl
- Timestamp:
- Apr 2, 2015, 9:28:24 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.4/gui/scripts/flowvisviewer.tcl
r5183 r5187 717 717 # ---------------------------------------------------------------------- 718 718 itcl::body Rappture::FlowvisViewer::scale {args} { 719 array set style s{719 array set style { 720 720 -color BCGYR 721 721 -levels 6 … … 732 732 if { ![info exists _volcomponents($cname)] } { 733 733 lappend _componentsList $cname 734 array set style s[lindex [$dataobj components -style $cname] 0]735 set cmap [ColorsToColormap $style s(-color)]734 array set style [lindex [$dataobj components -style $cname] 0] 735 set cmap [ColorsToColormap $style(-color)] 736 736 set _cname2defaultcolormap($cname) $cmap 737 set _settings($cname-colormap) $style s(-color)737 set _settings($cname-colormap) $style(-color) 738 738 } 739 739 lappend _volcomponents($cname) $dataobj-$cname … … 1255 1255 foreach key [array names _serverObjs *-*] { 1256 1256 if {[string match $_first-* $key]} { 1257 array set style s{1257 array set style { 1258 1258 -cutplanes 1 1259 1259 } 1260 1260 foreach {dataobj comp} [split $key -] break 1261 array set style s[lindex [$dataobj components -style $comp] 0]1262 if {$what != "-cutplanes" || $style s(-cutplanes)} {1261 array set style [lindex [$dataobj components -style $comp] 0] 1262 if {$what != "-cutplanes" || $style(-cutplanes)} { 1263 1263 lappend rlist $_serverObjs($key) 1264 1264 } … … 1694 1694 # 1695 1695 itcl::body Rappture::FlowvisViewer::NameTransferFunc { dataobj cname } { 1696 array set style s{1696 array set style { 1697 1697 -color BCGYR 1698 1698 -levels 6 1699 1699 -opacity 0.5 1700 1700 } 1701 array set style s[lindex [$dataobj components -style $cname] 0]1702 set _settings($this-opacity) [expr $style s(-opacity) * 100]1701 array set style [lindex [$dataobj components -style $cname] 0] 1702 set _settings($this-opacity) [expr $style(-opacity) * 100] 1703 1703 set _obj2style($dataobj-$cname) $cname 1704 1704 lappend _style2objs($cname) $dataobj $cname … … 1716 1716 # 1717 1717 itcl::body Rappture::FlowvisViewer::ComputeTransferFunc { tf } { 1718 array set style s{1718 array set style { 1719 1719 -color BCGYR 1720 1720 -levels 6 … … 1726 1726 return 0 1727 1727 } 1728 array set style s[lindex [$dataobj components -style $comp] 0]1728 array set style [lindex [$dataobj components -style $comp] 0] 1729 1729 1730 1730 # We have to parse the style attributes for a volume using this … … 1743 1743 if { ![info exists _isomarkers($tf)] } { 1744 1744 # Have to defer creation of isomarkers until we have data limits 1745 if { [info exists style s(-markers)] &&1746 [llength $style s(-markers)] > 0 } {1747 ParseMarkersOption $tf $style s(-markers)1745 if { [info exists style(-markers)] && 1746 [llength $style(-markers)] > 0 } { 1747 ParseMarkersOption $tf $style(-markers) 1748 1748 } else { 1749 ParseLevelsOption $tf $style s(-levels)1750 } 1751 } 1752 if { [info exists style s(-nonuniformcolors)] } {1753 foreach { value color } $style s(-nonuniformcolors) {1749 ParseLevelsOption $tf $style(-levels) 1750 } 1751 } 1752 if { [info exists style(-nonuniformcolors)] } { 1753 foreach { value color } $style(-nonuniformcolors) { 1754 1754 append cmap "$value [Color2RGB $color] " 1755 1755 } 1756 1756 } else { 1757 set cmap [ColorsToColormap $style s(-color)]1757 set cmap [ColorsToColormap $style(-color)] 1758 1758 } 1759 1759 1760 1760 if { ![info exists _settings($this-opacity)] } { 1761 set _settings($this-opacity) [expr $style s(-opacity) * 100]1761 set _settings($this-opacity) [expr $style(-opacity) * 100] 1762 1762 } 1763 1763
Note: See TracChangeset
for help on using the changeset viewer.