Changeset 5239 for branches


Ignore:
Timestamp:
Apr 15, 2015 1:54:57 AM (9 years ago)
Author:
ldelgass
Message:

more backporting on vtkvolume

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3/gui/scripts/vtkvolumeviewer.tcl

    r5236 r5239  
    785785itcl::body Rappture::VtkVolumeViewer::disconnect {} {
    786786    Disconnect
     787    set _reset 1
    787788}
    788789
     
    942943    set _first ""
    943944
    944     SendCmd "dataset visible 0"
    945 
    946945    # No volumes are active (i.e. in the working set of displayed volumes).
    947946    # A volume is always invisible if it's not in the working set.  A
    948947    # volume in the working set may be visible/invisible depending upon the
    949948    # global visibility value.
     949    SendCmd "dataset visible 0"
    950950    foreach dataobj [get -objects] {
    951951        if { [info exists _obj2ovride($dataobj-raise)] &&  $_first == "" } {
     
    13621362            set bool $_settings($what)
    13631363            foreach dataset [CurrentDatasets -visible] {
    1364                 SendCmd "$_cutplaneCmd lighting $bool $dataset"
     1364                if {$_cutplaneCmd != "imgcutplane"} {
     1365                    SendCmd "$_cutplaneCmd lighting $bool $dataset"
     1366                } else {
     1367                    if {$bool} {
     1368                        set ambient 0.0
     1369                        set diffuse 1.0
     1370                    } else {
     1371                        set ambient 1.0
     1372                        set diffuse 0.0
     1373                    }
     1374                    SendCmd "imgcutplane material $ambient $diffuse $dataset"
     1375                }
    13651376            }
    13661377        }
     
    13931404            }
    13941405            set _cutplanePending 0
    1395         }
    1396         "volume-palette" {
    1397             set palette [$itk_component(palette) value]
    1398             set _settings(volume-palette) $palette
    1399             foreach dataset [CurrentDatasets -visible $_first] {
    1400                 foreach {dataobj comp} [split $dataset -] break
    1401                 ChangeColormap $dataobj $comp $palette
    1402             }
    1403             set _legendPending 1
    14041406        }
    14051407        "volume-palette" {
     
    16481650
    16491651itcl::body Rappture::VtkVolumeViewer::BuildAxisTab {} {
    1650 
    16511652    set fg [option get $itk_component(hull) font Font]
    16521653    #set bfg [option get $itk_component(hull) boldFont Font]
     
    16541655    set inner [$itk_component(main) insert end \
    16551656        -title "Axis Settings" \
    1656         -icon [Rappture::icon axis1]]
     1657        -icon [Rappture::icon axis2]]
    16571658    $inner configure -borderwidth 4
    16581659
    16591660    checkbutton $inner.visible \
    1660         -text "Show Axes" \
     1661        -text "Axes" \
    16611662        -variable [itcl::scope _settings(axesVisible)] \
    16621663        -command [itcl::code $this AdjustSetting axesVisible] \
     
    16641665
    16651666    checkbutton $inner.labels \
    1666         -text "Show Axis Labels" \
     1667        -text "Axis Labels" \
    16671668        -variable [itcl::scope _settings(axisLabels)] \
    16681669        -command [itcl::code $this AdjustSetting axisLabels] \
    16691670        -font "Arial 9"
    1670 
    1671     checkbutton $inner.gridx \
    1672         -text "Show X Grid" \
     1671    label $inner.grid_l -text "Grid" -font "Arial 9"
     1672    checkbutton $inner.xgrid \
     1673        -text "X" \
    16731674        -variable [itcl::scope _settings(axis-xgrid)] \
    16741675        -command [itcl::code $this AdjustSetting axis-xgrid] \
    16751676        -font "Arial 9"
    1676     checkbutton $inner.gridy \
    1677         -text "Show Y Grid" \
     1677    checkbutton $inner.ygrid \
     1678        -text "Y" \
    16781679        -variable [itcl::scope _settings(axis-ygrid)] \
    16791680        -command [itcl::code $this AdjustSetting axis-ygrid] \
    16801681        -font "Arial 9"
    1681     checkbutton $inner.gridz \
    1682         -text "Show Z Grid" \
     1682    checkbutton $inner.zgrid \
     1683        -text "Z" \
    16831684        -variable [itcl::scope _settings(axis-zgrid)] \
    16841685        -command [itcl::code $this AdjustSetting axis-zgrid] \
     
    16991700
    17001701    blt::table $inner \
    1701         0,0 $inner.visible -anchor w -cspan 2 \
    1702         1,0 $inner.labels  -anchor w -cspan 2 \
    1703         2,0 $inner.gridx   -anchor w -cspan 2 \
    1704         3,0 $inner.gridy   -anchor w -cspan 2 \
    1705         4,0 $inner.gridz   -anchor w -cspan 2 \
    1706         5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
    1707         6,0 $inner.mode    -fill x   -cspan 2
     1702        0,0 $inner.visible -anchor w -cspan 4 \
     1703        1,0 $inner.labels  -anchor w -cspan 4 \
     1704        2,0 $inner.minorticks  -anchor w -cspan 4 \
     1705        4,0 $inner.grid_l  -anchor w \
     1706        4,1 $inner.xgrid   -anchor w \
     1707        4,2 $inner.ygrid   -anchor w \
     1708        4,3 $inner.zgrid   -anchor w \
     1709        5,0 $inner.mode_l  -anchor w -padx { 2 0 } \
     1710        6,0 $inner.mode    -fill x   -cspan 3
    17081711
    17091712    blt::table configure $inner r* c* -resize none
    1710     blt::table configure $inner r7 c1 -resize expand
     1713    blt::table configure $inner r7 c6 -resize expand
     1714    blt::table configure $inner r3 -height 0.125i
    17111715}
    17121716
     
    19921996}
    19931997
    1994 itcl::body Rappture::VtkVolumeViewer::SetObjectStyle { dataobj comp } {
     1998itcl::body Rappture::VtkVolumeViewer::SetObjectStyle { dataobj cname } {
    19951999    # Parse style string.
    1996     set tag $dataobj-$comp
    1997     set style [$dataobj style $comp]
     2000    set tag $dataobj-$cname
     2001    set style [$dataobj style $cname]
    19982002    array set settings {
    19992003        -color \#808080
     
    20162020    SendCmd "volume lighting $settings(-lighting) $tag"
    20172021    set _settings(volumeLighting) $settings(-lighting)
    2018     SetColormap $dataobj $comp
     2022    SetColormap $dataobj $cname
    20192023}
    20202024
     
    21902194}
    21912195
    2192 
    21932196# ----------------------------------------------------------------------
    21942197# USAGE: Slice move x|y|z <newval>
     
    22202223    }
    22212224}
    2222 
    22232225
    22242226# ----------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.