Changeset 5454 for branches/1.3/gui
- Timestamp:
- May 7, 2015 3:14:43 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3/gui/scripts/flowvisviewer.tcl
r5453 r5454 1124 1124 foreach comp [$dataobj components] { 1125 1125 set tag $dataobj-$comp 1126 # Send the data as one huge base64-encoded mess -- yuck! 1127 set data [$dataobj blob $comp] 1126 set isvtk 0 1127 # FIXME: Would like to use the type method of the dataobj 1128 # but the returned value isn't well defined now 1129 if {[catch { 1130 # Send the data as one huge base64-encoded mess -- yuck! 1131 set data [$dataobj blob $comp] 1132 }]} { 1133 set data [$dataobj vtkdata $comp] 1134 set isvtk 1 1135 } 1128 1136 set nbytes [string length $data] 1129 1137 if { $_reportClientInfo } { … … 1141 1149 set extents [$dataobj extents $comp] 1142 1150 # I have a field. Is a vector field or a volume field? 1143 if { $extents == 1 } {1151 if { !$isvtk && $extents == 1 } { 1144 1152 SendCmd "volume data follows $nbytes $tag" 1145 1153 } else { … … 1155 1163 1156 1164 set _first [lindex [get] 0] 1165 1166 # Turn off cutplanes for all volumes 1167 foreach axis {x y z} { 1168 SendCmd "cutplane state 0 $axis" 1169 } 1157 1170 1158 1171 # Reset the camera and other view parameters … … 1440 1453 set comp [lindex [$_first components] 0] 1441 1454 set tag $_first-$comp 1442 set diffuse [expr {0.01*$_settings($ this-light)}]1455 set diffuse [expr {0.01*$_settings($what)}] 1443 1456 set ambient [expr {1.0 - $diffuse}] 1444 1457 set specularLevel 0.3 … … 1582 1595 -color BCGYR 1583 1596 -levels 6 1597 -opacity 0.5 1584 1598 } 1585 1599 array set style [lindex [$dataobj components -style $cname] 0] 1586 1600 set tf "$style(-color):$style(-levels)" 1601 set _settings(-opacity) [expr $style(-opacity) * 100] 1587 1602 set _dataset2style($dataobj-$cname) $tf 1588 1603 lappend _style2datasets($tf) $dataobj $cname … … 1997 2012 -variable [itcl::scope _settings(-light)] \ 1998 2013 -width 10 \ 1999 -showvalue off -command [itcl::code $this AdjustSetting light]2014 -showvalue off -command [itcl::code $this AdjustSetting -light] 2000 2015 label $inner.bright -text "Surface" -font $fg 2001 2016 … … 2058 2073 Rappture::Tooltip::for $itk_component(xCutButton) \ 2059 2074 "Toggle the X cut plane on/off" 2075 $itk_component(xCutButton) select 2060 2076 2061 2077 itk_component add xCutScale { … … 2085 2101 Rappture::Tooltip::for $itk_component(yCutButton) \ 2086 2102 "Toggle the Y cut plane on/off" 2103 $itk_component(yCutButton) select 2087 2104 2088 2105 itk_component add yCutScale { … … 2112 2129 Rappture::Tooltip::for $itk_component(zCutButton) \ 2113 2130 "Toggle the Z cut plane on/off" 2131 $itk_component(zCutButton) select 2114 2132 2115 2133 itk_component add zCutScale {
Note: See TracChangeset
for help on using the changeset viewer.