Changeset 2613 for trunk/gui/scripts


Ignore:
Timestamp:
Oct 12, 2011, 1:01:22 PM (13 years ago)
Author:
gah
Message:
 
Location:
trunk/gui/scripts
Files:
2 edited

Legend:

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

    r2606 r2613  
    697697        #debug "CACHED: $tag,$cacheid"
    698698        $_image(plot) configure -data $data
     699        if 0 {
    699700        $_image(plot) write dummy.jpg -format jpeg
    700701        puts stderr "image width=[image width $_image(plot)] height=[image height $_image(plot)]"
    701702        puts stderr "screen width=$_width height=$_height"
     703        }
    702704        set _image(id) $tag
    703705    }
     
    969971        set readyForNextFrame 0;        # Don't advance to the next frame
    970972                                        # until we get an image.
    971         SendCmd "bmp";                  # Flush the results.
     973        SendCmd "ppm";                  # Flush the results.
    972974    }
    973975    set _buffering 0;                   # Turn off buffering.
  • trunk/gui/scripts/vtkstreamlinesviewer.tcl

    r2611 r2613  
    974974    set _first ""
    975975    InitSettings axis-xgrid axis-ygrid axis-zgrid axis-mode \
    976         axis-visible axis-labels
     976        axis-visible axis-labels cutplane-visible \
     977        cutplane-xposition cutplane-yposition cutplane-zposition \
     978        cutplane-xvisible cutplane-yvisible cutplane-zvisible
    977979
    978980    SendCmd "imgflush"
     
    10441046            streamlines-numpoints streamlines-lighting \
    10451047            streamlines-palette streamlines-field \
    1046             volume-edges volume-lighting volume-opacity volume-wireframe \
    1047             cutplane-xvisible cutplane-yvisible cutplane-zvisible \
    1048             cutplane-xposition cutplane-yposition cutplane-zposition
     1048            volume-edges volume-lighting volume-opacity volume-wireframe
    10491049        Zoom reset
    10501050        set _reset 0
     
    14721472        "streamlines-field" {
    14731473            set new [$itk_component(field) value]
    1474             set value [$itk_component(axismode) translate $new]
     1474            set value [$itk_component(field) translate $new]
    14751475            set _settings(streamlines-field) $value
    14761476            if { [info exists _scalarFields($new)] } {
     
    14891489            }
    14901490            foreach dataset [CurrentDatasets -visible] {
    1491                 SendCmd "dataset ${fieldType} ${name} $dataset"
    1492                 SendCmd "streamlines colormode $_colorMode $dataset"
    1493                 SendCmd "cutplane colormode $_colorMode $dataset"
     1491                SendCmd "streamlines colormode $_colorMode ${name} $dataset"
     1492                SendCmd "cutplane colormode $_colorMode ${name} $dataset"
    14941493            }
    14951494            RequestLegend
     
    15171516        return
    15181517    }
     1518    if { [info exists _scalarFields($_currentField)] } {
     1519        set name $_scalarFields($_currentField)
     1520    } elseif { [info exists _vectorFields($_currentField)] } {
     1521        set name $_vectorFields($_currentField)
     1522    } else {
     1523        return
     1524    }
    15191525    # Set the legend on the first streamlines dataset.
    15201526    foreach dataset [CurrentDatasets -visible $_first] {
    15211527        foreach {dataobj comp} [split $dataset -] break
    15221528        if { [info exists _dataset2style($dataset)] } {
    1523             SendCmd "legend $_dataset2style($dataset) $_colorMode {} $w $h 0"
     1529            SendCmd "legend $_dataset2style($dataset) $_colorMode $name {} $w $h 0"
    15241530            break;
    15251531        }
Note: See TracChangeset for help on using the changeset viewer.