Changeset 5664


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

For back compat, keep -color style as meaning colormap in glyph viewer, make
new -constcolor style for setting constant color.

File:
1 edited

Legend:

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

    r5659 r5664  
    21502150    set tag $dataobj-$comp
    21512151    array set style {
    2152         -color white
    2153         -colormap BCGYR
     2152        -color BCGYR
     2153        -constcolor white
    21542154        -colormode vmag
    21552155        -edgecolor black
     
    21682168        -wireframe 0
    21692169    }
    2170     set $style(-color) $itk_option(-plotforeground)
     2170    set $style(-constcolor) $itk_option(-plotforeground)
    21712171    set numComponents [$dataobj numComponents $comp]
    21722172    if {$numComponents == 3} {
     
    22122212    }
    22132213    if { $_changed(-colormap) } {
    2214         set style(-colormap) $_settings(-colormap)
     2214        set style(-color) $_settings(-colormap)
    22152215    }
    22162216    if { $_currentColormap == "" } {
    2217         $itk_component(colormap) value $style(-colormap)
     2217        $itk_component(colormap) value $style(-color)
    22182218    }
    22192219
    22202220    SendCmd "outline add $tag"
    2221     SendCmd "outline color [Color2RGB $style(-color)] $tag"
     2221    SendCmd "outline color [Color2RGB $style(-constcolor)] $tag"
    22222222    SendCmd "outline visible $style(-outline) $tag"
    22232223    set _settings(-glyphoutline) $style(-outline)
     
    22392239    set _settings(-glyphscale) $style(-gscale)
    22402240
    2241     if {$style(-colormode) == "constant" || $style(-colormap) == "none"} {
     2241    if {$style(-colormode) == "constant" || $style(-color) == "none"} {
    22422242        SendCmd "glyphs colormode constant {} $tag"
    22432243        set _settings(-colormapvisible) 0
     
    22462246        SendCmd "glyphs colormode $style(-colormode) $_curFldName $tag"
    22472247        set _settings(-colormapvisible) 1
    2248         set _settings(-colormap) $style(-colormap)
    2249         SetCurrentColormap $style(-colormap)
     2248        set _settings(-colormap) $style(-color)
     2249        SetCurrentColormap $style(-color)
    22502250    }
    22512251    $itk_component(colormap) value $_settings(-colormap)
    22522252    set _colorMode $style(-colormode)
    22532253    # constant color only used if colormode set to constant
    2254     SendCmd "glyphs color [Color2RGB $style(-color)] $tag"
     2254    SendCmd "glyphs color [Color2RGB $style(-constcolor)] $tag"
    22552255    # Omitting field name for gorient and smode commands
    22562256    # defaults to active scalars or vectors depending on mode
Note: See TracChangeset for help on using the changeset viewer.