Changeset 460 for trunk


Ignore:
Timestamp:
Jun 4, 2006, 8:04:15 PM (18 years ago)
Author:
mmc
Message:

Fixed the 3D viewer so that if it detects old-style vtk data, it will
drop back to using the old vtk viewer. This means that older tools
shouldn't be affected by the new nanovis upgrade.

Location:
trunk/gui/scripts
Files:
3 edited

Legend:

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

    r459 r460  
    152152# ----------------------------------------------------------------------
    153153itcl::body Rappture::Field::mesh {{what -overall}} {
    154     if {$what == "component0"} {
     154    if {$what == "-overall" || $what == "component0"} {
    155155        set what "component"
    156156    }
  • trunk/gui/scripts/field3dresult.tcl

    r436 r460  
    2727itcl::class Rappture::Field3DResult {
    2828    inherit itk::Widget
     29
     30    itk_option define -mode mode Mode "auto"
    2931
    3032    constructor {args} { # defined below }
     
    6567# ----------------------------------------------------------------------
    6668itcl::body Rappture::Field3DResult::constructor {args} {
    67     if {"" != $_nanovisHost && "" != $_nanovisPort} {
     69    array set flags {
     70        -mode auto
     71    }
     72    array set flags $args
     73
     74    if {"" != $_nanovisHost && "" != $_nanovisPort && $flags(-mode) != "vtk"} {
    6875        itk_component add renderer {
    6976            Rappture::NanovisViewer $itk_interior.ren \
  • trunk/gui/scripts/resultviewer.tcl

    r436 r460  
    228228                    set mode "field3D"
    229229                    if {![info exists _mode2widget($mode)]} {
     230                        set mesh [$dataobj mesh]
     231                        set mode [expr {("" != $mesh) ? "vtk" : "nanovis"}]
    230232                        set w $itk_interior.field3D
    231                         Rappture::Field3DResult $w
     233                        Rappture::Field3DResult $w -mode $mode
    232234                        set _mode2widget($mode) $w
    233235                    }
Note: See TracChangeset for help on using the changeset viewer.