Changeset 3258 for branches


Ignore:
Timestamp:
Jan 15, 2013 2:27:50 PM (11 years ago)
Author:
gah
Message:

turn off lighting for 2d contour

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Rappture 1.2/gui/scripts/vtkheightmapviewer.tcl

    r3256 r3258  
    241241        contour-field           "Default"
    242242        contour-isolines        10
    243         contour-lighting        1
     243        heightmap-lighting      1
    244244        contour-opacity         100
    245245        colormap-visible         1
     
    10721072            axis-visible axis-labels
    10731073        InitSettings contour-opacity \
    1074             heightmap-scale contour-lighting \
     1074            heightmap-scale heightmap-lighting \
    10751075            contour-colormap contour-field \
    10761076            contour-edges contour-opacity contour-wireframe
     
    13471347            }
    13481348        }
    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            }
    13541356        }
    13551357        "contour-edges" {
     
    14661468            }
    14671469        }
    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            }
    14731477        }
    14741478        "contour-field" {
     
    14861490        }
    14871491        "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            }
    14881498            if {[isconnected]} {
    1489                 set bool $_settings(heightmap-mode)
     1499                set _settings(heightmap-lighting) $bool
    14901500                # Fix heightmap scale: 0 for contours, 1 for heightmaps.
    14911501                if { $bool } {
     
    14941504                    set _settings(heightmap-scale) 50
    14951505                }
     1506                SendCmd "heightmap lighting $bool"
    14961507                set scale [GetHeightmapScale]
    14971508                foreach dataset [CurrentDatasets -all] {
     
    18991910        -font "Arial 9"
    19001911
    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    }
    19061919
    19071920    checkbutton $inner.edges \
     
    22552268    set _comp2scale($tag) $_settings(heightmap-scale)
    22562269    SendCmd "heightmap edges $_settings(contour-edges) $tag"
    2257     SendCmd "heightmap lighting $_settings(contour-lighting) $tag"
    22582270    SendCmd "heightmap wireframe $_settings(contour-wireframe) $tag"
    22592271    SetColormap $dataobj $comp
     
    22852297        }
    22862298        $_image(legend) configure -data $bytes
    2287         $_image(legend) write /tmp/junk.png -format png
    22882299        #puts stderr "read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>"
    22892300        if { [catch {DrawLegend $_title} errs] != 0 } {
Note: See TracChangeset for help on using the changeset viewer.