The information about layer offsets in a frame sequence is not made  
readily available and a plug-in would need to be written (and, IMO, it  
would be simpler to write a Script run in batch mode). Also, once an  
object has been added to a frame sequence, GIMP only knows the offsets  
and extents of the resulting layer; it does not record whether the  
object was rotated or otherwise transformed (which would result in  
altered offsets and extents).

If you added the layers to your animation using the "Move Path"  
command, you could save the object's placement information for later  
recall by saving the control points used. There are some limitations  
to this, though: primarily that a separate file is created for each  
object; and if you wish to have the specifics of the object's  
placement for each frame saved (as opposed to keyframe control points)  
then you need to use the Paths tool to specify that placement (as  
opposed to manually specifying the control points in the Move Path  
dialog). Also, there is no way of saving changes made to the objects  
after their initial placement.

This approach will produce a file with the following parameters for  
each control point:

  x  y width height opacity rotation feather_radius (perspective  
transform factors) (rel_keyframe)

If you need more information on the above approach, it might be better  
to move the discussion to the Users mailing list, as this wouldn't  
really contribute to GIMP development.

Quoting Andy Berdan <[EMAIL PROTECTED]>:

> Hi all,
> I've been investigating some animation systems for use at work here, and
> I was wondering about exporting names and locations of layers in the
> animation.
> Hm.  That doesn't sound too clear - allow me to illustrate with an
> example.
> Suppose the source animation is a 10-frame animation, with a hand and a
> ball, both moving (and animating) independently, I'd eventually want
> something like this:
> animation-frame-0: hand-frame-1 x=0,y=0
> animation-frame-0: ball-frame-1 x=5,y=5
> animation-frame-1: hand-frame-2 x=10,y=10
> animation-frame-1: ball-frame-1 x=25,y=25
> ... etc ...
> animation-frame-9: hand-frame-2 x=100,y=100
> animation-frame-9: ball-frame-1 x=520,y=520
> (ignore the syntax, the data is presented as such for clarity -- though
> now, I think a graphical example might have been better)
> Obviously, GAP itself has access to this data at some point, but it
> doesn't seem to be exposed or exportable in any way.
> The only idea I can come up with at this point involves iterating over
> animation files in a directory, scanning each layer for frame
> information, and dumping the data to a file... and I'm not 100% sure if
> that's do-able, though it seems that that is something script/python-fu
> should have access to.
> BTW, the intent is to use this animation data (not actual video output)
> in a game engine for layer-based animations, if you're wondering why I'm
> asking for this somewhat strange feature.

Gimp-developer mailing list

Reply via email to