Changeset 4216 for branches/1.3


Ignore:
Timestamp:
Mar 11, 2014 8:18:02 AM (10 years ago)
Author:
ldelgass
Message:

merge r3896 from trunk

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

    • Property svn:mergeinfo changed
      /trunkmerged: 3896
  • branches/1.3/gui/scripts/vtkvolumeviewer.tcl

    r3844 r4216  
    219219        axis-ygrid              0
    220220        axis-zgrid              0
    221         axis-xcutplane          0
    222         axis-ycutplane          0
    223         axis-zcutplane          0
    224         axis-xposition          0
    225         axis-yposition          0
    226         axis-zposition          0
    227221        axesVisible             1
    228222        axisLabels              1
    229223        cutplaneEdges           0
    230         cutplane-xvisible       0
    231         cutplane-yvisible       0
    232         cutplane-zvisible       0
     224        cutplane-xvisible       1
     225        cutplane-yvisible       1
     226        cutplane-zvisible       1
    233227        cutplane-xposition      50
    234228        cutplane-yposition      50
    235229        cutplane-zposition      50
    236         cutplaneVisible         1
     230        cutplaneVisible         0
    237231        cutplaneLighting        1
    238232        cutplaneWireframe       0
     
    337331            -command [itcl::code $this AdjustSetting cutplaneVisible]
    338332    }
    339     $itk_component(cutplane) select
    340333    Rappture::Tooltip::for $itk_component(cutplane) \
    341334        "Show/Hide cutplanes"
     
    10191012                foreach { label units components } \
    10201013                    [$_first fieldinfo $fname] break
    1021                 $itk_component(field) choices insert end "$fname" "$label"
    1022                 $itk_component(fieldmenu) add radiobutton -label "$label" \
    1023                     -value $label -variable [itcl::scope _curFldLabel] \
    1024                     -selectcolor red \
    1025                     -activebackground $itk_option(-plotbackground) \
    1026                     -activeforeground $itk_option(-plotforeground) \
    1027                     -font "Arial 8" \
    1028                     -command [itcl::code $this Combo invoke]
    1029                 set _fields($fname) [list $label $units $components]
    1030                 if { $_curFldName == "" } {
    1031                     set _curFldName $fname
    1032                     set _curFldLabel $label
     1014                # Only scalar fields are valid
     1015                if {$components == 1} {
     1016                    $itk_component(field) choices insert end "$fname" "$label"
     1017                    $itk_component(fieldmenu) add radiobutton -label "$label" \
     1018                        -value $label -variable [itcl::scope _curFldLabel] \
     1019                        -selectcolor red \
     1020                        -activebackground $itk_option(-plotbackground) \
     1021                        -activeforeground $itk_option(-plotforeground) \
     1022                        -font "Arial 8" \
     1023                        -command [itcl::code $this Combo invoke]
     1024                    set _fields($fname) [list $label $units $components]
     1025                    if { $_curFldName == "" } {
     1026                        set _curFldName $fname
     1027                        set _curFldLabel $label
     1028                    }
    10331029                }
    10341030            }
     
    14211417                foreach { label units components } $_fields($fname) break
    14221418                if { $components > 1 } {
    1423                     set _colorMode vmag
     1419                    puts stderr "Can't use a vector field in a volume"
     1420                    return
    14241421                } else {
    14251422                    set _colorMode scalar
     
    14311428                return
    14321429            }
    1433             SendCmd "volume colormode $_colorMode ${name} $dataset"
    1434             SendCmd "cutplane colormode $_colorMode ${name} $dataset"
     1430            foreach dataset [CurrentDatasets -visible $_first] {
     1431                #SendCmd "volume colormode $_colorMode ${fname} $dataset"
     1432                SendCmd "cutplane colormode $_colorMode ${fname} $dataset"
     1433            }
    14351434            SendCmd "camera reset"
    14361435            DrawLegend
     
    18111810    Rappture::Tooltip::for $itk_component(xCutButton) \
    18121811        "Toggle the X-axis cutplane on/off"
     1812    $itk_component(xCutButton) select
    18131813
    18141814    itk_component add xCutScale {
     
    18381838    Rappture::Tooltip::for $itk_component(yCutButton) \
    18391839        "Toggle the Y-axis cutplane on/off"
     1840    $itk_component(yCutButton) select
    18401841
    18411842    itk_component add yCutScale {
     
    18651866    Rappture::Tooltip::for $itk_component(zCutButton) \
    18661867        "Toggle the Z-axis cutplane on/off"
     1868    $itk_component(zCutButton) select
    18671869
    18681870    itk_component add zCutScale {
     
    18781880    $itk_component(zCutScale) set 50
    18791881    $itk_component(zCutScale) configure -state disabled
    1880     #$itk_component(zCutScale) configure -state disabled
    18811882    Rappture::Tooltip::for $itk_component(zCutScale) \
    18821883        "@[itcl::code $this Slice tooltip z]"
     
    20242025    SendCmd "volume add $tag"
    20252026    SendCmd "cutplane add $tag"
    2026     SendCmd "cutplane edges 0 $tag"
    2027     SendCmd "cutplane wireframe 0 $tag"
    2028     SendCmd "cutplane lighting 1 $tag"
    2029     SendCmd "cutplane linewidth 1 $tag"
    2030     #SendCmd "cutplane linecolor 1 1 1 $tag"
    2031     #SendCmd "cutplane visible $tag"
    2032     foreach axis { x y z } {
    2033         SendCmd "cutplane slice $axis 0.5 $tag"
    2034         SendCmd "cutplane axis $axis 0 $tag"
    2035     }
     2027    SendCmd "cutplane visible 0 $tag"
    20362028
    20372029    SendCmd "volume lighting $settings(-lighting) $tag"
     
    22242216        "move" {
    22252217            set axis [lindex $args 0]
    2226             set oldval $_settings(axis-${axis}position)
    22272218            set newval [lindex $args 1]
    22282219            if {[llength $args] != 2} {
Note: See TracChangeset for help on using the changeset viewer.