Ignore:
Timestamp:
Jun 5, 2015, 3:27:12 PM (9 years ago)
Author:
ldelgass
Message:

Sync glyph viewer with trunk

Location:
branches/1.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4

  • branches/1.4/gui/scripts/vtkglyphviewer.tcl

    r5660 r5666  
    17331733        Rappture::Combobox $inner.colormap -width 10 -editable no
    17341734    }
    1735 
    1736     $inner.colormap choices insert end [GetColormapList]
     1735    $inner.colormap choices insert end [GetColormapList -includeNone]
    17371736    $itk_component(colormap) value "BCGYR"
    17381737    bind $inner.colormap <<Value>> \
     
    21522151    array set style {
    21532152        -color BCGYR
     2153        -constcolor white
     2154        -colormode vmag
    21542155        -edgecolor black
    21552156        -edges 0
     
    21672168        -wireframe 0
    21682169    }
     2170    set $style(-constcolor) $itk_option(-plotforeground)
    21692171    set numComponents [$dataobj numComponents $comp]
    21702172    if {$numComponents == 3} {
     
    21722174        set style(-orientglyphs) 1
    21732175        set style(-scalemode) "vmag"
     2176        set style(-colormode) "vmag"
    21742177    } else {
    21752178        set style(-shape) "sphere"
    21762179        set style(-orientglyphs) 0
    21772180        set style(-scalemode) "scalar"
     2181        set style(-colormode) "scalar"
    21782182    }
    21792183    array set style [$dataobj style $comp]
     
    22152219
    22162220    SendCmd "outline add $tag"
    2217     SendCmd "outline color [Color2RGB $itk_option(-plotforeground)] $tag"
     2221    SendCmd "outline color [Color2RGB $style(-constcolor)] $tag"
    22182222    SendCmd "outline visible $style(-outline) $tag"
    22192223    set _settings(-glyphoutline) $style(-outline)
     
    22352239    set _settings(-glyphscale) $style(-gscale)
    22362240
     2241    if {$style(-colormode) == "constant" || $style(-color) == "none"} {
     2242        SendCmd "glyphs colormode constant {} $tag"
     2243        set _settings(-colormapvisible) 0
     2244        set _settings(-colormap) "none"
     2245    } else {
     2246        SendCmd "glyphs colormode $style(-colormode) $_curFldName $tag"
     2247        set _settings(-colormapvisible) 1
     2248        set _settings(-colormap) $style(-color)
     2249        SetCurrentColormap $style(-color)
     2250    }
     2251    $itk_component(colormap) value $_settings(-colormap)
     2252    set _colorMode $style(-colormode)
    22372253    # constant color only used if colormode set to constant
    2238     SendCmd "glyphs color [Color2RGB $itk_option(-plotforeground)] $tag"
     2254    SendCmd "glyphs color [Color2RGB $style(-constcolor)] $tag"
    22392255    # Omitting field name for gorient and smode commands
    22402256    # defaults to active scalars or vectors depending on mode
     
    22522268    SendCmd "glyphs opacity $style(-opacity) $tag"
    22532269    set _settings(-glyphopacity) [expr $style(-opacity) * 100.0]
    2254     SetCurrentColormap $style(-color)
    22552270    SendCmd "glyphs wireframe $style(-wireframe) $tag"
    22562271    set _settings(-glyphwireframe) $style(-wireframe)
Note: See TracChangeset for help on using the changeset viewer.