Adam Walker
Forum Replies Created
-
Adam Walker
April 15, 2021 at 7:31 am in reply to: Automate keyframe values and align with split markersThis is exactly what I was looking for, thanks for you’re time and expertise Andrei!
-
Adam Walker
April 12, 2021 at 7:31 pm in reply to: Automate keyframe values and align with split markersThis is a great expression and very close to what I’m looking for (thank you!) however is there a way to set actual key frames at the start and end of the split marker?
I need to be able to place additional keyframes in between the two main key frames in order to customise the reveal of a word to be sooner or later, so that I can sync the audio with the text.
Is this possible through an expression?
-
Adam Walker
April 12, 2021 at 2:54 pm in reply to: Automate keyframe values and align with split markersThanks for your response Andrei, though after effects seems to have a problem with line two as I get the following error.
” Unable to execute script at line2. marker is undefined “
I saved your script as a .jsx file and after selecting the text layer executed the script, could this be because the markers are split instead of whole?
Thanks,
Adam
-
Adam Walker
October 21, 2019 at 9:11 pm in reply to: Setting the In and Out points of a text layer to align with markers via a scriptAs always Dan, this is brilliant and works perfectly for what I need.
Thank you once again!
Adam
-
Adam Walker
October 20, 2019 at 8:29 pm in reply to: Automatically scale text layer to accomodate the length of textYou absolute legend, Dan you are the man.
Thank you for your time and direction with this, it really is appreciated.
Below is how i have edited the code from your previous answer in case anyone else is looking for this in the future.
P.s. Do you have any recommended java/AE scripting tutorials/courses, looking through the forum I can see you are a wizard at this stuff.
Thank you once again Dan
var text;
var maxW, maxH, r, w, h, s, myTextLayer;
while (!myFile.eof){
text = myFile.readln();
if (text == "") text = "\r" ;
var maxW = myComp.width*0.9;
var myTextLayer = myComp.layers.addBoxText([maxW,200],text);
} -
Adam Walker
October 20, 2019 at 6:56 pm in reply to: Automatically scale text layer to accomodate the length of textAppreciate the speedy response Dan, I would have never have got this!
The expression now works in the script ????
The only thing I need to adjust is the variation in scale (I understand this is a result of the script itself).
Is there a way to keep the typography the same scale yet still restrict it from going beyond the comp border, so if the line is too long it becomes two lines on one text layer and if the line is only say 3 words it just stays the original size specified in the character tab?
Thanks again!
Adam
-
Adam Walker
October 20, 2019 at 5:38 pm in reply to: Automatically scale text layer to accomodate the length of textHey guys,
Thanks for the post David I had a similar issue and thank you Dan for the solution!
In the hope that this is not seen as hijacking the post I have a query if this code can be incorporated into a script.
I have used the code as an expression on the scale transform of the text layer which of course works as intended, however is it possible to add this expression to the following script?
(This was a script of yours (Dan) that I found on your website – https://www.motionscript.com/ae-scripting/create-text-layers-from-file.html)Named – Creating Text Layers From File
The idea being that I can import long lines of text from the file and ensure they do not go beyond the comp borders, I believe the combination of these two pieces of code would do just that.
FYI I have little to no understanding of javascript.
Thanks in advanced to you both.
Adam
//
// createTextLayersFromFile.jsx
////
// This script reads a user specified text file and
// creates a text layer for each line of text in a
// new comp called "my text comp"
//{
// create undo group
app.beginUndoGroup("Create Text Layers From File");
// Prompt user to select text file
var myFile = File.openDialog("Please select input text file.");
if (myFile != null){// open file
var fileOK = myFile.open("r");
if (fileOK){// create project if necessary
var proj = app.project;
if(!proj) proj = app.newProject();// create new comp named 'my text comp'
var compW = 160; // comp width
var compH = 120; // comp height
var compL = 15; // comp length (seconds)
var compRate = 24; // comp frame rate
var compBG = [48/255,63/255,84/255] // comp background colorvar myItemCollection = app.project.items;
var myComp = myItemCollection.addComp('my text comp',compW,compH,1,compL,compRate);
myComp.bgColor = compBG;// read text lines and create text layer for each
// until end-of-file is reachedvar text;
while (!myFile.eof){
text = myFile.readln();
if (text == "") text = "\r" ;
myComp.layers.addText(text);
}// close the file before exiting
myFile.close();
}else{
alert("File open failed!");
}}else{
alert("No text file selected.");
}app.endUndoGroup();
}