PlayForwardsFromStart really is what I need.
Otherwise the caches don't get generated (well, only the last frame,
for some reason).
Bernard
On 11/20/06, guillaume laforge <guillaume.laforge.3d(at)gmail.com> wrote:
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
--
Guillaume Laforge
freelance TD | cg Artist
my blog ! http://vol2blog.blogspot.com/
On 11/20/06, Marc-André Belzile < mbelzile(at)softimage.com> wrote:
> You cannot have a script to wait for the last frame to complete without
blocking the app. You should rather use the siOnTimechange event and start
processing your simulation once the last frame is done.
>
> -mab
>
> -----Original Message-----
> From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM]On Behalf
> Of Bernard Lebel
> Sent: November 20, 2006 3:15 PM
> To: XSI(at)Softimage.COM
> Subject: [script] Waiting for playback completion
>
>
> Hi,
>
> Anyone found a way for a script to wait for the playback completion?
>
> Right now in my script, the playback starts but the script continues
> execution every though the playback is in progress. I'd like to have
> it wait for the playback to finish (this is for syflex simulations).
>
>
> Thanks
> Bernard
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
> unsubscribe xsi
>
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
> unsubscribe xsi
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi