Re: [script] Waiting for playback completion

Date : Tue, 21 Nov 2006 09:58:08 +0100
To : <XSI(at)Softimage.COM>
From : "Stefano Jannuzzo" <stefanojannuzzo(at)tiscali.it>
Subject : Re: [script] Waiting for playback completion
Be sure to use Application.Refresh, since a plain Refresh will just update the ppg.
Not sure about syflex, but this surely works with our operators.


function LQ_Manager_Play_OnClicked()
{
   var i;
   var inF = GetValue("PlayControl.In");
   var outF = GetValue("PlayControl.Out");
   SetValue("PlayControl.Current", inF, null);
   Application.Refresh();
   for (i=inF; i<outF; i++)
   {
       NextFrame();
       Application.Refresh();
   }
}


----- Original Message ----- From: "Bernard Lebel" <3dbernard(at)gmail.com>
To: <XSI(at)Softimage.COM>
Sent: Monday, November 20, 2006 10:29 PM
Subject: Re: [script] Waiting for playback completion



No luck either, even with Refresh after NextFrame it doesn't write the
Syflex file.


Bernard



On 11/20/06, Luc-Eric Rousseau <lucer(at)softimage.com> wrote:


I've never had luck with this, but it looks like with a Refresh() after your
NextFrame() that you script does work.


-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM]On Behalf Of
guillaume laforge
Posted At: Monday, November 20, 2006 3:46 PM
Posted To: xsi
Conversation: [script] Waiting for playback completion
Subject: Re: [script] Waiting for playback completion


You can use use your own "custom PlayForwardsFromStart" command with your
script in the "else" part of the function :

function MyPlayForwardsFromStart()
{
    var FirstFrame = GetValue("PlayControl.In");
    var LastFrame = GetValue("PlayControl.Out");

    var oTotalLength = LastFrame-FirstFrame;

    SetValue("PlayControl.Current ", FirstFrame);
    for(var i=0; i<oTotalLength;i++)
    {
        if(i!= LastFrame-2)
        {
            NextFrame();
            LogMessage("Waiting for the end of the Playback...")
        }
        else
        {
            LogMessage("Run your script now !");
        }
    }
}

Should work...

Cheers

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.14.11/543 - Release Date: 20/11/2006 21.20




--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.