Artifact Content

Artifact 4d33c0163cfbabf562b1b9326d6d6d9140033523:

Wiki page [gap-edit] by saul 2012-04-05 14:57:07.
D 2012-04-05T14:57:07.757
L gap-edit
P 7dee6a68ae86a4d13cf7cbfa15ea509fd35f9011
U saul
W 3069
<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>Pre-loop code:</b><dd>[http://chiselapp.com/user/saulgoode/repository/RFX-GIMP/artifact/a0a4754d33f4766c70b5091e18230d400e2c3591|gap-edit.preloop]</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>
<dt><b>Triggers:</b> <dd>[http://chiselapp.com/user/saulgoode/repository/RFX-GIMP/artifact/1c24a38223487903f52eaf0666043dc6fae5b33a|gap-edit.init]</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.

Z 22ef301e81355a3d623c870f23343037