Changeset 2497 for trunk/gui/scripts
- Timestamp:
- Sep 8, 2011, 8:59:43 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkviewer.tcl
r2494 r2497 185 185 # Initialize the view to some default parameters. 186 186 array set _view { 187 qw 1 187 188 qx 0 188 189 qy 0 189 190 qz 0 190 qw 1191 191 zoom 1.0 192 192 pan-x 0 … … 206 206 grid-z 0 207 207 visible 1 208 labels 1 208 209 }] 209 210 array set _volume [subst { … … 417 418 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 418 419 SendCmd "camera orient $q" 419 420 #SendCmd "ppmflush" 421 420 puts stderr "q=$q" 422 421 set _rotatePending 0 423 422 } … … 878 877 SendCmd "camera mode persp" 879 878 } 880 SendCmd "camera orient $q"879 DoRotate 881 880 PanCamera 881 set _first [lindex [get -objects] 0] 882 882 if { $_reset || $_first == "" } { 883 883 Zoom reset 884 884 set _reset 0 885 885 } 886 FixSettings axis-grid-x axis-grid-y axis-grid-z axis-mode axis-visible \ 886 FixSettings axis-grid-x axis-grid-y axis-grid-z axis-mode \ 887 axis-visible axis-labels \ 887 888 streamlines-seeds streamlines-visible streamlines-opacity \ 888 889 volume-edges volume-lighting volume-opacity volume-visible \ … … 920 921 } 921 922 } 922 923 923 if { !$_haveStreams } { 924 924 $itk_component(main) disable "Streams Settings" … … 930 930 } 931 931 } 932 932 foreach axis { x y z } { 933 set label [$_first hints ${axis}label] 934 if { $label != "" } { 935 SendCmd "axis name $axis $label" 936 } 937 set units [$_first hints ${axis}units] 938 if { $units != "" } { 939 SendCmd "axis units $axis $units" 940 } 941 } 942 933 943 set _buffering 0; # Turn off buffering. 934 944 … … 1006 1016 "reset" { 1007 1017 array set _view { 1008 qx 0 1009 qy01010 qz01011 qw 1 1018 qw 1 1019 qx 0 1020 qy 0 1021 qz 0 1012 1022 zoom 1.0 1013 1023 pan-x 0 … … 1023 1033 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 1024 1034 $_arcball quaternion $q 1035 DoRotate 1025 1036 } 1026 1037 } … … 1206 1217 set bool $_axis(visible) 1207 1218 SendCmd "axis visible all $bool" 1219 } 1220 "axis-labels" { 1221 set bool $_axis(labels) 1222 #SendCmd "axis labels all $bool" 1208 1223 } 1209 1224 "axis-grid-x" { … … 1581 1596 -font "Arial 9" 1582 1597 1598 checkbutton $inner.labels \ 1599 -text "Show Axis Labels" \ 1600 -variable [itcl::scope _axis(labels)] \ 1601 -command [itcl::code $this AdjustSetting axis-labels] \ 1602 -font "Arial 9" 1603 1583 1604 checkbutton $inner.gridx \ 1584 1605 -text "Show X Grid" \ … … 1607 1628 "furthest_triad" "furthest" \ 1608 1629 "outer_edges" "outer" 1609 $itk_component(axismode) value " outer"1630 $itk_component(axismode) value "static" 1610 1631 bind $inner.mode <<Value>> [itcl::code $this AdjustSetting axis-mode] 1611 1632 1612 1633 blt::table $inner \ 1613 1634 0,0 $inner.visible -anchor w -pady 2 -cspan 2 \ 1614 1,0 $inner.gridx -anchor w -pady 2 -cspan 2 \ 1615 2,0 $inner.gridy -anchor w -pady 2 -cspan 2 \ 1616 3,0 $inner.gridz -anchor w -pady 2 -cspan 2 \ 1617 4,0 $inner.mode_l -anchor w -pady 2 \ 1618 4,1 $inner.mode -fill x -pady 2 1635 1,0 $inner.labels -anchor w -pady 2 -cspan 2 \ 1636 2,0 $inner.gridx -anchor w -pady 2 -cspan 2 \ 1637 3,0 $inner.gridy -anchor w -pady 2 -cspan 2 \ 1638 4,0 $inner.gridz -anchor w -pady 2 -cspan 2 \ 1639 5,0 $inner.mode_l -anchor w -pady 2 \ 1640 5,1 $inner.mode -fill x -pady 2 1619 1641 1620 1642 blt::table configure $inner r* c* -resize none 1621 blt::table configure $inner r 5 c2-resize expand1643 blt::table configure $inner r6 c1 -resize expand 1622 1644 } 1623 1645 … … 1820 1842 array set settings $style 1821 1843 SendCmd "glyphs add sphere $tag" 1844 SendCmd "glyphs shape sphere $tag" 1822 1845 SendCmd "glyphs gscale $settings(-gscale) $tag" 1823 #SendCmd "glyphs wireframe $settings(-wireframe) $tag"1846 SendCmd "glyphs wireframe $settings(-wireframe) $tag" 1824 1847 #SendCmd "glyphs ccolor [Color2RGB $settings(-color)] $tag" 1825 1848 #SendCmd "glyphs colormode ccolor $tag" 1826 1849 SendCmd "glyphs smode vcomp $tag" 1827 #SendCmd "glyphs opacity $settings(-opacity) $tag"1850 SendCmd "glyphs opacity $settings(-opacity) $tag" 1828 1851 SendCmd "glyphs visible $settings(-visible) $tag" 1829 1852 set _haveSpheres 1 … … 1840 1863 } 1841 1864 array set settings $style 1842 parray settings1843 1865 SendCmd "polydata add $tag" 1844 1866 SendCmd "polydata visible $settings(-visible) $tag"
Note: See TracChangeset
for help on using the changeset viewer.