Script for exporting/saving AS 7 Pro to older versions of AS

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
fracturedray
Posts: 175
Joined: Sun Sep 07, 2008 4:45 pm
Location: Dallas, Texas
Contact:

Script for exporting/saving AS 7 Pro to older versions of AS

Post by fracturedray »

It is mostly in the title.

Is there a script for saving the AS 7 Pro files as older basic versions for other people to learn from?

I tried using jEdit to make a file work in an older version of AS but it didn't work. I'm not a programmer so I wasn't sure if it was even possible to do it with version 7.
Last edited by fracturedray on Thu Aug 05, 2010 6:32 pm, edited 1 time in total.
Hi animation world.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Working on it.

I was creating a "stand alone application" for this but then... AS 7 came out in the middle of my development with a new file format (I was going from 6 to 5). Some of the other features I was adding to my application are already in AS 7 so I am thinking I will go back to a lua script to save older versions.

Doing this in lua will be easier (and cheaper for me since I don't have to buy the application I was using for development). I already have some pre-existing lua scripts to parse the file format, it's just a matter of completing my file format comparisons. I need to create files in each version with every single possible feature so I can see what needs to be removed to go backwards.


-vern
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

Great news, vern. thanks.
Image Image Image Image
Moho Product Manager

www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
User avatar
CartoonLearning.com
Posts: 22
Joined: Wed Sep 16, 2009 6:08 pm
Location: Michigan
Contact:

Post by CartoonLearning.com »

Vern,

Have I told you lately that you're awesome? I wanted to give away some older AS files, but I opened them in AS7 and saved them- ooops.

That plugin would be helpful for the community.
Free Anime Studio content at
http://www.CartoonLearning.com

Learn Anime Studio at
http://www.animationtrainer.com
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger »

heyvern wrote:Working on it.

I was creating a "stand alone application" for this but then... AS 7 came out in the middle of my development with a new file format (I was going from 6 to 5). Some of the other features I was adding to my application are already in AS 7 so I am thinking I will go back to a lua script to save older versions.

Doing this in lua will be easier (and cheaper for me since I don't have to buy the application I was using for development). I already have some pre-existing lua scripts to parse the file format, it's just a matter of completing my file format comparisons. I need to create files in each version with every single possible feature so I can see what needs to be removed to go backwards.


-vern
I wrote a python script to do it when I saved an important file in AS7 and wanted to go back and edit it in AS6, but doing it from the program in Lua is even better! Perhaps you could even add a batch mode. You may already be using it or something similar, but I highly recommend WinMerge for comparing the two files when working out what needs be filtered out. I can also send you my python script if you think it might speed things up.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Thanks Rudiger,

I use jEdit with a "diff" plugin that works great for finding differences in files. I love jEdit because it runs on the major platforms; mac, win, linux, and there are a bunch of free plugins for it. I have a set of regex snippets that work for 6 to 5. I converted that code to my standalone development tool (RunTime Revolution).

When I was creating my standalone application the main problem was having an AS file that contained EVERYTHING in it. DK was helping me out testing the converter and kept finding stuff I missed in my test files. Basically I have to create the old version file first with EVERYTHING in it. I mean EVERYTHING. Every possible layer type, every effect, everything. Not as easy as it sounds ;). I then open that file in the new version and do a save as. Then I add any extra stuff in that file that isn't in old versions and do another save as... that was fun going from 6 to 5... now I have to go 7 to 6 and 5... yeeehaaaa! :)

Lua is pretty good for doing this kind of thing and it's very fast. I already have a script I used for my original save bone script that reads the entire file format so I could read in key frame interpolation (Don't need that since v6 key interpolation is in the script reference).

-vern
User avatar
neeters_guy
Posts: 1614
Joined: Mon Sep 14, 2009 7:33 pm
Contact:

Post by neeters_guy »

That would be great. You mentioned this project elsewhere:
Switch Layer interpolation bug - major
Updates & upgrades thick and fast. How long before the n
I'm glad that you're working on it again. I tried the comparing vers. 6 and 7 anme files myself and it's fairly overwhelming. You have my kudos.
rogermate
Posts: 296
Joined: Mon Jun 02, 2008 5:53 am
Location: Mars

Post by rogermate »

another opinion that this would be a worthy utility
User avatar
DK
Posts: 2849
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

This script is a life saver and it saved me recently.

I started working on a TV commercial using V6 then struck a bug that slowed down the drawing tools after a certain amount of layers were placed in the project. Too late, I was committed but thanks to vern he managed to parse out the bits of lua script that 5.6 kept choking on and it saved my work :)

So glad to hear vern's back onto this as I struck a similar situation again recently with AS7's switch layer bug and had to go back to 5.6 again :(
This time I had to redo all the work though.

Keep up the good work vern!!!!

Cheers
D.K
Post Reply