Changeset 5290 for trunk/gui


Ignore:
Timestamp:
Apr 23, 2015, 1:02:07 PM (10 years ago)
Author:
ldelgass
Message:

add SetObjectStyle? method to nanovisviewer

File:
1 edited

Legend:

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

    r5289 r5290  
    120120    private method Rotate {option x y}
    121121    private method SendTransferFunctions {}
     122    private method SetObjectStyle { dataobj cname }
    122123    private method SetOrientation { side }
    123124    private method Slice {option args}
     
    945946                set _serverDatasets($tag) 0
    946947            }
    947             NameTransferFunction $dataobj $cname
     948            SetObjectStyle $dataobj $cname
    948949        }
    949950    }
     
    23172318    return $amap
    23182319}
     2320
     2321itcl::body Rappture::NanovisViewer::SetObjectStyle { dataobj cname } {
     2322    array set style {
     2323        -opacity  0.5
     2324    }
     2325    array set style [lindex [$dataobj components -style $cname] 0]
     2326    # Some tools erroneously set -opacity to 1 in style, so
     2327    # override the requested opacity for now
     2328    set style(-opacity) 0.5
     2329    set _settings($cname-opacity) $style(-opacity)
     2330    set tag $dataobj-$cname
     2331    SendCmd "volume shading opacity $_settings($cname-opacity) $tag"
     2332    NameTransferFunction $dataobj $cname
     2333}
Note: See TracChangeset for help on using the changeset viewer.