Changeset 3932


Ignore:
Timestamp:
Sep 18, 2013 12:25:29 AM (11 years ago)
Author:
ldelgass
Message:

Don't convert DX to VTK if viewer is nanovis (still not ready to enable this)

Location:
trunk/gui/scripts
Files:
2 edited

Legend:

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

    r3930 r3932  
    909909            set _comp2dims($cname) "3D"
    910910            set data [$_field get -decode no $cname.$type]
    911             set contents [Rappture::encoding::decode -as zb64 $data]
    912             if { $contents == "" } {
     911            if { $data == "" } {
    913912                puts stderr "WARNING: no data for \"$_path.$cname.$type\""
    914913                continue;               # Ignore this component
    915914            }
    916             if 1 {
    917                 set f [open /tmp/$_path.$cname.dx "w"]
    918                 puts -nonewline $f $contents
    919                 close $f
    920             }
    921             if { [catch { Rappture::DxToVtk $contents } vtkdata] == 0 } {
    922                 ReadVtkDataSet $cname $vtkdata
    923             } else {
    924                 puts stderr "Can't parse dx data: $vtkdata"
    925             }
    926             if 1 {
    927                 set f [open /tmp/$_path.$cname.vtk "w"]
    928                 puts -nonewline $f $vtkdata
    929                 close $f
    930             }
    931915            if { $_viewer != "nanovis" } {
     916                set contents [Rappture::encoding::decode -as zb64 $data]
     917                if 1 {
     918                    set f [open /tmp/$_path.$cname.dx "w"]
     919                    puts -nonewline $f $contents
     920                    close $f
     921                }
     922                if { [catch { Rappture::DxToVtk $contents } vtkdata] == 0 } {
     923                    ReadVtkDataSet $cname $vtkdata
     924                } else {
     925                    puts stderr "Can't parse dx data: $vtkdata"
     926                }
     927                if 1 {
     928                    set f [open /tmp/$_path.$cname.vtk "w"]
     929                    puts -nonewline $f $vtkdata
     930                    close $f
     931                }
    932932                set _type "vtk"
    933933                set _comp2vtk($cname) $vtkdata
  • trunk/gui/scripts/visviewer.tcl

    r3924 r3932  
    10811081        }
    10821082    }
    1083     regsub -all "\n" $cmap " " cmap
     1083    #regsub -all "\n" $cmap " " cmap
    10841084    return $cmap
    10851085}
Note: See TracChangeset for help on using the changeset viewer.