|
Stop event, last action or how to clean up the state of things on user interrupt?Would there be a way to detect (or get notified) that a quartz composition will stop, so that one has the chance to execute a last action or clean up the state of other depending patches or remote apps? Alternatively: How would one best poll a quartz composition in order to check if it is still alive? Or, is my only chance to constantly send 'still alive' messages to depending patches in oder to detect, if my composition was stopped? If anybody ever had this need, or ran into similar problems i would appreciate to learn about possible solutions, or workarounds.
|
Quartz Composer does not provide in-composition notifications for termination.
However:
applicationWillTerminate
input value, which is true for the final frame rendered before application termination.- applicationWillTerminate:
Objective-C message and set a published input to the composition, render a frame, then terminate.- stopExecution:
and- cleanup:
Objective-C messages (but you can't pass data to downstream patches by this point).Thank you very much for this very concrete answer!
So, if i understand correctly, there is no other way than actually building a Cocoa app.
Or, would the Kineme QuartzBuilder protocol also be accessible by a custom plugin (SkankySDK) that would then execute a 'last-frame' macro, or load another composition as 'last-action'?
Thanks in advance for further elaborations, mc
Or, if SkankySDK plugins are subsumed by "Public and Private API patches", could a plugin possibly send a final OSC message on termination (instead of triggering a final frame), at least?
Yes, "SkankySDK" == "Private API". Both Public and Private API plugins can respond to composition render termination.
The QuartzBuilder protocol is only active when the composition is built into a standalone application using QuartzBuilder.
ThanX for this clarification!