Restart composition

pho's picture

Hi,

Is it possible to restart a composition's animation without stopping-running it in the viewer window? I need to keep the composition running, but I have to start it from the beginning repeatedly.

cybero's picture
Re: Restart composition

Yeah, you could enable / disable the rendering patch in the editor by using a stop watch upon the item. You could also just drag the composition file into another editor window and then enable / disable / re-enable to your heart's content. All without starting and stopping and restarting the Viewer window

pho's picture
Re: Restart composition

Well, if I disable and re-enable the composition it doesn't really restart the animation, it just stops rendering. I stop seeing it but the animation is still running.

The attached composition has a Render in Image Patch with a Patch time input port. By starting/stopping the stopwatch I can restart the animation.

Unfortunately, I'm having some problems using this method and that's why I'm seeking another one.

PreviewAttachmentSize
restart.qtz3.81 KB

cybero's picture
Re: Restart composition

Please find attached a very simple enable / disable setup, just about to pick up on yours.

pho's picture
Re: Restart composition

Again, this doesn't start an animation from the beginning if I disable re-enable it. The example I provided restarts the animation if I go back to zero in the Patch Time input port.

Can you give one example of a composition with any kind of animation that starts from the beginning when I enable/disable it?

I mean, if I have an non-looping interpolation patch connected to the Y position of a sprite, starting at position 0 and ending at position 1, can you make it go back to zero by disabling/enabling the sprite or the macro patch?

My bet is no because to do that you would have to restart the comp's time, and that doesn't happen by enabling or disabling the rendering or macro patches.

gtoledo3's picture
Re: Restart composition

Changing timebase is the mechanism that is provided for achieving what you're trying to do.

What you can do, alternately, is load the macro as a unique quartz composition, using the composition loader. Every time the composition loader gets a new filepath, it will initialize the composition "fresh", at least in 10.6/10.5.

pho's picture
Re: Restart composition

I tried to update the composition patch but it didn't restart the animation. I'm using 10.7.

Find attached a test composition. Open import.qtz please.

PreviewAttachmentSize
comp import.zip3.21 KB

gtoledo3's picture
Re: Restart composition

Wow, no kidding. I guess I defer back to "use external timebase"+stopwatch.

gtoledo3's picture
Re: Restart composition

I remembered this incorrectly. It's simply turning it off and on, and composition importer needs to be in "local" time mode. Check attachment.

(This may work the same, if you take you original macro and change time to local...idk. I remember I did have to resort to loading a new path with composition importer for some similar scenario, and was mixed it up).

PreviewAttachmentSize
comp import.zip4.08 KB

gtoledo3's picture
Re: Restart composition

Disregard the comp loader stuff - looking at your original patch (why didn't I before, instead of the 2nd? Sorry), it can be handled the same way. Shift your macro to local time. Then, enabling whatever Consumer patch kicks of the RII based chain, all time events in that connected macro start at time 0 (eg., "local" to that patch).

PreviewAttachmentSize
restart_.qtz4.58 KB

pho's picture
Re: Restart composition

Ok, I actually never used timebase parameter before. I guess I should read quartz composer's manual!

Thanks

franz's picture
Re: Restart composition

there ain't such as thing as a QC manual ... !

gtoledo3's picture
Re: Restart composition

http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Co...

That's the user guide (and there are links to app programming and patch programming at the start of the article). It looks like they gloss over timebase though.

pho's picture
Re: Restart composition

yes, that's what I meant - user guide... I'm sorry...