
hi yosh

this is the start of the macro recording stuff i was working on.  i haven't
done anything since late march. i did get it at least compiling against
the latest changes to CVS gimp.  the cowmgr stuff hasn;t changed since
the last version on ftp.gimp.org.  i started merging it, but didn;t
get too far.  if there's anything usable, i'll tar that up and send it
along in a bit.

to build this:

  get glib, gtk, gimp, and guile-core from the guile cvs server
  apply diffs to gimp
  add new files and dirs to gimp
  build and install everything

the basic idea is to record actions into a trace file then munge the
trace file into a script-fu script which can then be run as a macro.
i originally tried to use script-fu, but SIOD is just too broken so i
hacked up a guile version of script-fu.

the guile version of script-fu can use the standard script-fu return
value convention, or else you can pass an output format description as
the first argument.  this is either a symbol or list of symbols which
are the names of the output args you want.  this allows you to do:

  (set! the-image (file-jpeg-load 'image 0 "foo.jpg" "foo.jpg"))

instead of

  (set! the-image (car (file-jpeg-load 0 "foo.jpg" "foo.jpg")))

anyway, to create a trace file:

  - start gimp
  - start Xtns->Guile-Fu
  - start guile-fu-driver
  - enter (+ 1 2) to test

you should get 3 back, so the driver contacted the guile-fu server and things are
running nicely.  from this driver, you can access the macro stuff as well as the
chalice.scm remote control stuff i did earlier.  see test.scm for some shortcuts.

next, type into the driver:

  - (gimp-macro 1 "take1.trc")
   ... start drawing, etc in gimp ...
  - (gimp-macro 0 "take1.trc")

now there should be a file called take1.trc with all the stuff you've done.


the next step is to process this into a script-fu macro.  this is done manually
for now, but should be easy to do from (gimp-macro 0 "take1.trc"):

  - start guile
  - load macro.scm
  - (trace->macro "take1.trc" "take1.scm")
  - move take1.scm into users script dir
  - Xtns->Script-Fu->Refresh
  - Xtns->Macros->Run

the converted script does not yet work, but the script-fu should pop up and
ask you for parameters to use when running the macro.


