Changeset 4693
- Timestamp:
- Nov 10, 2014 1:39:31 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3/gui/scripts/nanovisviewer.tcl
r4680 r4693 238 238 -thickness 350 239 239 -volume 1 240 -volumeopacity 1.0240 -volumeopacity 0.5 241 241 -volumevisible 1 242 242 -xcutplaneposition 50 … … 251 251 } 252 252 array set _widget { 253 -volumeopacity 100253 -volumeopacity 50 254 254 } 255 255 itk_component add 3dview { … … 1318 1318 set _settings($what) [expr $_widget($what) * 0.01] 1319 1319 set _settings($_current${what}) $_settings($what) 1320 1321 foreach {cmap wmap} $_cname2transferFunction($_current) break 1322 set wmap [ComputeAlphamap $_current] 1323 set _cname2transferFunction($_current) [list $cmap $wmap] 1324 SendCmd [list transfunc define $_current $cmap $wmap] 1320 foreach tag [GetDatasetsWithComponent $_current] { 1321 SendCmd "volume shading opacity $_settings($what) $tag" 1322 } 1325 1323 } 1326 1324 "-volumevisible" { … … 2249 2247 set isovalues [$_transferFunctionEditors($cname) values] 2250 2248 2251 # Currently using volume shading opacity to scale opacity in 2252 # the volume shader. 2253 set max $_settings($cname-volumeopacity) 2249 # Transfer function should be normalized with [0,1] range 2250 # The volume shading opacity setting is used to scale opacity 2251 # in the volume shader. 2252 set max 1.0 2254 2253 2255 2254 # Use the component-wise thickness setting from the slider … … 2471 2470 itcl::body Rappture::NanovisViewer::SetObjectStyle { dataobj cname } { 2472 2471 array set styles { 2473 -opacity 0. 62472 -opacity 0.5 2474 2473 } 2475 2474 array set styles [lindex [$dataobj components -style $cname] 0] 2476 2475 set _settings($cname-volumeopacity) $styles(-opacity) 2476 set tag $dataobj-$cname 2477 SendCmd "volume shading opacity $_settings($cname-volumeopacity) $tag" 2477 2478 NameTransferFunction $dataobj $cname 2478 2479 }
Note: See TracChangeset
for help on using the changeset viewer.