- Timestamp:
- Sep 8, 2011, 4:10:52 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkviewer.tcl
r2489 r2490 912 912 } 913 913 lappend _obj2datasets($dataobj) $tag 914 SetObjectStyle $dataobj $comp915 # Must create streamlines before setting colormap.916 914 if { [info exists _obj2ovride($dataobj-raise)] } { 917 915 SendCmd "dataset visible 1 $tag" … … 919 917 SendCmd "dataset visible 0 $tag" 920 918 } 919 SetObjectStyle $dataobj $comp 921 920 } 922 921 } … … 1319 1318 if { [info exists _colormaps($colormap)] } { 1320 1319 puts stderr "Colormap $colormap already built" 1320 return $colormap 1321 1321 } 1322 1322 if { ![info exists _dataset2style($tag)] } { … … 1337 1337 } 1338 1338 "spheres" { 1339 SendCmd "glyphs colormap $colormap $tag"1339 #SendCmd "glyphs colormap $colormap $tag" 1340 1340 } 1341 1341 } … … 1784 1784 set type [$dataobj type $comp] 1785 1785 set style [$dataobj style $comp] 1786 array set props $style1786 puts stderr "style $dataobj-$comp \"$style\"" 1787 1787 if { $dataobj != $_first } { 1788 set props(-wireframe) 11788 set settings(-wireframe) 1 1789 1789 } 1790 1790 if { $type == "streamlines" } { 1791 array set props {1791 array set settings { 1792 1792 -color \#808080 1793 -edge visibility01793 -edges 0 1794 1794 -edgecolor black 1795 1795 -linewidth 1.0 … … 1799 1799 -seeds 1 1800 1800 -seedcolor white 1801 } 1801 -visible 1 1802 } 1803 array set settings $style 1802 1804 SendCmd "streamlines add $tag" 1803 1805 SendCmd "streamlines seed visible off" … … 1805 1807 set _haveStreams 1 1806 1808 } elseif { $type == "spheres" } { 1807 array set props {1809 array set settings { 1808 1810 -color \#808080 1809 -edgevisibility 0 1810 -edgecolor black 1811 -linewidth 1.0 1812 -opacity 0.4 1813 -wireframe 0 1814 -lighting 1 1815 } 1816 SendCmd "glyphs add $tag" 1817 SendCmd "glyphs shape sphere $tag" 1818 SendCmd "glyphs gscale 0.5 $tag" 1819 SendCmd "glyphs visible 1 $tag" 1820 SendCmd "glyphs wireframe $props(-wireframe) $tag" 1821 SendCmd "glyphs ccolor 0.9 0.2 0.1 $tag" 1822 SendCmd "glyphs colormode ccolor $tag" 1823 SendCmd "glyphs opacity 1.0 $tag" 1824 set _haveSpheres 1 1825 } else { 1826 array set props { 1827 -color \#6666FF 1828 -edgevisibility 1 1811 -gscale 1 1812 -edges 0 1829 1813 -edgecolor black 1830 1814 -linewidth 1.0 … … 1832 1816 -wireframe 0 1833 1817 -lighting 1 1834 } 1818 -visible 1 1819 } 1820 array set settings $style 1821 SendCmd "glyphs add $tag" 1822 SendCmd "glyphs shape sphere $tag" 1823 SendCmd "glyphs gscale $settings(-gscale) $tag" 1824 #SendCmd "glyphs wireframe $settings(-wireframe) $tag" 1825 #SendCmd "glyphs ccolor [Color2RGB $settings(-color)] $tag" 1826 #SendCmd "glyphs colormode ccolor $tag" 1827 SendCmd "glyphs smode vcomp $tag" 1828 #SendCmd "glyphs opacity $settings(-opacity) $tag" 1829 SendCmd "glyphs visible $settings(-visible) $tag" 1830 set _haveSpheres 1 1831 } else { 1832 array set settings { 1833 -color \#6666FF 1834 -edges 1 1835 -edgecolor black 1836 -linewidth 1.0 1837 -opacity 1.0 1838 -wireframe 0 1839 -lighting 1 1840 -visible 1 1841 } 1842 array set settings $style 1843 parray settings 1835 1844 SendCmd "polydata add $tag" 1845 SendCmd "polydata visible $settings(-visible) $tag" 1846 set _volume(visible) $settings(-visible) 1836 1847 } 1837 1848 if { $type != "spheres" } { 1838 SendCmd "polydata edges $props(-edgevisibility) $tag" 1839 SendCmd "polydata color [Color2RGB $props(-color)] $tag" 1840 SendCmd "polydata lighting $props(-lighting) $tag" 1841 SendCmd "polydata linecolor [Color2RGB $props(-edgecolor)] $tag" 1842 SendCmd "polydata linewidth $props(-linewidth) $tag" 1843 SendCmd "polydata opacity $props(-opacity) $tag" 1844 SendCmd "polydata wireframe $props(-wireframe) $tag" 1845 } 1846 set _volume(opacity) [expr $props(-opacity) * 100.0] 1849 SendCmd "polydata edges $settings(-edges) $tag" 1850 set _volume(edges) $settings(-edges) 1851 SendCmd "polydata color [Color2RGB $settings(-color)] $tag" 1852 SendCmd "polydata lighting $settings(-lighting) $tag" 1853 set _volume(lighting) $settings(-lighting) 1854 SendCmd "polydata linecolor [Color2RGB $settings(-edgecolor)] $tag" 1855 SendCmd "polydata linewidth $settings(-linewidth) $tag" 1856 SendCmd "polydata opacity $settings(-opacity) $tag" 1857 set _volume(opacity) $settings(-opacity) 1858 SendCmd "polydata wireframe $settings(-wireframe) $tag" 1859 set _volume(wireframe) $settings(-wireframe) 1860 } 1861 set _volume(opacity) [expr $settings(-opacity) * 100.0] 1847 1862 SetColormap $dataobj $comp 1848 1863 }
Note: See TracChangeset
for help on using the changeset viewer.