Changeset 5339 for trunk


Ignore:
Timestamp:
Apr 28, 2015, 7:10:46 PM (10 years ago)
Author:
ldelgass
Message:

Use all lowercase style options for consistency with existing options. Add
backwards compat for the camel case options already released.

File:
1 edited

Legend:

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

    r5336 r5339  
    21522152        -color white
    21532153        -colormap BCGYR
    2154         -colorMode vmag
     2154        -colormode vmag
    21552155        -edgecolor black
    21562156        -edges 0
     
    21602160        -normscale 1
    21612161        -opacity 1.0
    2162         -orientGlyphs 1
     2162        -orientglyphs 1
    21632163        -outline 0
    21642164        -ptsize 1.0
    21652165        -quality 1
    2166         -scaleMode vmag
     2166        -scalemode vmag
    21672167        -shape arrow
    21682168        -wireframe 0
     
    21722172    if {$numComponents == 3} {
    21732173        set style(-shape) "arrow"
    2174         set style(-orientGlyphs) 1
    2175         set style(-scaleMode) "vmag"
    2176         set style(-colorMode) "vmag"
     2174        set style(-orientglyphs) 1
     2175        set style(-scalemode) "vmag"
     2176        set style(-colormode) "vmag"
    21772177    } else {
    21782178        set style(-shape) "sphere"
    2179         set style(-orientGlyphs) 0
    2180         set style(-scaleMode) "scalar"
    2181         set style(-colorMode) "scalar"
     2179        set style(-orientglyphs) 0
     2180        set style(-scalemode) "scalar"
     2181        set style(-colormode) "scalar"
    21822182    }
    21832183    array set style [$dataobj style $comp]
     2184    # Backwards compat with camel case style option
     2185    if { [info exists style(-orientGlyphs)] } {
     2186        set style(-orientglyphs) $style(-orientGlyphs)
     2187        array unset style -orientGlyphs
     2188    }
     2189    # Backwards compat with camel case style option
     2190    if { [info exists style(-scaleMode)] } {
     2191        set style(-scalemode) $style(-scaleMode)
     2192        array unset style -scaleMode
     2193    }
    21842194    if { $dataobj != $_first } {
    21852195        set style(-opacity) 1
     
    22342244        set _settings(-colormap) "none"
    22352245    } else {
    2236         SendCmd "glyphs colormode $style(-colorMode) $_curFldName $tag"
     2246        SendCmd "glyphs colormode $style(-colormode) $_curFldName $tag"
    22372247        set _settings(-colormapvisible) 1
    22382248        set _settings(-colormap) $style(-colormap)
     
    22402250    }
    22412251    $itk_component(colormap) value $_settings(-colormap)
    2242     set _colorMode $style(-colorMode)
     2252    set _colorMode $style(-colormode)
    22432253    # constant color only used if colormode set to constant
    22442254    SendCmd "glyphs color [Color2RGB $style(-color)] $tag"
    22452255    # Omitting field name for gorient and smode commands
    22462256    # defaults to active scalars or vectors depending on mode
    2247     SendCmd "glyphs gorient $style(-orientGlyphs) {} $tag"
    2248     set _settings(-glyphorient) $style(-orientGlyphs)
    2249     SendCmd "glyphs smode $style(-scaleMode) {} $tag"
    2250     set _settings(-glyphscalemode) $style(-scaleMode)
    2251     $itk_component(scaleMode) value "[$itk_component(scaleMode) label $style(-scaleMode)]"
     2257    SendCmd "glyphs gorient $style(-orientglyphs) {} $tag"
     2258    set _settings(-glyphorient) $style(-orientglyphs)
     2259    SendCmd "glyphs smode $style(-scalemode) {} $tag"
     2260    set _settings(-glyphscalemode) $style(-scalemode)
     2261    $itk_component(scaleMode) value "[$itk_component(scaleMode) label $style(-scalemode)]"
    22522262    SendCmd "glyphs quality $style(-quality) $tag"
    22532263    SendCmd "glyphs lighting $style(-lighting) $tag"
Note: See TracChangeset for help on using the changeset viewer.