<dt><b>Command:</b> <dd>Edit in GAP</dd></dt>
<dt><b>Type:</b> <dd>Effect (but an atypical one)</dd></dt>
<dt><b>Download:</b> <dd> [http://chiselapp.com/user/saulgoode/repository/RFX-GIMP/artifact/b7f534063fd6d4fafe541729a2d00a789f42e5af|gap-edit.script] </dd></dt>
<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 src="http://www.kerosenecow.net/data/images/RFX-GIMP/SSgap-edit.png" />
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 GIMP.</dd></dt>
<dt><b>Loop code:</b> <dd> [http://chiselapp.com/user/saulgoode/repository/RFX-GIMP/artifact/59a889c4407d1f21111e5c6bd3ac80c776218c35|gap-edit.loop]</dd></dt>
<dt><b>Post-loop code:</b> <dd> [http://chiselapp.com/user/saulgoode/repository/RFX-GIMP/artifact/d7bc17ab8881747e996a454da72603ae1c716d27|gap-edit.post]</dd></dt>
<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 "OK".</dd></dt>
<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.