Changeset 5283 for branches/1.4


Ignore:
Timestamp:
Apr 21, 2015, 2:56:27 PM (9 years ago)
Author:
ldelgass
Message:

merge r3899,r3901 from trunk

Location:
branches/1.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4

  • branches/1.4/gui/scripts/flowvisviewer.tcl

    r5278 r5283  
    244244        $this-opacity           50
    245245        $this-thickness         350
    246         $this-xcutplane         0
     246        $this-cutplaneVisible   0
     247        $this-xcutplane         1
    247248        $this-xcutposition      0
    248         $this-ycutplane         0
     249        $this-ycutplane         1
    249250        $this-ycutposition      0
    250         $this-zcutplane         0
     251        $this-zcutplane         1
    251252        $this-zcutposition      0
    252253    }]
     
    309310        "Toggle the volume cloud on/off"
    310311    pack $itk_component(volume) -padx 2 -pady 2
     312
     313    itk_component add cutplane {
     314        Rappture::PushButton $f.cutplane \
     315            -onimage [Rappture::icon cutbutton] \
     316            -offimage [Rappture::icon cutbutton] \
     317            -variable [itcl::scope _settings($this-cutplaneVisible)] \
     318            -command [itcl::code $this AdjustSetting cutplaneVisible]
     319    }
     320    Rappture::Tooltip::for $itk_component(cutplane) \
     321        "Show/Hide cutplanes"
     322    pack $itk_component(cutplane) -padx 2 -pady 2
    311323
    312324    if { [catch {
     
    11671179    set _first [lindex [get] 0]
    11681180
     1181    # Turn off cutplanes for all volumes
     1182    foreach axis {x y z} {
     1183        SendCmd "cutplane state 0 $axis"
     1184    }
     1185
    11691186    # Reset the camera and other view parameters
    1170     InitSettings light2side light opacity isosurface grid axes volume outline
    1171 
     1187    InitSettings light2side light opacity isosurface grid axes volume outline \
     1188        cutplaneVisible xcutplane ycutplane zcutplane
     1189   
    11721190    # nothing to send -- activate the proper volume
    11731191    if {"" != $_first} {
     
    12211239    set vols [CurrentVolumeIds -cutplanes]
    12221240    foreach axis {x y z} {
    1223         SendCmd "cutplane state $_settings($this-${axis}cutplane) $axis $vols"
    12241241        set pos [expr {0.01*$_settings($this-${axis}cutposition)}]
    12251242        SendCmd "cutplane position $pos $axis $vols"
     
    15211538                SendCmd "$tag configure -volume $_settings($this-volume)"
    15221539            }
     1540        }
     1541        "cutplaneVisible" {
     1542            set bool $_settings($this-$what)
     1543            set datasets [CurrentVolumeIds -cutplanes]
     1544            set tag [lindex $datasets 0]
     1545            SendCmd "cutplane visible $bool $tag"
    15231546        }
    15241547        "xcutplane" - "ycutplane" - "zcutplane" {
     
    20882111    Rappture::Tooltip::for $itk_component(xCutButton) \
    20892112        "Toggle the X cut plane on/off"
     2113    $itk_component(xCutButton) select
    20902114
    20912115    itk_component add xCutScale {
     
    21152139    Rappture::Tooltip::for $itk_component(yCutButton) \
    21162140        "Toggle the Y cut plane on/off"
     2141    $itk_component(yCutButton) select
    21172142
    21182143    itk_component add yCutScale {
     
    21422167    Rappture::Tooltip::for $itk_component(zCutButton) \
    21432168        "Toggle the Z cut plane on/off"
     2169    $itk_component(zCutButton) select
    21442170
    21452171    itk_component add zCutScale {
  • branches/1.4/gui/scripts/nanovisviewer.tcl

    r5282 r5283  
    967967
    968968        InitSettings -light2side -light -volumeopacity \
    969             -isosurfaceshading -gridvisible -axesvisible
     969            -isosurfaceshading -gridvisible -axesvisible \
     970            -xcutplanevisible -ycutplanevisible -zcutplanevisible       
    970971
    971972        if {"" != $_first} {
Note: See TracChangeset for help on using the changeset viewer.