Changeset 5454 for branches/1.3/gui


Ignore:
Timestamp:
May 7, 2015 3:14:43 AM (9 years ago)
Author:
ldelgass
Message:

Some flowvis fixes from merge and sync with 1.4 branch

File:
1 edited

Legend:

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

    r5453 r5454  
    11241124        foreach comp [$dataobj components] {
    11251125            set tag $dataobj-$comp
    1126             # Send the data as one huge base64-encoded mess -- yuck!
    1127             set data [$dataobj blob $comp]
     1126            set isvtk 0
     1127            # FIXME: Would like to use the type method of the dataobj
     1128            # but the returned value isn't well defined now
     1129            if {[catch {
     1130                # Send the data as one huge base64-encoded mess -- yuck!
     1131                set data [$dataobj blob $comp]
     1132            }]} {
     1133                set data [$dataobj vtkdata $comp]
     1134                set isvtk 1
     1135            }
    11281136            set nbytes [string length $data]
    11291137            if { $_reportClientInfo }  {
     
    11411149            set extents [$dataobj extents $comp]
    11421150            # I have a field. Is a vector field or a volume field?
    1143             if { $extents == 1 } {
     1151            if { !$isvtk && $extents == 1 } {
    11441152                SendCmd "volume data follows $nbytes $tag"
    11451153            } else {
     
    11551163
    11561164    set _first [lindex [get] 0]
     1165
     1166    # Turn off cutplanes for all volumes
     1167    foreach axis {x y z} {
     1168        SendCmd "cutplane state 0 $axis"
     1169    }
    11571170
    11581171    # Reset the camera and other view parameters
     
    14401453                set comp [lindex [$_first components] 0]
    14411454                set tag $_first-$comp
    1442                 set diffuse [expr {0.01*$_settings($this-light)}]
     1455                set diffuse [expr {0.01*$_settings($what)}]
    14431456                set ambient [expr {1.0 - $diffuse}]
    14441457                set specularLevel 0.3
     
    15821595        -color BCGYR
    15831596        -levels 6
     1597        -opacity 0.5
    15841598    }
    15851599    array set style [lindex [$dataobj components -style $cname] 0]
    15861600    set tf "$style(-color):$style(-levels)"
     1601    set _settings(-opacity) [expr $style(-opacity) * 100]
    15871602    set _dataset2style($dataobj-$cname) $tf
    15881603    lappend _style2datasets($tf) $dataobj $cname
     
    19972012        -variable [itcl::scope _settings(-light)] \
    19982013        -width 10 \
    1999         -showvalue off -command [itcl::code $this AdjustSetting light]
     2014        -showvalue off -command [itcl::code $this AdjustSetting -light]
    20002015    label $inner.bright -text "Surface" -font $fg
    20012016
     
    20582073    Rappture::Tooltip::for $itk_component(xCutButton) \
    20592074        "Toggle the X cut plane on/off"
     2075    $itk_component(xCutButton) select
    20602076
    20612077    itk_component add xCutScale {
     
    20852101    Rappture::Tooltip::for $itk_component(yCutButton) \
    20862102        "Toggle the Y cut plane on/off"
     2103    $itk_component(yCutButton) select
    20872104
    20882105    itk_component add yCutScale {
     
    21122129    Rappture::Tooltip::for $itk_component(zCutButton) \
    21132130        "Toggle the Z cut plane on/off"
     2131    $itk_component(zCutButton) select
    21142132
    21152133    itk_component add zCutScale {
Note: See TracChangeset for help on using the changeset viewer.