From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Jun 13 2006 - 13:42:31 CDT

I've updated the documentation for the movie maker with a version of
this example script I sent:
  http://www.ks.uiuc.edu/Research/vmd/plugins/vmdmovie/

  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Jun 13, 2006 at 01:28:10PM -0500, John Stone wrote:
>
> Brian,
> Essentially, you'd do something like this:
> (run "setupmovie", set the movie type to "user defined" and try it out...)
>
>
> proc dofadein { start end curframe numframes materialname } {
> if { $curframe < $start } {
> material change opacity $materialname 0.0
> } elseif { $curframe >= $start && $curframe <= $end } {
> set ops [expr $curframe - $start]
> set ope [expr $end - $start]
> set opacity [expr $ops / double($ope) ]
> puts "opacity: $opacity"
> material change opacity $materialname $opacity
> } elseif { $curframe < $start } {
> material change opacity $materialname 1.0
> }
> }
>
> proc moviecallback { args } {
> puts "User-defined movie frame update callback frame: $::MovieMaker::userframe
> / $::MovieMaker::numframes"
>
> dofadein 48 96 $::MovieMaker::userframe $::MovieMaker::numframes Fade
> rotate y by 5
> }
>
> ## Easy-to-use proc to enable the user-defined movie frame callback
> proc enablemoviecallback { } {
> trace add variable ::MovieMaker::userframe write moviecallback
> }
>
> ## Easy-to-use proc to disable the user-defined movie frame callback
> proc disablemoviecallback { } {
> trace remove variable ::MovieMaker::userframe write moviecallback
> }
>
> ## setup for making the movie
> proc setupmovie { } {
> mol delete all
> mol new 1ap9
>
> material add Fade copy Transparent
> mol modstyle 0 0 VDW 1.000000 8.000000
> mol modmaterial 0 0 Fade
>
> enablemoviecallback
>
> after idle { puts "Don't forget to set movie type to user-defined in the Movie Settings" }
> }
>
> ## disable movie callback, any other cleanup....
> proc finishmovie {} {
> material delete Fade
> disablemoviecallback
> }
>
>
> > How would one include the fade script into the userdefined movie
> > callbacks? Specifically how would the moviemaker script know when to
> > render the different stages of fading?
> >
> > Brian
> >
> >
> > ************************************************
> > Brian Bennion, Ph.D.
> > Biosciences Directorate
> > Lawrence Livermore National Laboratory
> > P.O. Box 808, L-448 bennion1_at_llnl.gov
> > 7000 East Avenue phone: (925) 422-5722
> > Livermore, CA 94550 fax: (925) 424-5513
> > ************************************************
>
> --
> NIH Resource for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078