Changeset 901 for trunk/gui


Ignore:
Timestamp:
Feb 23, 2008 3:43:37 PM (16 years ago)
Author:
kostmo
Message:

Development of animation script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/apps/nanovis-test

    r855 r901  
    182182
    183183# ----------------------------------------------------------------------
     184# USAGE: karl_activate_flow
     185#
     186# ----------------------------------------------------------------------
     187proc karl_activate_flow {} {
     188
     189        puts "Activating flow..."
     190
     191        # sequence of commands to initilize flow visualization go here
     192        test
     193}
     194
     195# ----------------------------------------------------------------------
     196# USAGE: karl_flow_movie
     197#
     198# ----------------------------------------------------------------------
     199proc karl_flow_movie {} {
     200
     201        puts "Flow Movie"   
     202        set img_storage_dir [exec mktemp -d /tmp/animation.XXXXXX]
     203        puts $img_storage_dir
     204
     205        # flow animation command sequence goes here
     206#       flow capture 100 $img_storage_dir
     207        ## ??
     208
     209        cd $img_storage_dir
     210
     211        # get rid of this once the animation command sequence works
     212        return
     213
     214        if {0} {
     215                # create animated gif:
     216                puts "creating animated gif..."
     217                exec convert -delay 20 -loop 0 image*.bmp animated_flow.gif
     218        } else {
     219                # create mpeg movie:
     220                puts "creating mpeg movie..."
     221
     222                exec mogrify -format jpg *.bmp
     223                exec ffmpeg -i image%03.jpg cool.mpg
     224                exec rm *.jpg
     225        }
     226        exec rm *.bmp
     227
     228        # Now present the .mpg or .gif file to the user for downloading
     229        ## ??
     230
     231        # Finally, delete the temporary animation directory we have created
     232        exec rmdir $img_storage_dir
     233}
     234
     235# ----------------------------------------------------------------------
    184236# TOPLEVEL FOR IMAGES
    185237# ----------------------------------------------------------------------
     
    276328.mbar add cascade -label "View" -underline 0 -menu .mbar.view
    277329
     330menu .mbar.flow
     331.mbar.flow add command -label "Activate Flow" -command {karl_activate_flow}
     332.mbar.flow add command -label "Capture Flow Movie" -command {karl_flow_movie}
     333.mbar add cascade -label "Flow" -underline 0 -menu .mbar.flow
     334
     335
     336
    278337. configure -menu .mbar
     338
    279339
    280340Rappture::Panes .main -sashwidth 4 -sashrelief raised -sashpadding 4 \
Note: See TracChangeset for help on using the changeset viewer.