
tardigrade01
Contributor
tardigrade01
Contributor
Activity
‎Nov 17, 2017
10:50 AM
1 Upvote
I haven't been able to integrate my ExtendScript test with my other tests, but I have created separate sets of tests using Karma and Istanbul for the AngularJS unit testing, Protractor for the e2e testing, and this: GitHub - tmaslen/jasminejsx: A port of Jasmine 2.2.0 that is compatible with Adobe ExtendScript for the Extendscript testing. Not really an answer but maybe you can find a way to get jasminejsx to play along with your other tests.
... View more
‎Sep 13, 2017
07:27 AM
In my function, here was how I set it up where you assume theLayer is an instanceof TextLayer: if(theLayer.property("Source Text").value.pointText){ //do calculations using sourceRectAtTime } else { //do calculations using boxTextSize }
... View more
‎Sep 12, 2017
03:01 PM
Looks good. I am partial to putting it in a switch or if ... else statement but above should work just as well
... View more
‎Sep 12, 2017
01:50 PM
I just brought it up because this same issue vexed me for months when I was new to ExtendScript. Drilling down to the boxTextSize property can be a headache, but this thread proved invaluable for me as a reference when setting up my function. ADBE Text Document boxTextSize attribute
... View more
‎Sep 12, 2017
01:39 PM
Right, I was just pointing out that point text (if you click the text icon and start typing) uses sourceRectAtTime, while boxed text (if you click the text icon and then draw a text box before typing) uses boxTestSize
... View more
‎Sep 12, 2017
12:47 PM
In case you need to use it with box text, you will need to substitute boxTextSize for sourceRectAtTime
... View more
‎May 19, 2017
07:16 AM
very helpful. thanks!
... View more
‎Mar 01, 2017
10:06 AM
thanks. I ended up passing sourceText.value.boxTextPos but I need to handle keyframe values, so it looks like sourceRectAtTime() will be the way to go
... View more
‎Mar 01, 2017
08:32 AM
oh, never mind. I see that you should pass boxTextPos
... View more
‎Mar 01, 2017
08:29 AM
Thanks. Ugh. This is what I was afraid of. I have been trying sourcePointToComp() but I can find no documentation anywhere as to what parameters this method should take. comp.layer(1).sourcePointToComp() certainly doesn't work.
... View more
‎Mar 01, 2017
08:02 AM
bueller?
... View more
‎Feb 03, 2017
08:00 AM
have you considered using a shell script in terminal? e.g. osascript -e 'tell application "Adobe After Effects CC 2017" to activate' -e 'tell application "Adobe After Effects CC 2017" to DoScriptFile "yourscript.jsx"' -e 'tell application "Adobe After Effects CC 2017" to quit' -e 'tell application "Adobe After Effects CC 2017" to activate' and so on? you could actually include app.quit() in whatever script file you do, and then put something like above in a loop based on how many items you are rendering...
... View more
‎Jan 12, 2017
12:18 PM
ES = ExtendScript. app.project.save(new File(outputFileNameInMediaEncoderWatchFolder));
... View more
‎Jan 11, 2017
11:02 AM
we use ES to save our AEP file to a Media Encoder watch folder, which automatically kicks off the render.
... View more
‎Nov 15, 2016
06:26 AM
These are great helps. Thanks
... View more
‎Oct 19, 2016
09:41 AM
I don't know, but it's probably also worth posting this in the general AE forum: After Effects
... View more
‎Oct 12, 2016
06:52 AM
var logger = selLayers[0].property("ADBE Transform Group").property("ADBE Position").value doesn't work? (or 'keyValue' or 'valueAtTime' or 'valueAtKey' depending on context?)
... View more
‎Oct 06, 2016
08:08 AM
1 Upvote
If you really need ExtendScript Toolkit, I don't understand why you wouldn't download it from the Creative Cloud interface.
... View more
‎Oct 04, 2016
06:58 AM
I wasn't aware that render() wasn't working correctly in CC15. I just wrote a script that uses it (so far) without problems. What problems have people been encountering?
... View more
‎Sep 09, 2016
09:22 AM
I know I'm kind of an echo chamber in here but I'm just trying to find a solution however I can. So, has anyone used initKeyboardEvent in ExtendScript, or is there a way to create an eventListener to detect an error window opening?
... View more
‎Sep 09, 2016
08:47 AM
Well, scratch that, the PNGIO error still happens, but less frequently. Does anyone know of a way to suppress error messages, or a scriptable way to simulate an "enter" keypress? beginSuppressDialog() doesn't work for this kind of modal, and the traditional JS method of document.createEvent("KeyboardEvent"); doesn't work in extendScript
... View more
‎Sep 09, 2016
07:54 AM
For what it's worth/in case anyone else runs into this issue, it turned out to be an "async" issue; I solved it by splitting the importing of the image and the adding of the image as a layer into separate functions, and on the js side via CSInterface, made the add image function a callback of the import image.
... View more
‎Sep 08, 2016
12:07 PM
yes, I am, but whenever I use anything other than a .png, I get the following error: AEGP Plugin PNGIO Support: PNGIO library error: Input file doesn't seem to be a PNG file. (5027 :: 12) Here is the code: var importOpts = new ImportOptions(new File(mapLayer)); var importImg = app.project.importFile(importOpts) app.project.item(1).layers.add(importImg);
... View more
‎Sep 08, 2016
10:45 AM
to add to this question, when I try to import a .jpeg or .gif format, why does Importfile always expect a png?
... View more
‎Sep 08, 2016
09:20 AM
I have a node file that downloads a static map file as a .png (I have also tried downloading it as a .jpg) and adds it as a layer to a comp via CSInterface. The first time I do so, I consistently get this error: AEGP Plugin PNGIO Support: PNGIO library error: Unable to decode PNG file (5027 :: 12) However, the image does import and show up as a layer in the comp. (Also, oddly, it is not visible in the comp until I move the playhead.) If I try importing again, I do not get the error. Has anyone else encountered this kind of thing when importing images and/or found a solution?
... View more
‎Aug 29, 2016
07:17 AM
we ended up doing something similar to what Dan suggested and the generateRandomNumber function (and I can confirm that these values persist from session to session): function createItemID(aeItem, dataModelItem){ var wasLocked = false; if (aeItem.locked == true){ wasLocked = true; aeItem.locked = false; } if (aeItem.comment == "" || aeItem.comment == "0"){ aeItem.comment = generateRandomNumber(); } if (wasLocked == true){ aeItem.locked = true; } dataModelItem.id = aeItem.comment; }
... View more
‎Aug 17, 2016
07:28 AM
for what it's worth, this is my current, hacky workaround: var data = { number: 12345 } num = data.number.toString(); if (num.length > 3){ data.number = num.substring(0, num.length-3) + "," + num.substring(num.length-3); }
... View more
‎Aug 17, 2016
07:15 AM
As far as I can tell and after many attempts, this method doesn't work in ES. Does anyone know of an alternative for automatically adding commas to large numbers?
... View more
‎Aug 17, 2016
06:40 AM
1 Upvote
To add to the above point about using curl, I just ended up having to do this in a project, and after struggling with the ExtendScript socket logic (it may have had to do with the server I was trying to pull images from, or simply my own incompetence), I ended up following the solution, courtesy of FabianTheBlind, who I believe posts on this forum. Note that you have to change your General Preferences to allow scripts to write files across networks. http://stackoverflow.com/questions/26285164/get-read-text-file-from-url-javascript-for-after-effects var curlcmd = "curl feeds.nfl.com/feeds-rs/schedules.json > ~/Desktop/test/schedules.json"; var stdout = system.callSystem(curlcmd); $.writeln(stdout); var file = File("~/Desktop/test/schedules.json"); file.open(); var content = file.read(); file.close(); $.writeln(content);
... View more