Changeset 4151 for trunk/gui/scripts
- Timestamp:
- Jan 27, 2014 7:53:06 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkglyphviewer.tcl
r4075 r4151 970 970 if { ![info exists _datasets($tag)] } { 971 971 set bytes [$dataobj vtkdata $comp] 972 if 1{972 if 0 { 973 973 set f [open "/tmp/glyph.vtk" "w"] 974 974 puts $f $bytes … … 2053 2053 -edgecolor black 2054 2054 -linewidth 1.0 2055 -ptsize 1.0 2055 2056 -opacity 1.0 2056 2057 -wireframe 0 2057 2058 -lighting 1 2058 2059 -outline 0 2059 -levels 10 2060 -shape "arrow" 2061 -orientGlyphs 1 2062 -scaleMode "vmag" 2063 -quality 1 2064 } 2065 set numComponents [$dataobj numComponents $comp] 2066 if {$numComponents == 3} { 2067 set style(-shape) "arrow" 2068 set style(-orientGlyphs) 1 2069 set style(-scaleMode) "vmag" 2070 } else { 2071 set style(-shape) "sphere" 2072 set style(-orientGlyphs) 0 2073 set style(-scaleMode) "scalar" 2060 2074 } 2061 2075 array set style [$dataobj style $comp] 2062 2076 if { $dataobj != $_first } { 2063 2077 set style(-opacity) 1 2064 }2065 if { $_currentColormap == "" } {2066 set stylelist [$dataobj style $comp]2067 if { $stylelist != "" } {2068 array set style $stylelist2069 set stylelist [array get style]2070 SetCurrentColormap $stylelist2071 }2072 $itk_component(colormap) value $style(-color)2073 2078 } 2074 2079 if 0 { … … 2095 2100 } 2096 2101 set _currentOpacity $style(-opacity) 2097 SendCmd "glyphs add arrow$tag"2102 SendCmd "glyphs add $style(-shape) $tag" 2098 2103 SendCmd "glyphs edges $style(-edges) $tag" 2099 2104 # normscale=1 and gscale=1 are defaults … … 2107 2112 set _settings(glyphEdges) $style(-edges) 2108 2113 #SendCmd "glyphs color [Color2RGB $settings(-color)] $tag" 2114 # Omitting field name for gorient and smode commands 2115 # defaults to active scalars or vectors depending on mode 2116 SendCmd "glyphs gorient $style(-orientGlyphs) {} $tag" 2117 SendCmd "glyphs smode $style(-scaleMode) {} $tag" 2118 SendCmd "glyphs quality $style(-quality) $tag" 2109 2119 SendCmd "glyphs lighting $style(-lighting) $tag" 2110 2120 set _settings(glyphLighting) $style(-lighting) 2111 2121 SendCmd "glyphs linecolor [Color2RGB $style(-edgecolor)] $tag" 2112 2122 SendCmd "glyphs linewidth $style(-linewidth) $tag" 2123 SendCmd "glyphs ptsize $style(-ptsize) $tag" 2113 2124 SendCmd "glyphs opacity $_currentOpacity $tag" 2114 2125 set _settings(glyphOpacity) $style(-opacity)
Note: See TracChangeset
for help on using the changeset viewer.