- Timestamp:
- Jan 15, 2013 2:27:50 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Rappture 1.2/gui/scripts/vtkheightmapviewer.tcl
r3256 r3258 241 241 contour-field "Default" 242 242 contour-isolines 10 243 contour-lighting1243 heightmap-lighting 1 244 244 contour-opacity 100 245 245 colormap-visible 1 … … 1072 1072 axis-visible axis-labels 1073 1073 InitSettings contour-opacity \ 1074 heightmap-scale contour-lighting \1074 heightmap-scale heightmap-lighting \ 1075 1075 contour-colormap contour-field \ 1076 1076 contour-edges contour-opacity contour-wireframe … … 1347 1347 } 1348 1348 } 1349 "contour-lighting" { 1350 set bool $_settings(contour-lighting) 1351 foreach dataset [CurrentDatasets -all] { 1352 SendCmd "heightmap lighting $bool $dataset" 1353 } 1349 "heightmap-lighting" { 1350 if { $_settings(heightmap-mode) } { 1351 set bool $_settings(heightmap-lighting) 1352 SendCmd "heightmap lighting $bool" 1353 } else { 1354 SendCmd "heightmap lighting 0" 1355 } 1354 1356 } 1355 1357 "contour-edges" { … … 1466 1468 } 1467 1469 } 1468 "contour-lighting" { 1469 set bool $_settings(contour-lighting) 1470 foreach dataset [CurrentDatasets -all] { 1471 SendCmd "heightmap lighting $bool $dataset" 1472 } 1470 "heightmap-lighting" { 1471 if { $_settings(heightmap-mode) } { 1472 set bool $_settings(heightmap-lighting) 1473 SendCmd "heightmap lighting $bool" 1474 } else { 1475 SendCmd "heightmap lighting 0" 1476 } 1473 1477 } 1474 1478 "contour-field" { … … 1486 1490 } 1487 1491 "heightmap-mode" { 1492 set bool $_settings(heightmap-mode) 1493 if { $bool } { 1494 $itk_component(lighting) configure -state normal 1495 } else { 1496 $itk_component(lighting) configure -state disabled 1497 } 1488 1498 if {[isconnected]} { 1489 set bool $_settings(heightmap-mode) 1499 set _settings(heightmap-lighting) $bool 1490 1500 # Fix heightmap scale: 0 for contours, 1 for heightmaps. 1491 1501 if { $bool } { … … 1494 1504 set _settings(heightmap-scale) 50 1495 1505 } 1506 SendCmd "heightmap lighting $bool" 1496 1507 set scale [GetHeightmapScale] 1497 1508 foreach dataset [CurrentDatasets -all] { … … 1899 1910 -font "Arial 9" 1900 1911 1901 checkbutton $inner.lighting \ 1902 -text "Enable Lighting" \ 1903 -variable [itcl::scope _settings(contour-lighting)] \ 1904 -command [itcl::code $this AdjustSetting contour-lighting] \ 1905 -font "Arial 9" 1912 itk_component add lighting { 1913 checkbutton $inner.lighting \ 1914 -text "Enable Lighting" \ 1915 -variable [itcl::scope _settings(heightmap-lighting)] \ 1916 -command [itcl::code $this AdjustSetting heightmap-lighting] \ 1917 -font "Arial 9" 1918 } 1906 1919 1907 1920 checkbutton $inner.edges \ … … 2255 2268 set _comp2scale($tag) $_settings(heightmap-scale) 2256 2269 SendCmd "heightmap edges $_settings(contour-edges) $tag" 2257 SendCmd "heightmap lighting $_settings(contour-lighting) $tag"2258 2270 SendCmd "heightmap wireframe $_settings(contour-wireframe) $tag" 2259 2271 SetColormap $dataobj $comp … … 2285 2297 } 2286 2298 $_image(legend) configure -data $bytes 2287 $_image(legend) write /tmp/junk.png -format png2288 2299 #puts stderr "read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>" 2289 2300 if { [catch {DrawLegend $_title} errs] != 0 } {
Note: See TracChangeset
for help on using the changeset viewer.