Changeset 4084 for trunk


Ignore:
Timestamp:
Dec 17, 2013, 3:53:19 PM (11 years ago)
Author:
gah
Message:

add test of volumes in the working set make visible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/vtkvolumeviewer.tcl

    r4083 r4084  
    168168    private variable _curFldLabel ""
    169169    private variable _cutplaneCmd "imgcutplane"
     170    private variable _activeVolumes;   # Array of volumes that are active.
    170171}
    171172
     
    10241025
    10251026    SendCmd "dataset visible 0"
     1027
     1028    # No volumes are active (i.e. in the working set of displayed volumes).
     1029    # A volume is always invisible if it's not in the working set.  A
     1030    # volume in the working set may be visible/invisible depending upon the
     1031    # global visibility value.
     1032    array unset _activeVolumes
    10261033    foreach dataobj [get -objects] {
    10271034        if { [info exists _obj2ovride($dataobj-raise)] &&  $_first == "" } {
     
    11101117        cutplaneVisible \
    11111118        cutplanePositionX cutplanePositionY cutplanePositionZ \
    1112         cutplaneVisibleX cutplaneVisibleY cutplaneVisibleZ
     1119        cutplaneVisibleX cutplaneVisibleY cutplaneVisibleZ 
    11131120
    11141121    if { $_reset } {
     
    13661373            set bool $_settings(volumeVisible)
    13671374            set _settings($_current-volumeVisible) $bool
     1375            # Only the data objects in the array _obj2ovride(*-raise) are
     1376            # in the working set and can be displayed on screen. The global
     1377            # volume control determines whether they are visible.
     1378            #
     1379            # Note: The use of the current component is a hold over from
     1380            #       nanovis.  If we can't display more than one volume,
     1381            #       we don't have to limit the effects to a specific
     1382            #       component.
    13681383            foreach tag [GetDatasetsWithComponent $_current] {
    1369                 SendCmd "volume visible $bool $tag"
     1384                foreach {dataobj cname} [split $tag -] break
     1385                if { [info exists _obj2ovride($dataobj-raise)] } {
     1386                    SendCmd "volume visible $bool $tag"
     1387                }
    13701388            }
    13711389            if { $bool } {
Note: See TracChangeset for help on using the changeset viewer.