Changeset 4558 for branches/1.3/gui/scripts
- Timestamp:
- Jul 17, 2014, 10:22:29 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3/gui/scripts/nanovisviewer.tcl
r4551 r4558 221 221 222 222 array set _settings { 223 -axesvisible 1224 -background black225 -colormap default226 -cutplanesvisible 0227 -gridvisible 0228 -isosurfaceshading 0229 -legendvisible 1230 -light2side 1231 -outlinevisible 0232 -qw 0.853553233 -qx -0.353553234 -qy 0.353553235 -qz 0.146447236 -thickness 350237 -volume 1238 -volumeopacity 0.5239 -volumevisible 1240 -xcutplaneposition 50241 -xcutplanevisible 1242 -xpan 0243 -ycutplaneposition 50244 -ycutplanevisible 1245 -ypan 0246 -zcutplaneposition 50247 -zcutplanevisible 1248 -zoom 1.0223 -axesvisible 1 224 -background black 225 -colormap default 226 -cutplanesvisible 0 227 -gridvisible 0 228 -isosurfaceshading 0 229 -legendvisible 1 230 -light2side 1 231 -outlinevisible 0 232 -qw 0.853553 233 -qx -0.353553 234 -qy 0.353553 235 -qz 0.146447 236 -thickness 350 237 -volume 1 238 -volumeopacity 0.5 239 -volumevisible 1 240 -xcutplaneposition 50 241 -xcutplanevisible 1 242 -xpan 0 243 -ycutplaneposition 50 244 -ycutplanevisible 1 245 -ypan 0 246 -zcutplaneposition 50 247 -zcutplanevisible 1 248 -zoom 1.0 249 249 } 250 250 array set _widget { … … 1210 1210 SendCmd "axis visible $_settings($what)" 1211 1211 } 1212 "-background" { 1213 set bgcolor [$itk_component(background) value] 1214 array set fgcolors { 1215 "black" "white" 1216 "white" "black" 1217 "grey" "black" 1218 } 1219 configure -plotbackground $bgcolor \ 1220 -plotforeground $fgcolors($bgcolor) 1221 DrawLegend $_current 1222 } 1212 1223 "-colormap" { 1213 1224 set color [$itk_component(colormap) value] … … 1237 1248 } 1238 1249 } 1239 "-background" {1240 set bgcolor [$itk_component(background) value]1241 array set fgcolors {1242 "black" "white"1243 "white" "black"1244 "grey" "black"1245 }1246 configure -plotbackground $bgcolor \1247 -plotforeground $fgcolors($bgcolor)1248 DrawLegend $_current1249 }1250 1250 "-gridvisible" { 1251 1251 SendCmd "grid visible $_settings($what)" … … 1265 1265 } 1266 1266 "-light" { 1267 set _settings($_current${what}) $_settings($what) 1267 1268 set val $_settings($what) 1268 1269 set diffuse [expr {0.01*$val}] … … 1270 1271 set specularLevel 0.3 1271 1272 set specularExp 90.0 1272 SendCmd "volume shading ambient $ambient" 1273 SendCmd "volume shading diffuse $diffuse" 1274 SendCmd "volume shading specularLevel $specularLevel" 1275 SendCmd "volume shading specularExp $specularExp" 1273 foreach tag [GetDatasetsWithComponent $_current] { 1274 SendCmd "volume shading ambient $ambient $tag" 1275 SendCmd "volume shading diffuse $diffuse $tag" 1276 SendCmd "volume shading specularLevel $specularLevel $tag" 1277 SendCmd "volume shading specularExp $specularExp $tag" 1278 } 1276 1279 } 1277 1280 "-light2side" { 1281 set _settings($_current${what}) $_settings($what) 1278 1282 set val $_settings($what) 1279 SendCmd "volume shading light2side $val" 1283 foreach tag [GetDatasetsWithComponent $_current] { 1284 SendCmd "volume shading light2side $val" 1285 } 1280 1286 } 1281 1287 "-volumeopacity" { … … 1648 1654 1649 1655 $itk_component(background) value $_settings(-background) 1650 bind $inner.background <<Value>> [itcl::code $this AdjustSetting -background] 1656 bind $inner.background <<Value>> \ 1657 [itcl::code $this AdjustSetting -background] 1651 1658 1652 1659 blt::table $inner \ … … 1714 1721 } 1715 1722 1716 $inner.colormap choices insert end [GetColormapList -includeNone] 1717 $itk_component(colormap) value "BCGYR" 1723 $inner.colormap choices insert end [GetColormapList -includeDefault -includeNone] 1718 1724 bind $inner.colormap <<Value>> \ 1719 1725 [itcl::code $this AdjustSetting -colormap]
Note: See TracChangeset
for help on using the changeset viewer.