Versions Compared


    • This line was added.
    • This line was removed.
    • Formatting was changed.
    Comment: Published by Scroll Versions from this space and version 6.10-0


    The following is an example of a callback that runs for every frame when the job completes.  Admittedly, it may be more efficient to run it once and have the external script iterate over every frame, but this is for demonstration purposes.

    titleUse subprocess.Popen .subprocess in the callback

    Please note the use of subprocess.Popen.subprocess() to run the external script in the callback. This returns immediately and allows the callback to continue running, rather than blocking and waiting for the external script to complete; this ties up the supervisor process for the duration of the external script's execution.

    Do not NOT use os.system() to run the external script, as this call will block until the external script exits. When a large number of callbacks tie up supervisor processes at the same time, your supervisor performance will suffer.

    titleNever use sys.exit() in a callback

    Do not Never call sys.exit() at the end of the callback code, this kills the calling supervisor process.