Changeset 4404
- Timestamp:
- Jun 20, 2014, 5:28:56 PM (10 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/flowvisviewer.tcl
r4402 r4404 736 736 # ---------------------------------------------------------------------- 737 737 itcl::body Rappture::FlowvisViewer::scale {args} { 738 array set style {738 array set styles { 739 739 -color BCGYR 740 740 -levels 6 … … 751 751 if { ![info exists _volcomponents($cname)] } { 752 752 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)] 755 755 set _cname2defaultcolormap($cname) $cmap 756 set _settings($cname-colormap) $style (-color)756 set _settings($cname-colormap) $styles(-color) 757 757 } 758 758 lappend _volcomponents($cname) $dataobj-$cname … … 1279 1279 foreach key [array names _serverObjs *-*] { 1280 1280 if {[string match $_first-* $key]} { 1281 array set style {1281 array set styles { 1282 1282 -cutplanes 1 1283 1283 } 1284 1284 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)} { 1287 1287 lappend rlist $_serverObjs($key) 1288 1288 } … … 1757 1757 # 1758 1758 itcl::body Rappture::FlowvisViewer::NameTransferFunc { dataobj cname } { 1759 array set style {1759 array set styles { 1760 1760 -color BCGYR 1761 1761 -levels 6 … … 1764 1764 -transp 50 1765 1765 } 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] 1770 1770 set _obj2style($dataobj-$cname) $cname 1771 1771 lappend _style2objs($cname) $dataobj $cname … … 1783 1783 # 1784 1784 itcl::body Rappture::FlowvisViewer::ComputeTransferFunc { tf } { 1785 array set style {1785 array set styles { 1786 1786 -color BCGYR 1787 1787 -levels 6 … … 1795 1795 return 0 1796 1796 } 1797 array set style [lindex [$dataobj components -style $comp] 0]1797 array set styles [lindex [$dataobj components -style $comp] 0] 1798 1798 1799 1799 … … 1813 1813 if { ![info exists _isomarkers($tf)] } { 1814 1814 # 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) 1818 1818 } 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) { 1824 1824 append cmap "$value [Color2RGB $color] " 1825 1825 } 1826 1826 } else { 1827 set cmap [ColorsToColormap $style (-color)]1827 set cmap [ColorsToColormap $styles(-color)] 1828 1828 } 1829 1829 set tag $this-$tf 1830 1830 if { ![info exists _settings($tag-opacity)] } { 1831 set _settings($tag-opacity) $style (-opacity)1831 set _settings($tag-opacity) $styles(-opacity) 1832 1832 } 1833 1833 set max 1.0 ;#$_settings($tag-opacity) -
trunk/gui/scripts/nanovisviewer.tcl
r4402 r4404 557 557 # ---------------------------------------------------------------------- 558 558 itcl::body Rappture::NanovisViewer::scale {args} { 559 array set style {559 array set styles { 560 560 -color BCGYR 561 561 -levels 6 … … 571 571 if { ![info exists _volcomponents($cname)] } { 572 572 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)] 575 575 set _cname2defaultcolormap($cname) $cmap 576 set _settings($cname-colormap) $style (-color)576 set _settings($cname-colormap) $styles(-color) 577 577 } 578 578 lappend _volcomponents($cname) $dataobj-$cname … … 1055 1055 set tag $_first-$cname 1056 1056 if { [info exists _serverDatasets($tag)] && $_serverDatasets($tag) } { 1057 array set style {1057 array set styles { 1058 1058 -cutplanes 1 1059 1059 } 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) } { 1062 1062 lappend rlist $tag 1063 1063 } … … 1428 1428 # 1429 1429 itcl::body Rappture::NanovisViewer::NameTransferFunction { dataobj cname } { 1430 array set style {1430 array set styles { 1431 1431 -color BCGYR 1432 1432 -levels 6 … … 1434 1434 } 1435 1435 set tag $dataobj-$cname 1436 array set style [lindex [$dataobj components -style $cname] 0]1436 array set styles [lindex [$dataobj components -style $cname] 0] 1437 1437 if { ![info exists _cname2transferFunction($cname)] } { 1438 1438 # Get the colormap right now, since it doesn't change with marker 1439 1439 # changes. 1440 set cmap [ColorsToColormap $style (-color)]1440 set cmap [ColorsToColormap $styles(-color)] 1441 1441 set wmap [list 0.0 0.0 1.0 1.0] 1442 1442 set _cname2transferFunction($cname) [list $cmap $wmap] … … 1474 1474 # reference. 1475 1475 if { ![info exists _parsedFunction($cname)] } { 1476 array set style {1476 array set styles { 1477 1477 -color BCGYR 1478 1478 -levels 6 … … 1482 1482 foreach tag [GetDatasetsWithComponent $cname] { 1483 1483 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] 1485 1485 } 1486 1486 eval $_transferFunctionEditors($cname) limits $_limits($cname) 1487 1487 # 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) 1491 1491 } else { 1492 ParseLevelsOption $cname $style (-levels)1492 ParseLevelsOption $cname $styles(-levels) 1493 1493 } 1494 1494
Note: See TracChangeset
for help on using the changeset viewer.