Changeset 1556 for trunk/gui


Ignore:
Timestamp:
Jul 23, 2009 10:41:31 AM (15 years ago)
Author:
gah
Message:

improve performance of global parameter changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/molvisviewer.tcl

    r1554 r1556  
    895895    debug "rebuild: rotate $_view(mx) $_view(my) $_view(mz)"
    896896
    897     projection update
     897    # foreach all models
    898898    spherescale update
    899899    stickradius update
    900900    labels update
     901    opacity update
    901902    cartoon update
    902903    cartoontrace update
     904
     905    projection update
    903906    representation update
    904     opacity update
    905907
    906908    set _buffering 0;                   # Turn off buffering.
     
    16171619    }
    16181620    set overrideradius [expr $radius * 0.8]
     1621    SendCmd "spherescale -model all $overrideradius"
    16191622    foreach model $models {
    16201623        if { [info exists _active($model)] } {
    16211624            SendCmd "spherescale -model $model $radius"
    1622         } else {
    1623             SendCmd "spherescale -model $model $overrideradius"
    16241625        }
    16251626    }
     
    16531654    }
    16541655    set overrideradius [expr $radius * 0.8]
     1656    SendCmd "stickradius -model all $overrideradius"
    16551657    foreach model $models {
    16561658        if { [info exists _active($model)] } {
    16571659            SendCmd "stickradius -model $model $radius"
    1658         } else {
    1659             SendCmd "stickradius -model $model $overrideradius"
    16601660        }
    16611661    }
     
    16901690    set overridetransparency 0.60
    16911691    set transparency [expr 1.0 - $opacity]
     1692    SendCmd "transparency -model all $overridetransparency"
    16921693    foreach model $models {
    16931694        if { [info exists _active($model)] } {
    16941695            SendCmd "transparency -model $model $transparency"
    1695         } else {
    1696             SendCmd "transparency -model $model $overridetransparency"
    16971696        }
    16981697    }
     
    17191718        set models [array names _mlist]
    17201719    }
    1721     set overrideshowlabels "off"
    1722     foreach model $models {
    1723         if { [info exists _active($model)] } {
    1724             SendCmd "label -model $model $showlabels"
    1725         } else {
    1726             SendCmd "label -model $model $overrideshowlabels"
     1720    SendCmd "label -model all off"
     1721    if { $showlabels } {
     1722        foreach model $models {
     1723            if { [info exists _active($model)] } {
     1724                SendCmd "label -model $model $showlabels"
     1725            }
    17271726        }
    17281727    }
     
    17491748        set models [array names _mlist]
    17501749    }
    1751     set overridecartoon "off"
    1752     foreach model $models {
    1753         if { [info exists _active($model)] } {
    1754             SendCmd "cartoon -model $model $cartoon"
    1755         } else {
    1756             SendCmd "cartoon -model $model $overridecartoon"
     1750    SendCmd "cartoon -model all off"
     1751    if { $cartoon } {
     1752        foreach model $models {
     1753            if { [info exists _active($model)] } {
     1754                SendCmd "cartoon -model $model $cartoon"
     1755            }
    17571756        }
    17581757    }
     
    17791778        set models [array names _mlist]
    17801779    }
    1781     set overridetrace "off"
    1782     foreach model $models {
    1783         if { [info exists _active($model)] } {
    1784             SendCmd "cartoontrace -model $model $trace"
    1785         } else {
    1786             SendCmd "cartoontrace -model $model $overridetrace"
    1787         }
    1788     }
    1789 }
     1780    SendCmd "cartoontrace -model all off"
     1781    if { $trace } {
     1782        foreach model $models {
     1783            if { [info exists _active($model)] } {
     1784                SendCmd "cartoontrace -model $model $trace"
     1785            }
     1786        }
     1787    }
     1788}
Note: See TracChangeset for help on using the changeset viewer.