>
> Message: 2
> Date: Sat, 02 Jun 2007 07:58:37 -0500
> From: Bob Hanson <[EMAIL PROTECTED]>
> Subject: Re: [Jmol-users] questions
> To: jmol-users@lists.sourceforge.net
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> rspinney wrote:
>
> >I have a couple of questions for Bob. (I am using 11.1.44.)
> >
> >1) I am not clear if frame (or model) next or previous make a call to
> >animFrameCallback. I have a jmolSetCallback linked to animFrameCallback,
> and
> >it works fine for model play, pause and resume (which will execute a > >
script
> >dependent on the model number) but it does not work when model next is >
used.
> >The display moves to the next model, but the scripts are never called.
> >Should model next (or previous) call animFrameCallback?
> >
> >
> >
> I'm not observing this problem -- next and prev go through precisely the 
> same operations, and the callback doesn't come from them. (It's actually 
> a "frame change callback" that has nothing really to do specifically 
> with "animation.") So I'd be surprised if this is the case. Note that if 
> you are at the end of the range and you issue a frame change that does 
> not have any effect, no callback is made.
>

I'm not sure we are on the same wavelength. As an example, frame 20 is a
"key" frame where echo and message are changed. If the animation is
"playing" (i.e. using "animation direction +1; model resume;") the changes
(based on the frame number) are caught by animFrameCallback and passed to my
javascript function. However, when the animation is "stepped" through one
frame at a time (using "animation direction +1; model next;") the echo and
message never change. I assume this is because model next (or previous) does
not make a call to animFrameCallback.

My thoughts on this were that it should not matter how the user moves
through the animation sequence, either "playing" or "stepping", the results
should be the same. This would require animFrameCallback to pick up any
change of frame, so it can be caught and passed to an external function. I
tried testing this by using alert to display the current frame number, but
it always came back as 0.


> >2) Did you implement the change to animFrameCallback "isrunning" to >
indicate
> >the direct the animation is playing (i.e. values of -1 running backwards,
0
> >for stopped, and 1 for running forwards)?
> >
> >  
> >
> I have checked in changes for 11.1.45 that add two more parameters to 
> the frame callback:
>
> function animFrameCallback(frameNo, fileNo, modelNo, firstNo, lastNo, 
> isAnimationRunning, animationDirection, currentDirection)
>
> animationDirection is what changes with "animation direction -1" or 
> "animation direction +1"
> currentDirection is what changes with "anim playrev" and when the 
> animation starts going backward in "anim mode palindrome"
>
> so the PRODUCT of these two numbers indicates the "true" direction of 
> the animation.
>
> Note that firstNo and lastNo are numbers that encode the file and model 
> as "file*1000000+model"
>

Great! Thanks.


> >3) There is still a bug with set picking draw. If you shift-left-click on
> a
> >vertex of the arrow to move it, the entire arrow moves rather than the >
one
> >vertex.
> >
> >  
> >
> That's not a bug. "SHIFT" does just that -- shifts the arrow around; 
> "ALT" does the altering of the shape. So use alt-left-click if you want 
> to alter the shape of the arrow.
>

Ahhh... There is a typo in the interactive scripting site on set picking
draw, which states it is the shift key to move a vertex. Thanks

Rick

> Bob
>
> >Thanks, Rick
> >


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to