- Timestamp:
- Jun 24, 2014, 1:37:46 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkmeshviewer.tcl
r4344 r4419 69 69 protected method DoRotate {} 70 70 protected method AdjustSetting {what {value ""}} 71 protected method FixSettings { args }71 protected method InitSettings { args } 72 72 protected method Pan {option x y} 73 73 protected method Pick {x y} … … 201 201 }] 202 202 array set _settings [subst { 203 outline 0 203 204 polydata-edges 0 204 205 polydata-lighting 1 … … 831 832 $_arcball resize $w $h 832 833 DoResize 833 FixSettings axis-xgrid axis-ygrid axis-zgrid axis-mode \ 834 axis-visible axis-labels polydata-edges polydata-lighting polydata-opacity \ 835 polydata-visible polydata-wireframe 834 InitSettings axis-xgrid axis-ygrid axis-zgrid axis-mode \ 835 axis-visible axis-labels 836 836 837 837 StopBufferingCommands … … 896 896 } 897 897 } 898 InitSettings outline 898 899 if { $_reset } { 900 # These are settings that rely on a dataset being loaded. 901 InitSettings polydata-edges polydata-lighting polydata-opacity \ 902 polydata-visible polydata-wireframe 903 899 904 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 900 905 $_arcball quaternion $q … … 1123 1128 1124 1129 # ---------------------------------------------------------------------- 1125 # USAGE: FixSettings <what> ?<value>?1130 # USAGE: InitSettings <what> ?<value>? 1126 1131 # 1127 1132 # Used internally to update rendering settings whenever parameters … … 1129 1134 # to the back end. 1130 1135 # ---------------------------------------------------------------------- 1131 itcl::body Rappture::VtkMeshViewer:: FixSettings { args } {1136 itcl::body Rappture::VtkMeshViewer::InitSettings { args } { 1132 1137 foreach setting $args { 1133 1138 AdjustSetting $setting … … 1147 1152 } 1148 1153 switch -- $what { 1154 "outline" { 1155 set bool $_settings(outline) 1156 foreach dataset [CurrentDatasets -visible $_first] { 1157 SendCmd "outline visible $bool $dataset" 1158 } 1159 } 1149 1160 "polydata-opacity" { 1150 1161 foreach dataset [CurrentDatasets -visible $_first] { … … 1310 1321 -font "Arial 9" -anchor w 1311 1322 1323 checkbutton $inner.outline \ 1324 -text "Show Outline" \ 1325 -variable [itcl::scope _settings(outline)] \ 1326 -command [itcl::code $this AdjustSetting outline] \ 1327 -font "Arial 9" -anchor w 1328 1312 1329 checkbutton $inner.wireframe \ 1313 1330 -text "Show Wireframe" \ … … 1349 1366 blt::table $inner \ 1350 1367 0,0 $inner.mesh -cspan 2 -anchor w -pady 2 \ 1351 1,0 $inner.wireframe -cspan 2 -anchor w -pady 2 \ 1352 2,0 $inner.lighting -cspan 2 -anchor w -pady 2 \ 1353 3,0 $inner.edges -cspan 2 -anchor w -pady 2 \ 1354 4,0 $inner.opacity_l -anchor w -pady 2 \ 1355 4,1 $inner.opacity -fill x -pady 2 1368 1,0 $inner.outline -cspan 2 -anchor w -pady 2 \ 1369 2,0 $inner.wireframe -cspan 2 -anchor w -pady 2 \ 1370 3,0 $inner.lighting -cspan 2 -anchor w -pady 2 \ 1371 4,0 $inner.edges -cspan 2 -anchor w -pady 2 \ 1372 5,0 $inner.opacity_l -anchor w -pady 2 \ 1373 5,1 $inner.opacity -fill x -pady 2 1356 1374 1357 1375 blt::table configure $inner r* c* -resize none 1358 blt::table configure $inner r 6c1 -resize expand1376 blt::table configure $inner r7 c1 -resize expand 1359 1377 } 1360 1378 … … 1729 1747 -linewidth 1.0 1730 1748 -opacity 1.0 1749 -outline 0 1731 1750 -visible 1 1732 1751 -wireframe 0 … … 1741 1760 set settings(-color) $color 1742 1761 } 1762 SendCmd "outline add $tag" 1763 SendCmd "outline color [Color2RGB $settings(-color)] $tag" 1764 SendCmd "outline visible $settings(-outline) $tag" 1765 set _settings(outline) $settings(-outline) 1766 1743 1767 SendCmd "polydata add $tag" 1744 1768 SendCmd "polydata visible $settings(-visible) $tag"
Note: See TracChangeset
for help on using the changeset viewer.