Ignore:
Timestamp:
Jul 17, 2014 1:39:52 PM (10 years ago)
Author:
ldelgass
Message:

Style settings for mesh should not include "polydata", since there is only the
polydata. Polydata was a holdover from the drawing viewer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3/gui/scripts/vtkmeshviewer.tcl

    r4524 r4534  
    17311731    set tag $dataobj
    17321732    set type [$dataobj type]
    1733     set color [$dataobj hints color]
    1734     set style [$dataobj hints style]
    1735     if { $dataobj != $_first } {
    1736         set settings(-polydatawireframe) 1
    1737     }
    1738 
    1739     array set settings {
     1733
     1734    array set style {
    17401735        -cloudstyle mesh
    17411736        -color white
    17421737        -edgecolor black
     1738        -edges 1
     1739        -lighting 1
    17431740        -linewidth 1.0
     1741        -opacity 1.0
    17441742        -outline 0
    1745         -polydataedges 1
    1746         -polydatalighting 1
    1747         -polydataopacity 1.0
    1748         -polydatavisible 1
    1749         -polydatawireframe 0
     1743        -visible 1
     1744        -wireframe 0
     1745    }
     1746    if { $dataobj != $_first } {
     1747        set style(-wireframe) 1
    17501748    }
    17511749    if {$type == "cloud"} {
    1752         set settings(-cloudstyle) points
    1753         set settings(-polydataedges) 0
    1754         set settings(-edgecolor) white
    1755     }
    1756     array set settings $style
    1757     if {$color != ""} {
    1758         set settings(-color) $color
     1750        set style(-cloudstyle) points
     1751        set style(-edges) 0
     1752        set style(-edgecolor) white
     1753    }
     1754    array set style [$dataobj hints style]
     1755
     1756    if {[$dataobj hints color] != ""} {
     1757        set style(-color) [$dataobj hints color]
    17591758    }
    17601759    SendCmd "outline add $tag"
    1761     SendCmd "outline color [Color2RGB $settings(-color)] $tag"
    1762     SendCmd "outline visible $settings(-outline) $tag"
    1763     set _settings(-outline) $settings(-outline)
     1760    SendCmd "outline color [Color2RGB $style(-color)] $tag"
     1761    SendCmd "outline visible $style(-outline) $tag"
     1762    set _settings(-outline) $style(-outline)
    17641763
    17651764    SendCmd "polydata add $tag"
    1766     SendCmd "polydata visible $settings(-polydatavisible) $tag"
    1767     SendCmd "polydata cloudstyle $settings(-cloudstyle) $tag"
    1768     set _settings(-polydatavisible) $settings(-polydatavisible)
    1769     SendCmd "polydata edges $settings(-polydataedges) $tag"
    1770     set _settings(-polydataedges) $settings(-polydataedges)
    1771     SendCmd "polydata color [Color2RGB $settings(-color)] $tag"
    1772 
    1773     SendCmd "polydata lighting $settings(-polydatalighting) $tag"
    1774     set _settings(-polydatalighting) $settings(-polydatalighting)
    1775     SendCmd "polydata linecolor [Color2RGB $settings(-edgecolor)] $tag"
    1776     SendCmd "polydata linewidth $settings(-linewidth) $tag"
    1777     SendCmd "polydata opacity $settings(-polydataopacity) $tag"
    1778     set _settings(-polydataopacity) $settings(-polydataopacity)
    1779     set _widget(-polydataopacity) [expr 100.0 * $settings(-polydataopacity)]
    1780     SendCmd "polydata wireframe $settings(-polydatawireframe) $tag"
    1781     set _settings(-polydatawireframe) $settings(-polydatawireframe)
     1765    SendCmd "polydata visible $style(-visible) $tag"
     1766    set _settings(-polydatavisible) $style(-visible)
     1767    SendCmd "polydata cloudstyle $style(-cloudstyle) $tag"
     1768    SendCmd "polydata edges $style(-edges) $tag"
     1769    set _settings(-polydataedges) $style(-edges)
     1770    SendCmd "polydata color [Color2RGB $style(-color)] $tag"
     1771    SendCmd "polydata lighting $style(-lighting) $tag"
     1772    set _settings(-polydatalighting) $style(-lighting)
     1773    SendCmd "polydata linecolor [Color2RGB $style(-edgecolor)] $tag"
     1774    SendCmd "polydata linewidth $style(-linewidth) $tag"
     1775    SendCmd "polydata opacity $style(-opacity) $tag"
     1776    set _settings(-polydataopacity) $style(-opacity)
     1777    set _widget(-polydataopacity) [expr 100.0 * $style(-opacity)]
     1778    SendCmd "polydata wireframe $style(-wireframe) $tag"
     1779    set _settings(-polydatawireframe) $style(-wireframe)
    17821780    set havePolyData 1
    17831781}
Note: See TracChangeset for help on using the changeset viewer.