<dl>
<dt><b>Command:</b> <dd>Edit in
<dt><b>Type:</b> <dd>Effect (but an atypical
<dt><b>Download:</b> <dd>
<dt><b>Description:</b> <dd> When this script is run, the selected range of frames is exported to GIMP GAP and then the user is presented with the following dialog.


<center><img />
</center>


As the message states, the user should leave the dialog open until editing in GIMP is complete. The checkbox has no effect but is included because the RFX plug-in system does not support a plain text message dialog by itself.

After closing the dialog by clicking OK, the modified frames will be imported into LiVES. If CANCEL is pressed, no changes will be imported but it may be necessary to run the [gap-edit-cleanup|GAP Cleanup utility] to remove some exported files.

NOTE: No changes to the size or number of frames should be made while in
<dt><b>Pre-loop
<dt><b>Loop code:</b> <dd>
<dt><b>Post-loop code:</b> <dd>
<dt><b>Triggers:</b>
<dt><b>Parameters:</b>
  <dd>None -- a "dummy" boolean parameter is displayed, but is only there to present a message to the user and have the dialog wait for
<dt><b>Notes:</b> <dd>This script uses some clever hacks to shoehorn the export/import process into a LiVES RFX "effect". It would probably be better implemented as a "tool", but tools operate on the entire clip, not the selected range.

The script moves much of the [default.preloop|default.preloop] code into the 'init' trigger so that it gets executed <i>before</i> the user is presented with the dialog ('preloop' code gets executed after the parameter dialog is closed). The 'init' code also converts the frames to XCF files. This is done because the parameter dialog is used to signal when the user has finished his GAP editing -- unlike other effects, clicking OK does not <i>start</i> the processing, it indicates the processing is basically finished.

The 'preloop' code merely re-establishes communication with the Script-fu server. Apparently 'init' code is run as a separate process and thus when that process finishes, the connection to the Script-fu server is lost.

The 'loop' code converts the modified XCF files into LiVES frames and the 'post-loop' code deletes all of the XCF files.