Changeset 6464 for trunk


Ignore:
Timestamp:
Aug 3, 2016, 11:14:25 PM (8 years ago)
Author:
ldelgass
Message:

Ignore "none" in SetColormap?

Location:
trunk/gui/scripts
Files:
2 edited

Legend:

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

    r6461 r6464  
    15051505    array set style {
    15061506        -cloudstyle mesh
    1507         -color white
     1507        -constcolor white
    15081508        -edgecolor black
    15091509        -edges 1
     
    15241524
    15251525    if {[$dataobj hints color] != ""} {
    1526         set style(-color) [$dataobj hints color]
     1526        set style(-constcolor) [$dataobj hints color]
    15271527    }
    15281528    SendCmd "outline add $tag"
    1529     SendCmd "outline color [Color2RGB $style(-color)] $tag"
     1529    SendCmd "outline color [Color2RGB $style(-constcolor)] $tag"
    15301530    SendCmd "outline visible $style(-outline) $tag"
    15311531    set _settings(-outline) $style(-outline)
     
    15371537    SendCmd "polydata edges $style(-edges) $tag"
    15381538    set _settings(-polydataedges) $style(-edges)
    1539     SendCmd "polydata color [Color2RGB $style(-color)] $tag"
     1539    SendCmd "polydata color [Color2RGB $style(-constcolor)] $tag"
    15401540    SendCmd "polydata lighting $style(-lighting) $tag"
    15411541    set _settings(-polydatalighting) $style(-lighting)
  • trunk/gui/scripts/vtkviewer.tcl

    r6461 r6464  
    18221822
    18231823    set name "$style(-color)"
    1824     if { ![info exists _colormaps($name)] } {
     1824    if { $name != "none" && ![info exists _colormaps($name)] } {
    18251825        BuildColormap $name
    18261826        set _colormaps($name) 1
     
    18291829         $_dataset2style($tag) != $name } {
    18301830        set _dataset2style($tag) $name
    1831         switch -- [$dataobj type $comp] {
    1832             "polydata" {
    1833                 SendCmd "polydata colormap $name $tag"
    1834             }
    1835             "glyphs" {
    1836                 SendCmd "glyphs colormap $name $tag"
    1837             }
    1838             "molecule" {
    1839                 SendCmd "molecule colormap $name $tag"
     1831        if { $name != "none" } {
     1832            switch -- [$dataobj type $comp] {
     1833                "polydata" {
     1834                    SendCmd "polydata colormap $name $tag"
     1835                }
     1836                "glyphs" {
     1837                    SendCmd "glyphs colormap $name $tag"
     1838                }
     1839                "molecule" {
     1840                    SendCmd "molecule colormap $name $tag"
     1841                }
    18401842            }
    18411843        }
Note: See TracChangeset for help on using the changeset viewer.