Re: [script] Waiting for playback completion

Date : Mon, 20 Nov 2006 16:18:11 -0500
To : <XSI(at)Softimage.COM>
From : "Robert Moodie" <robertm(at)hybride.com>
Subject : Re: [script] Waiting for playback completion
What about DelayedRefresh with the Time arg?
 
----- Original Message -----
Sent: Monday, November 20, 2006 3:50 PM
Subject: RE: [script] Waiting for playback completion

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

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.