Changeset 4381
- Timestamp:
- Jun 10, 2014, 10:49:12 PM (10 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkglyphviewer.tcl
r4344 r4381 118 118 # heightmaps displayed. 119 119 private variable _currentColormap "" 120 private variable _currentOpacity ""121 120 122 121 private variable _dataset2style ;# maps dataobj-component to transfunc … … 2182 2181 2183 2182 if { $_changed(glyphOpacity) } { 2184 set style(-opacity) $_settings(glyphOpacity)2183 set style(-opacity) [expr $_settings(glyphOpacity) * 0.01] 2185 2184 } 2186 2185 if { $_changed(colormap) } { … … 2190 2189 $itk_component(colormap) value $style(-colormap) 2191 2190 } 2192 set _currentOpacity $style(-opacity)2193 2191 SendCmd "glyphs add $style(-shape) $tag" 2194 2192 set _settings(glyphShape) $style(-shape) … … 2235 2233 SendCmd "glyphs linewidth $style(-linewidth) $tag" 2236 2234 SendCmd "glyphs ptsize $style(-ptsize) $tag" 2237 SendCmd "glyphs opacity $ _currentOpacity$tag"2238 set _settings(glyphOpacity) $style(-opacity)2235 SendCmd "glyphs opacity $style(-opacity) $tag" 2236 set _settings(glyphOpacity) [expr $style(-opacity) * 100.0] 2239 2237 SendCmd "glyphs wireframe $style(-wireframe) $tag" 2240 2238 set _settings(glyphWireframe) $style(-wireframe) 2241 set _settings(glyphOpacity) [expr $style(-opacity) * 100.0]2242 2239 } 2243 2240 -
trunk/gui/scripts/vtkheightmapviewer.tcl
r4344 r4381 123 123 private variable _currentColormap "" 124 124 private variable _currentNumIsolines -1 125 private variable _currentOpacity ""126 125 127 126 private variable _maxScale 100; # This is the # of times the x-axis … … 2263 2262 -color BCGYR 2264 2263 -levels 10 2265 -opacity 1 002264 -opacity 1.0 2266 2265 } 2267 2266 set stylelist [$dataobj style $comp] … … 2279 2278 2280 2279 if { $_changed(opacity) } { 2281 set style(-opacity) $_settings(opacity)2280 set style(-opacity) [expr $_settings(opacity) * 0.01] 2282 2281 } 2283 2282 if { $_changed(numIsolines) } { … … 2294 2293 AdjustSetting stretchToFit 2295 2294 } 2296 set _currentOpacity $style(-opacity)2297 2295 if { $_currentNumIsolines != $style(-levels) } { 2298 2296 set _currentNumIsolines $style(-levels) … … 2316 2314 SendCmd "heightmap isolines $_settings(isolinesVisible) $tag" 2317 2315 SendCmd "heightmap surface $_settings(colormapVisible) $tag" 2316 SendCmd "heightmap opacity $style(-opacity) $tag" 2317 set _settings(opacity) [expr $style(-opacity) * 100.0] 2318 2318 } 2319 2319 -
trunk/gui/scripts/vtkimageviewer.tcl
r4344 r4381 118 118 private variable _currentColormap "" 119 119 private variable _currentNumIsolines -1 120 private variable _currentOpacity ""121 120 122 121 private variable _maxScale 100; # This is the # of times the x-axis … … 2043 2042 array set style { 2044 2043 -color none 2045 -opacity 1 002044 -opacity 1.0 2046 2045 } 2047 2046 set stylelist [$dataobj style $comp] … … 2059 2058 2060 2059 if { $_changed(opacity) } { 2061 set style(-opacity) $_settings(opacity)2060 set style(-opacity) [expr $_settings(opacity) * 0.01] 2062 2061 } 2063 2062 if { $_changed(colormap) } { … … 2071 2070 AdjustSetting stretchToFit 2072 2071 } 2073 set _currentOpacity $style(-opacity)2074 2072 SendCmd "outline add $tag" 2075 2073 SendCmd "outline color [Color2RGB $itk_option(-plotforeground)] $tag" … … 2079 2077 set color [$itk_component(backingcolor) value] 2080 2078 SendCmd "image color [Color2RGB $color] $tag" 2079 SendCmd "image opacity $style(-opacity) $tag" 2080 set _settings(opacity) [expr $style(-opacity) * 100.0] 2081 2081 } 2082 2082 -
trunk/gui/scripts/vtkisosurfaceviewer.tcl
r4352 r4381 120 120 private variable _currentColormap "" 121 121 private variable _currentNumContours -1 122 private variable _currentOpacity ""123 122 124 123 private variable _dataset2style ;# maps dataobj-component to transfunc … … 238 237 -isosurfacelighting 1 239 238 -isosurfaceopacity 60 240 -isosurfaceoutline 0241 239 -isosurfacevisible 1 242 240 -isosurfacewireframe 0 243 241 -legendvisible 1 244 242 -numcontours 10 243 -outline 0 245 244 -xaxisgrid 0 246 245 -xcutplaneposition 50 … … 341 340 $itk_component(contour) select 342 341 Rappture::Tooltip::for $itk_component(contour) \ 343 " Don't displaythe isosurface"342 "Hide the isosurface" 344 343 pack $itk_component(contour) -padx 2 -pady 2 345 344 … … 352 351 } 353 352 Rappture::Tooltip::for $itk_component(cutplane) \ 354 "Show /Hide cutplanes"353 "Show the cutplanes" 355 354 pack $itk_component(cutplane) -padx 2 -pady 2 356 355 … … 969 968 } 970 969 set _first "" 971 SendCmd " contour3dvisible 0"970 SendCmd "dataset visible 0" 972 971 foreach dataobj [get -objects] { 973 972 if { [info exists _obj2ovride($dataobj-raise)] && $_first == "" } { … … 1003 1002 lappend _obj2datasets($dataobj) $tag 1004 1003 if { [info exists _obj2ovride($dataobj-raise)] } { 1005 # Setting dataset visible enables outline1006 # and contour3d1007 1004 SendCmd "contour3d visible 1 $tag" 1008 1005 } … … 1039 1036 $itk_component(field) value $_curFldLabel 1040 1037 } 1041 InitSettings -cutplanesvisible -isosurfacevisible - isosurfaceoutline1038 InitSettings -cutplanesvisible -isosurfacevisible -outline 1042 1039 if { $_reset } { 1043 1040 # These are settings that rely on a dataset being loaded. … … 1442 1439 SendCmd "contour3d edges $bool" 1443 1440 } 1444 "- isosurfaceoutline" {1441 "-outline" { 1445 1442 set bool $_settings($what) 1446 1443 SendCmd "outline visible $bool" … … 1613 1610 checkbutton $inner.outline \ 1614 1611 -text "Outline" \ 1615 -variable [itcl::scope _settings(- isosurfaceoutline)] \1616 -command [itcl::code $this AdjustSetting - isosurfaceoutline] \1612 -variable [itcl::scope _settings(-outline)] \ 1613 -command [itcl::code $this AdjustSetting -outline] \ 1617 1614 -font "Arial 9" 1618 1615 … … 2129 2126 2130 2127 if { $_changed(-isosurfaceopacity) } { 2131 set style(-opacity) $_settings(-isosurfaceopacity)2128 set style(-opacity) [expr $_settings(-isosurfaceopacity) * 0.01] 2132 2129 } 2133 2130 if { $_changed(-numcontours) } { … … 2141 2138 $itk_component(colormap) value $style(-color) 2142 2139 } 2143 set _currentOpacity $style(-opacity)2144 2140 if { $_currentNumContours != $style(-levels) } { 2145 2141 set _currentNumContours $style(-levels) … … 2163 2159 SendCmd "outline color [Color2RGB $itk_option(-plotforeground)] $tag" 2164 2160 SendCmd "outline visible $style(-outline) $tag" 2165 set _settings(- isosurfaceoutline) $style(-outline)2161 set _settings(-outline) $style(-outline) 2166 2162 set _settings(-isosurfaceedges) $style(-edges) 2167 2163 #SendCmd "contour3d color [Color2RGB $settings(-color)] $tag" … … 2170 2166 SendCmd "contour3d linecolor [Color2RGB $style(-edgecolor)] $tag" 2171 2167 SendCmd "contour3d linewidth $style(-linewidth) $tag" 2172 SendCmd "contour3d opacity $ _currentOpacity$tag"2173 set _settings(-isosurfaceopacity) $style(-opacity)2168 SendCmd "contour3d opacity $style(-opacity) $tag" 2169 set _settings(-isosurfaceopacity) [expr $style(-opacity) * 100.0] 2174 2170 SetCurrentColormap $style(-color) 2175 2171 SendCmd "contour3d wireframe $style(-wireframe) $tag" 2176 2172 set _settings(-isosurfacewireframe) $style(-wireframe) 2177 set _settings(-isosurfaceopacity) [expr $style(-opacity) * 100.0]2178 2173 } 2179 2174 -
trunk/gui/scripts/vtksurfaceviewer.tcl
r4344 r4381 117 117 private variable _currentColormap "" 118 118 private variable _currentNumContours -1 119 private variable _currentOpacity ""120 119 121 120 private variable _dataset2style ;# maps dataobj-component to transfunc … … 1906 1905 1907 1906 if { $_changed(-surfaceopacity) } { 1908 set style(-opacity) $_settings(-surfaceopacity)1907 set style(-opacity) [expr $_settings(-surfaceopacity) * 0.01] 1909 1908 } 1910 1909 if { $_changed(-numcontours) } { … … 1918 1917 $itk_component(colormap) value $style(-color) 1919 1918 } 1920 set _currentOpacity $style(-opacity)1921 1919 if { $_currentNumContours != $style(-levels) } { 1922 1920 set _currentNumContours $style(-levels) … … 1944 1942 SendCmd "polydata linecolor [Color2RGB $style(-edgecolor)] $tag" 1945 1943 SendCmd "polydata linewidth $style(-linewidth) $tag" 1946 SendCmd "polydata opacity $ _currentOpacity$tag"1947 set _settings(-surfaceopacity) $style(-opacity)1944 SendCmd "polydata opacity $style(-opacity) $tag" 1945 set _settings(-surfaceopacity) [expr $style(-opacity) * 100.0] 1948 1946 SetCurrentColormap $style(-color) 1949 1947 SendCmd "polydata wireframe $style(-wireframe) $tag" 1950 1948 set _settings(-surfacewireframe) $style(-wireframe) 1951 set _settings(-surfaceopacity) [expr $style(-opacity) * 100.0]1952 1949 } 1953 1950
Note: See TracChangeset
for help on using the changeset viewer.