Changeset 5188
- Timestamp:
- Apr 2, 2015, 9:35:24 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/1.4 merged: 5187
- Property svn:mergeinfo changed
-
trunk/gui/scripts/flowvisviewer.tcl
r5184 r5188 732 732 # ---------------------------------------------------------------------- 733 733 itcl::body Rappture::FlowvisViewer::scale {args} { 734 array set style s{734 array set style { 735 735 -color BCGYR 736 736 -levels 6 … … 747 747 if { ![info exists _volcomponents($cname)] } { 748 748 lappend _componentsList $cname 749 array set style s[lindex [$dataobj components -style $cname] 0]750 set cmap [ColorsToColormap $style s(-color)]749 array set style [lindex [$dataobj components -style $cname] 0] 750 set cmap [ColorsToColormap $style(-color)] 751 751 set _cname2defaultcolormap($cname) $cmap 752 set _settings($cname-colormap) $style s(-color)752 set _settings($cname-colormap) $style(-color) 753 753 } 754 754 lappend _volcomponents($cname) $dataobj-$cname … … 1276 1276 foreach key [array names _serverObjs *-*] { 1277 1277 if {[string match $_first-* $key]} { 1278 array set style s{1278 array set style { 1279 1279 -cutplanes 1 1280 1280 } 1281 1281 foreach {dataobj comp} [split $key -] break 1282 array set style s[lindex [$dataobj components -style $comp] 0]1283 if {$what != "-cutplanes" || $style s(-cutplanes)} {1282 array set style [lindex [$dataobj components -style $comp] 0] 1283 if {$what != "-cutplanes" || $style(-cutplanes)} { 1284 1284 lappend rlist $_serverObjs($key) 1285 1285 } … … 1745 1745 # 1746 1746 itcl::body Rappture::FlowvisViewer::NameTransferFunc { dataobj cname } { 1747 array set style s{1747 array set style { 1748 1748 -color BCGYR 1749 1749 -levels 6 1750 1750 -opacity 0.5 1751 1751 } 1752 array set style s[lindex [$dataobj components -style $cname] 0]1753 set _settings($this-opacity) [expr $style s(-opacity) * 100]1752 array set style [lindex [$dataobj components -style $cname] 0] 1753 set _settings($this-opacity) [expr $style(-opacity) * 100] 1754 1754 set _obj2style($dataobj-$cname) $cname 1755 1755 lappend _style2objs($cname) $dataobj $cname … … 1767 1767 # 1768 1768 itcl::body Rappture::FlowvisViewer::ComputeTransferFunc { tf } { 1769 array set style s{1769 array set style { 1770 1770 -color BCGYR 1771 1771 -levels 6 … … 1777 1777 return 0 1778 1778 } 1779 array set style s[lindex [$dataobj components -style $comp] 0]1779 array set style [lindex [$dataobj components -style $comp] 0] 1780 1780 1781 1781 # We have to parse the style attributes for a volume using this … … 1794 1794 if { ![info exists _isomarkers($tf)] } { 1795 1795 # Have to defer creation of isomarkers until we have data limits 1796 if { [info exists style s(-markers)] &&1797 [llength $style s(-markers)] > 0 } {1798 ParseMarkersOption $tf $style s(-markers)1796 if { [info exists style(-markers)] && 1797 [llength $style(-markers)] > 0 } { 1798 ParseMarkersOption $tf $style(-markers) 1799 1799 } else { 1800 ParseLevelsOption $tf $style s(-levels)1801 } 1802 } 1803 if { [info exists style s(-nonuniformcolors)] } {1804 foreach { value color } $style s(-nonuniformcolors) {1800 ParseLevelsOption $tf $style(-levels) 1801 } 1802 } 1803 if { [info exists style(-nonuniformcolors)] } { 1804 foreach { value color } $style(-nonuniformcolors) { 1805 1805 append cmap "$value [Color2RGB $color] " 1806 1806 } 1807 1807 } else { 1808 set cmap [ColorsToColormap $style s(-color)]1808 set cmap [ColorsToColormap $style(-color)] 1809 1809 } 1810 1810 1811 1811 if { ![info exists _settings($this-opacity)] } { 1812 set _settings($this-opacity) [expr $style s(-opacity) * 100]1812 set _settings($this-opacity) [expr $style(-opacity) * 100] 1813 1813 } 1814 1814 -
trunk/gui/scripts/mapviewer.tcl
r5165 r5188 147 147 private variable _opacity 148 148 private variable _visibility 149 private variable _style; # Array of current component styles.150 private variable _initialStyle; # Array of initial component styles.151 149 private variable _reset 1; # Indicates that server was reset and 152 150 # needs to be reinitialized. -
trunk/gui/scripts/nanovisviewer.tcl
r5184 r5188 560 560 # ---------------------------------------------------------------------- 561 561 itcl::body Rappture::NanovisViewer::scale {args} { 562 array set style s{562 array set style { 563 563 -color BCGYR 564 564 -levels 6 … … 574 574 if { ![info exists _volcomponents($cname)] } { 575 575 lappend _componentsList $cname 576 array set style s[lindex [$dataobj components -style $cname] 0]577 set cmap [ColorsToColormap $style s(-color)]576 array set style [lindex [$dataobj components -style $cname] 0] 577 set cmap [ColorsToColormap $style(-color)] 578 578 set _cname2defaultcolormap($cname) $cmap 579 set _settings($cname-colormap) $style s(-color)579 set _settings($cname-colormap) $style(-color) 580 580 } 581 581 lappend _volcomponents($cname) $dataobj-$cname … … 1038 1038 set tag $_first-$cname 1039 1039 if { [info exists _serverDatasets($tag)] && $_serverDatasets($tag) } { 1040 array set style s{1040 array set style { 1041 1041 -cutplanes 1 1042 1042 } 1043 array set style s[lindex [$_first components -style $cname] 0]1044 if { $what != "-cutplanes" || $style s(-cutplanes) } {1043 array set style [lindex [$_first components -style $cname] 0] 1044 if { $what != "-cutplanes" || $style(-cutplanes) } { 1045 1045 lappend rlist $tag 1046 1046 } … … 1413 1413 # 1414 1414 itcl::body Rappture::NanovisViewer::NameTransferFunction { dataobj cname } { 1415 array set style s{1415 array set style { 1416 1416 -color BCGYR 1417 1417 -levels 6 … … 1419 1419 } 1420 1420 set tag $dataobj-$cname 1421 array set style s[lindex [$dataobj components -style $cname] 0]1421 array set style [lindex [$dataobj components -style $cname] 0] 1422 1422 if { ![info exists _cname2transferFunction($cname)] } { 1423 1423 # Get the colormap right now, since it doesn't change with marker 1424 1424 # changes. 1425 set cmap [ColorsToColormap $style s(-color)]1425 set cmap [ColorsToColormap $style(-color)] 1426 1426 set amap [list 0.0 0.0 1.0 1.0] 1427 1427 set _cname2transferFunction($cname) [list $cmap $amap] … … 1459 1459 # reference. 1460 1460 if { ![info exists _parsedFunction($cname)] } { 1461 array set style s{1461 array set style { 1462 1462 -color BCGYR 1463 1463 -levels 6 … … 1467 1467 foreach tag [GetDatasetsWithComponent $cname] { 1468 1468 foreach {dataobj cname} [split [lindex $tag 0] -] break 1469 array set style s[lindex [$dataobj components -style $cname] 0]1469 array set style [lindex [$dataobj components -style $cname] 0] 1470 1470 } 1471 1471 eval $_transferFunctionEditors($cname) limits $_limits($cname) 1472 1472 # Have to defer creation of isomarkers until we have data limits 1473 if { [info exists style s(-markers)] &&1474 [llength $style s(-markers)] > 0 } {1475 ParseMarkersOption $cname $style s(-markers)1473 if { [info exists style(-markers)] && 1474 [llength $style(-markers)] > 0 } { 1475 ParseMarkersOption $cname $style(-markers) 1476 1476 } else { 1477 ParseLevelsOption $cname $style s(-levels)1477 ParseLevelsOption $cname $style(-levels) 1478 1478 } 1479 1479 -
trunk/gui/scripts/vtkglyphviewer.tcl
r5184 r5188 129 129 private variable _view ; # view params for 3D view 130 130 private variable _settings 131 private variable _style; # Array of current component styles.132 131 private variable _changed 133 private variable _initialStyle; # Array of initial component styles.134 132 private variable _reset 1; # Connection to server has been reset. 135 133 -
trunk/gui/scripts/vtkheightmapviewer.tcl
r5184 r5188 138 138 private variable _settings 139 139 private variable _changed 140 private variable _initialStyle ""; # First found style in dataobjects.141 140 private variable _reset 1; # Connection to server has been reset. 142 141 -
trunk/gui/scripts/vtkimageviewer.tcl
r5184 r5188 133 133 private variable _settings 134 134 private variable _changed 135 private variable _initialStyle ""; # First found style in dataobjects.136 135 private variable _reset 1; # Connection to server has been reset. 137 136 -
trunk/gui/scripts/vtkisosurfaceviewer.tcl
r5184 r5188 146 146 private variable _view ; # view params for 3D view 147 147 private variable _settings 148 private variable _style; # Array of current component styles.149 148 private variable _changed 150 private variable _initialStyle; # Array of initial component styles.151 149 private variable _reset 1; # Connection to server has been reset. 152 150 -
trunk/gui/scripts/vtkmeshviewer.tcl
r5156 r5188 113 113 private variable _settings 114 114 private variable _widget 115 private variable _style; # Array of current component styles.116 private variable _initialStyle; # Array of initial component styles.117 115 private variable _reset 1; # Connection to server has been reset. 118 116 -
trunk/gui/scripts/vtksurfaceviewer.tcl
r5184 r5188 129 129 private variable _view ; # view params for 3D view 130 130 private variable _settings 131 private variable _style; # Array of current component styles.132 131 private variable _changed 133 private variable _initialStyle; # Array of initial component styles.134 132 private variable _reset 1; # Connection to server has been reset. 135 133 -
trunk/gui/scripts/vtkvolumeviewer.tcl
r5156 r5188 153 153 private variable _view ; # view params for 3D view 154 154 private variable _settings 155 private variable _style; # Array of current component styles.156 private variable _initialStyle; # Array of initial component styles.157 155 private variable _reset 1; # Connection to server has been reset. 158 156 … … 2236 2234 # Parse style string. 2237 2235 set tag $dataobj-$cname 2238 array set style s{2236 array set style { 2239 2237 -color BCGYR 2240 2238 -lighting 1 … … 2243 2241 -visible 1 2244 2242 } 2245 array set style s[$dataobj style $cname]2246 set _settings($cname-volumelighting) $style s(-lighting)2247 set _settings($cname-volumeopacity) [expr $style s(-opacity) * 100]2248 set _settings($cname-volumeoutline) $style s(-outline)2249 set _settings($cname-volumevisible) $style s(-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) 2250 2248 2251 2249 $itk_component(colormap) value $styles(-color) … … 2253 2251 SendCmd "outline add $tag" 2254 2252 SendCmd "outline color [Color2RGB $itk_option(-plotforeground)] $tag" 2255 SendCmd "outline visible $style s(-outline) $tag"2253 SendCmd "outline visible $style(-outline) $tag" 2256 2254 2257 2255 SendCmd "$_cutplaneCmd add $tag" … … 2260 2258 2261 2259 SendCmd "volume add $tag" 2262 SendCmd "volume lighting $style s(-lighting) $tag"2263 SendCmd "volume opacity $style s(-opacity) $tag"2264 SendCmd "volume visible $style s(-visible) $tag"2260 SendCmd "volume lighting $style(-lighting) $tag" 2261 SendCmd "volume opacity $style(-opacity) $tag" 2262 SendCmd "volume visible $style(-visible) $tag" 2265 2263 2266 2264 SetInitialTransferFunction $dataobj $cname
Note: See TracChangeset
for help on using the changeset viewer.