Ignore:
Timestamp:
Jun 10, 2014 10:49:12 PM (7 years ago)
Author:
ldelgass
Message:

opacity style setting fixes for VTK viewers (expect vtkvolumeviewer which does
not yet support the style setting). Also note that nanovisviewer (and
flowvisviewer?) have a regression which changes the -opacity style to [0,100]
instead of [0,1]

File:
1 edited

Legend:

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

    r4344 r4381  
    117117    private variable _currentColormap ""
    118118    private variable _currentNumContours -1
    119     private variable _currentOpacity ""
    120119
    121120    private variable _dataset2style    ;# maps dataobj-component to transfunc
     
    19061905
    19071906    if { $_changed(-surfaceopacity) } {
    1908         set style(-opacity) $_settings(-surfaceopacity)
     1907        set style(-opacity) [expr $_settings(-surfaceopacity) * 0.01]
    19091908    }
    19101909    if { $_changed(-numcontours) } {
     
    19181917        $itk_component(colormap) value $style(-color)
    19191918    }
    1920     set _currentOpacity $style(-opacity)
    19211919    if { $_currentNumContours != $style(-levels) } {
    19221920        set _currentNumContours $style(-levels)
     
    19441942    SendCmd "polydata linecolor [Color2RGB $style(-edgecolor)] $tag"
    19451943    SendCmd "polydata linewidth $style(-linewidth) $tag"
    1946     SendCmd "polydata opacity $_currentOpacity $tag"
    1947     set _settings(-surfaceopacity) $style(-opacity)
     1944    SendCmd "polydata opacity $style(-opacity) $tag"
     1945    set _settings(-surfaceopacity) [expr $style(-opacity) * 100.0]
    19481946    SetCurrentColormap $style(-color)
    19491947    SendCmd "polydata wireframe $style(-wireframe) $tag"
    19501948    set _settings(-surfacewireframe) $style(-wireframe)
    1951     set _settings(-surfaceopacity) [expr $style(-opacity) * 100.0]
    19521949}
    19531950
Note: See TracChangeset for help on using the changeset viewer.