facebookarchive / Keyframes

A library for converting Adobe AE shape based animations to a data format and playing it back on Android and iOS devices.
https://facebookincubator.github.io/Keyframes/
Other
5.33k stars 302 forks source link

After Effects exporter not working #100

Closed JoeAllison closed 7 years ago

JoeAllison commented 7 years ago

The exporter in after effects isn't exporting a JSON file. The script panel says it's exporting but never finishes. No JSON file is exported, only a log file that's completely blank with no file size.

Can someone please help to confirm if there's an issue or if I've not set it up correctly.

Thanks

leeyc09 commented 7 years ago

Scripts\Keyframes After Effects Scripts\lib\keyframes\AECompToKeyframesAnimation.js

remove these line :

keyPath.unshift(comp&&comp.parentFolder$name);
console.warn('UNSUPPORTED: %s',keyPath.join(' → '));

you will work fine..

and check AE permission

How to enable scripts to read/write files/internet

By default scripts are not allowed to write files or send or receive communication over a network. To allow scripts to write files and communicate over a network, choose Edit > Preferences > General (Windows) or After Effects > Preferences > General (Mac OS), and select the Allow Scripts To Write Files And Access Network option. Export the current After Effects comp to FB Keyframes Animation Descriptor JSON document.

Requires "Allow Scripts To Write Files And Access Network" There are two options for exporting, a command line tool and an After Effects plugin.

JoeAllison commented 7 years ago

Thanks for getting back to me.

I've removed those 2lines, but It's still not worked unfortunately.

When I try the command line export and type 'keyframes-cli' it says the command is not found.

leeyc09 commented 7 years ago

did you allow Scripts To Write Files And Access Network option?

JoeAllison commented 7 years ago

Yea I think I have everything set up correctly with that. Here's a screenshot of the after effects settings:

image

Nabeel-khalid commented 7 years ago

Are you on AE 2017?

JoeAllison commented 7 years ago

Yea I was originally on 2015 having the issues, but I upgraded to 2017 yesterday to see if that would help.

Nabeel-khalid commented 7 years ago

Yeah I think it's a issue with AE export See this

leeyc09 commented 7 years ago

I can use both 2015 and 2017

leandrinux commented 7 years ago

Check if you have Node installed in your computer. You can get error messages if you try running the script from the console instead of using the AE menu option.

edit. install node, then go to the script directory and install it using npm install . -g, finally run npm update.

Nabeel-khalid commented 7 years ago

@leandrinux I can't get it to install

~ nabeel.khalid$ npm install . -g npm ERR! addLocal Could not install /Users/nabeel.khalid npm ERR! Darwin 16.3.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "." "-g" npm ERR! node v6.9.3 npm ERR! npm v3.10.10 npm ERR! code EISDIR npm ERR! errno -21 npm ERR! syscall read

npm ERR! eisdir EISDIR: illegal operation on a directory, read npm ERR! eisdir This is most likely not a problem with npm itself npm ERR! eisdir and is related to npm not being able to find a package.json in npm ERR! eisdir a package you are trying to install.

npm ERR! Please include the following file with any support request: npm ERR! /Users/nabeel.khalid/npm-debug.log

npm - I'm on version 3.10.10

leandrinux commented 7 years ago

It looks like it can't find the "package.json" file. You should run those commands inside the scripts directory included in the repo.

JoeAllison commented 7 years ago

I'm still not able to get it to work unfortunately. I also tried updating to Sierra as someone said that helped for them, but it's still holding on the export and not generating the files. No luck with the Command line method either :(

maxshelest commented 7 years ago

Before exporting, save the AE project

2017-01-09 13 39 01
JoeAllison commented 7 years ago

Thanks, the json file is now being exported, but it's not playable. I've been using the keyframes player app which works with pre-exported examples I've downloaded, but not the json files that being exported by the ae script. It's exporting a .kf.json and a .json file and .log file.

I also tried it on a simple IOS app a friend created for me to play them on which again works with downloaded examples, but not with the exported files.

lozzle commented 7 years ago

Hi @JoeAllison-- are you files formatted properly, according to some of the guidelines set here? https://github.com/facebookincubator/Keyframes/blob/master/docs/AfterEffectsGuideline.md

Otherwise, if you could send over an example comp or the exported file, it would help greatly in identifying what exactly is going wrong.

JoeAllison commented 7 years ago

Hey thanks, I'm using After Effects 2017, does it only work with 2015? Otherwise, it's a very simple comp to test with, and i'm pretty sure it all complies with the rules in the guidelines. I've attached a zip of the AE file and the export keyframes_test.zip

cadicetienne commented 7 years ago

FYI One of our art director experienced the "never ending" exporter issue, even with a saved project. When using the cli we found out there was a JS error when trying to write logs. (The error was when performing the new Date().toISOString()) in Extended script FB Keyframes Exporter.jsx, line 33).

--> the JS error was somthing like "can't apply prototype function .toISOString to an infinite date". No clue why the new Date() isn't working properly on his mac (most of us doesn't have any problem).

Removing the statement solved the problem and he can now perform the export properly.

Maybe you guys are experiencing the same issue ?

subtleGradient commented 7 years ago

There's a fix for that and a bunch of stuff in review. I'll try to land it today or tomorrow On Wed, Jan 11, 2017 at 9:44 AM cadicetienne notifications@github.com wrote:

FYI One of our art director experienced the "never ending" exporter issue, even with a saved project. When using the cli we found out there was a JS error when trying to write logs. (The error was when performing the new Date().toISOString()) in Extended script FB Keyframes Exporter.jsx, line 33).

--> the JS error was somthing like "can't apply prototype function .toISOString to an infinite date". No clue why the new Date() isn't working properly on his mac (most of us doesn't have any problem).

Removing the statement solved the problem and he can now perform the export properly.

Maybe you guys are experiencing the same issue ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/facebookincubator/Keyframes/issues/100#issuecomment-271886178, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAQFUWwiQnBELowZvilBd-Kk415DBvcks5rROrngaJpZM4LbJ3N .

subtleGradient commented 7 years ago

Sorry for all the instability until now. Try the latest version here: https://github.com/facebookincubator/Keyframes/releases/tag/previewer-v1 It fixes a bunch of little bugs and has better error handling. It also includes a Previewer for Android.

Let me know if this still gives you any problems.

JoeAllison commented 7 years ago

Hey, thanks for the updated version. I've tried it out, unfortunately it's still not working. I'm not sure why this could be. The exporter is exporting the kf.json files, but I'm not able to run them. I have the extendscript toolkit installed. I've tried the command line tool, but when I run it says 'command not found'.

Mac os sierra v10.12 AE 2017 14.0.1.5

I've attached the source files if you're able to give any advice at all I'd really appreciate it. I'm dying to get this working!


From: Thomas Aylott notifications@github.com Sent: 11 January 2017 19:53 To: facebookincubator/Keyframes Cc: JoeAllison; Author Subject: Re: [facebookincubator/Keyframes] After Effects exporter not working (#100)

Sorry for all the instability until now. Try the latest version here: https://github.com/facebookincubator/Keyframes/releases/tag/previewer-v1

[https://avatars0.githubusercontent.com/u/19538647?v=3&s=400]https://github.com/facebookincubator/Keyframes/releases/tag/previewer-v1

facebookincubator/Keyframeshttps://github.com/facebookincubator/Keyframes/releases/tag/previewer-v1 github.com Keyframes - A library for converting Adobe AE shape based animations to a data format and playing it back on Android and iOS devices.

It fixes a bunch of little bugs and has better error handling. It also includes a Previewer for Android.

Let me know if this still gives you any problems.

- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/facebookincubator/Keyframes/issues/100#issuecomment-271975791, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADINHDcpsROo6kyQBAyA2_KjLyHnM1D3ks5rRTM6gaJpZM4LbJ3N.

cadicetienne commented 7 years ago

I tried to run a demo with your file. You're right nothing appears to the screen but I think it comes more from your artboard / AE config / scene than the exporting script or the mobile framework.

At least, the animation duration is working properly 'cause I got the event when the animation finishes. I think you may be drawing your items out of the viewbox. Try and start designing your animation from the artboard of the sample keyframe logo ?

JoeAllison commented 7 years ago

Amazing, thanks for looking into it. It's working now as long I start the animation from the logo example file. I've had a few issues with the positioning of shapes, and yea I think they were appearing off the artboard for some reason like you said. I'll practice it further.

Thanks again for your help,


From: cadicetienne notifications@github.com Sent: 12 January 2017 10:08 To: facebookincubator/Keyframes Cc: JoeAllison; Author Subject: Re: [facebookincubator/Keyframes] After Effects exporter not working (#100)

I tried to run a demo with your file. You're right nothing appears to the screen but I think it comes more from your artboard / AE config / scene than the exporting script or the mobile framework.

At least, the animation duration is working properly 'cause I got the event when the animation finishes. I think you may be drawing your items out of the viewbox. Try and start designing your animation from the artboard of the sample keyframe logo ?

- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/facebookincubator/Keyframes/issues/100#issuecomment-272123936, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADINHJfBgNDO9M4uKehnARCB-ZC1lPKyks5rRfuhgaJpZM4LbJ3N.

subtleGradient commented 7 years ago

My pleasure! The changes have landed in master now. I recommend using the Previewer often. You'll catch unsupported features and other issues faster that way. Sorry it isn't faster :(