Scripting Challenge or the Ravings of a Mad Man?

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
sherlock
Posts: 48
Joined: Fri Nov 05, 2004 1:31 am
Contact:

Scripting Challenge or the Ravings of a Mad Man?

Post by sherlock »

If I have several key frames in .AI format -- each one exactly the same in number of points, etc. -- is there any way that a script could be written to sort of "batch import" them into Moho? Basically, I'd like to import the first frame as you would today, then use the point positions of the next consecutive .AI to create additional key frames in Moho. In the end, I would have nothing in any frame different than the first frame -- simply positioned different, as if I had animated the entire sequence in Moho. Is this possible, or have I totally flipped out?
User avatar
AcouSvnt
Posts: 190
Joined: Wed Aug 04, 2004 4:14 am
Location: Rochester, NY
Contact:

Post by AcouSvnt »

I'm guessing the hard/impossible part would be knowing which points in each picture correlate with the points in the previous picture; it would have to load them all as separate layers first, and then use info from all the pictures to set point positions in keyframes on just one of them, then delete all the extra images. Probably all do-able except that bit about knowing which points in one are which points in the next. (I mean, you can tell by looking, but that's something that humans can do much better than computers.)
-Keith
User avatar
Lost Marble
Site Admin
Posts: 2347
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

Possible, but difficult. First, the Illustrator import function is not available for use by scripts. So, you'd have to write the Illustrator import code from scratch in Lua. Possible, but difficult.

Once that part was done, I guess the rest wouldn't really be that hard. Maybe we can make the Illustrator import function available for scripts to use in the future.

Can I ask how these Illustrator files are being produced?
User avatar
sherlock
Posts: 48
Joined: Fri Nov 05, 2004 1:31 am
Contact:

Post by sherlock »

Over the years, I've created a number of animations in Adobe Illustrator. At least, I've created the individual frames there, then converted to raster, then used a GIF animation tool to complete the task. Needless to say, the output doesn't compare with what we can do with Moho. I'd like to port these to Moho, but I don't want to put each frame on a separate layer and apply styles to each.

Another possible use for this: Swift3D allows you to create animation with 3DS and OBJ objects then export the frames as .AI files. The only drawback here is not knowing whether their points match frame per frame.

...but these are the reasons I've been contemplating such a script.

Thanks,
HL
User avatar
AcouSvnt
Posts: 190
Joined: Wed Aug 04, 2004 4:14 am
Location: Rochester, NY
Contact:

Post by AcouSvnt »

Are you intending to have Moho do the automatic in-betweening? Because if not, if you have a keyframe for every frame, then you could probably get away with shoving them into a switch layer, naming the child layers "1", "2", "3", etc, and then importing a switch data file containing nothing but
  • 1 1
    2 2
    3 3 (etc.)
-Keith
User avatar
Lost Marble
Site Admin
Posts: 2347
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

sherlock wrote:Another possible use for this: Swift3D allows you to create animation with 3DS and OBJ objects then export the frames as .AI files. The only drawback here is not knowing whether their points match frame per frame.
For 3D movements, I can almost guarantee you that the points will never match up frame per frame.
Post Reply