- Timestamp:
- Nov 12, 2014, 10:04:55 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/nanovisviewer.tcl
r4686 r4709 221 221 -axesvisible 1 222 222 -background black 223 -colormap default223 -colormap "default" 224 224 -cutplanesvisible 0 225 225 -diffuse 40 … … 557 557 itcl::body Rappture::NanovisViewer::scale {args} { 558 558 array set styles { 559 -color BCGYR560 -levels 6561 -markers ""559 -color BCGYR 560 -levels 6 561 -markers "" 562 562 } 563 563 array unset _limits … … 911 911 DoResize 912 912 } 913 913 914 foreach dataobj [get] { 914 915 foreach cname [$dataobj components] { … … 1708 1709 $inner configure -borderwidth 4 1709 1710 1710 set f ont[option get $itk_component(hull) font Font]1711 #set bf ont[option get $itk_component(hull) boldFont Font]1711 set fg [option get $itk_component(hull) font Font] 1712 #set bfg [option get $itk_component(hull) boldFont Font] 1712 1713 1713 1714 label $inner.lighting_l \ … … 1715 1716 -font "Arial 9 bold" 1716 1717 1717 checkbutton $inner.light2side \ 1718 -text "Two-sided lighting" \ 1719 -font $font \ 1718 checkbutton $inner.light2side -text "Two-sided lighting" -font $fg \ 1720 1719 -variable [itcl::scope _settings(-light2side)] \ 1721 1720 -command [itcl::code $this AdjustSetting -light2side] 1722 1721 1723 checkbutton $inner.visibility \ 1724 -text "Visible" \ 1725 -font $font \ 1722 checkbutton $inner.visibility -text "Visible" -font $fg \ 1726 1723 -variable [itcl::scope _settings(-volumevisible)] \ 1727 1724 -command [itcl::code $this AdjustSetting -volumevisible] \ 1728 1725 1729 label $inner.ambient_l \ 1730 -text "Ambient" \ 1731 -font $font 1726 label $inner.ambient_l -text "Ambient" -font $fg 1732 1727 ::scale $inner.ambient -from 0 -to 100 -orient horizontal \ 1733 1728 -variable [itcl::scope _settings(-ambient)] \ … … 1735 1730 -troughcolor grey92 1736 1731 1737 label $inner.diffuse_l -text "Diffuse" -font $f ont1732 label $inner.diffuse_l -text "Diffuse" -font $fg 1738 1733 ::scale $inner.diffuse -from 0 -to 100 -orient horizontal \ 1739 1734 -variable [itcl::scope _settings(-diffuse)] \ … … 1741 1736 -troughcolor grey92 1742 1737 1743 label $inner.specularLevel_l -text "Specular" -font $f ont1738 label $inner.specularLevel_l -text "Specular" -font $fg 1744 1739 ::scale $inner.specularLevel -from 0 -to 100 -orient horizontal \ 1745 1740 -variable [itcl::scope _settings(-specularlevel)] \ … … 1748 1743 -troughcolor grey92 1749 1744 1750 label $inner.specularExponent_l -text "Shininess" -font $f ont1745 label $inner.specularExponent_l -text "Shininess" -font $fg 1751 1746 ::scale $inner.specularExponent -from 10 -to 128 -orient horizontal \ 1752 1747 -variable [itcl::scope _settings(-specularexponent)] \ … … 1755 1750 -troughcolor grey92 1756 1751 1757 label $inner.opacity_l -text "Opacity" -font $f ont1752 label $inner.opacity_l -text "Opacity" -font $fg 1758 1753 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1759 1754 -variable [itcl::scope _settings(-opacity)] \ … … 1764 1759 -text "Transfer Function" -font "Arial 9 bold" 1765 1760 1766 label $inner.thin -text "Thin" -font $f ont1761 label $inner.thin -text "Thin" -font $fg 1767 1762 ::scale $inner.thickness -from 0 -to 1000 -orient horizontal \ 1768 1763 -variable [itcl::scope _settings(-thickness)] \ … … 1770 1765 -troughcolor grey92 1771 1766 1772 label $inner.thick -text "Thick" -font $f ont1773 1774 label $inner.colormap_l -text "Colormap" -font $f ont1767 label $inner.thick -text "Thick" -font $fg 1768 1769 label $inner.colormap_l -text "Colormap" -font $fg 1775 1770 itk_component add colormap { 1776 1771 Rappture::Combobox $inner.colormap -width 10 -editable no … … 1783 1778 set _settings(-colormap) "default" 1784 1779 1785 label $inner.volcomponents_l -text "Component" -font $f ont1780 label $inner.volcomponents_l -text "Component" -font $fg 1786 1781 itk_component add volcomponents { 1787 1782 Rappture::Combobox $inner.volcomponents -editable no … … 2155 2150 # InitComponentSettings -- 2156 2151 # 2157 # Initializes the volume settings for a specific component. This 2158 # should match what's used as global settings above. This 2159 # is called the first time we try to switch to a given component 2160 # in SwitchComponent below. 2152 # Initializes the volume settings for a specific component. This should 2153 # match what's used as global settings above. This is called the first 2154 # time we try to switch to a given component in SwitchComponent below. 2161 2155 # 2162 2156 itcl::body Rappture::NanovisViewer::InitComponentSettings { cname } { … … 2178 2172 # SwitchComponent -- 2179 2173 # 2180 # This is called when the current component is changed by the2181 # dropdown menu in the volume tab. It synchronizes the global2182 # volume settingswith the settings of the new current component.2174 # This is called when the current component is changed by the dropdown 2175 # menu in the volume tab. It synchronizes the global volume settings 2176 # with the settings of the new current component. 2183 2177 # 2184 2178 itcl::body Rappture::NanovisViewer::SwitchComponent { cname } { … … 2203 2197 # BuildVolumeComponents -- 2204 2198 # 2205 # This is called from the "scale" method which is called when a2206 # new dataset is added or deleted. It repopulates the dropdown2207 # menu of volume component names. It sets the current component2208 # to the first component in the list (of components found).2209 # Finally, if there is only one component, don't displaythe2210 # label or the combobox in thevolume settings tab.2199 # This is called from the "scale" method which is called when a new 2200 # dataset is added or deleted. It repopulates the dropdown menu of 2201 # volume component names. It sets the current component to the first 2202 # component in the list (of components found). Finally, if there is 2203 # only one component, don't display the label or the combobox in the 2204 # volume settings tab. 2211 2205 # 2212 2206 itcl::body Rappture::NanovisViewer::BuildVolumeComponents {} { … … 2234 2228 # GetDatasetsWithComponents -- 2235 2229 # 2236 # Returns a list of all the datasets (known by the combination of2237 # their data object and component name) that match the given2238 # component name. For example, this is used where we want to change2239 # the settings ofvolumes that have the current component.2230 # Returns a list of all the datasets (known by the combination of their 2231 # data object and component name) that match the given component name. 2232 # For example, this is used where we want to change the settings of 2233 # volumes that have the current component. 2240 2234 # 2241 2235 itcl::body Rappture::NanovisViewer::GetDatasetsWithComponent { cname } { … … 2256 2250 # HideAllMarkers -- 2257 2251 # 2258 # Hide all the markers in all the transfer functions. Can't simply2259 # delete and recreate markers from the <style> since the user may2260 # have create, deleted, or moved markers.2252 # Hide all the markers in all the transfer functions. Can't simply 2253 # delete and recreate markers from the <style> since the user may have 2254 # created, deleted, or moved markers. 2261 2255 # 2262 2256 itcl::body Rappture::NanovisViewer::HideAllMarkers {} {
Note: See TracChangeset
for help on using the changeset viewer.