Bryan Woods
Forum Replies Created
-
Bryan Woods
September 9, 2015 at 10:02 pm in reply to: Freeze-frame at marker expression not working anymoreThese both were not working the other day. I just started a fresh project and the delay parent works. So strange. It was offsetting the original position of the parented layer in another project.
The freeframe though needs to be reworked I guess to anticipate a pair of layer markers since I’ve never used it beyond more than two before apparently.
-
Bryan Woods
September 9, 2015 at 3:19 am in reply to: Freeze-frame at marker expression not working anymoreI know I’ve used both in the past successfully. I didn’t notice that the freeze-frame expression was only for two keyframes, but I’ve definitely used the delay parent expression multiple times on position values in the past, and its not working now using it the same way.
-
I did actually! Its a little complicated so I was planning on putting together a tutorial on how to do it. It unfortunately requires a 3D package, but only to generate a distortion map. The rest is handled in after effects. Email me if you have an upcoming deadline and I can share with you some of the assets before I put together the tutorial.
-
I would highly recommend browsing through Dan Ebbert’s scripting website and brushing up on scripting for AE. Really useful tool. The examples in the “scripting” section further down on the main page is a great starting point for this. Once you’re in the thick of it trying to get it to work, come back and ask questions. Thats the best way to learn is ask about something that is relevant to what you’re focused on; it sticks with you better.
Good luck!
-
Bryan Woods
December 30, 2014 at 12:13 am in reply to: Fade audio in/out based on layer’s in/out pointsYup! That was the issue. Thanks again Dan for your help. I really appreciate your continued efforts here.
-
Bryan Woods
December 29, 2014 at 11:56 pm in reply to: Fade audio in/out based on layer’s in/out pointsThanks Dan. Thats what i’m looking for. I modified it slightly though to not use seconds but frames. The modification I made seems to work only briefly. Once I scrub through the timeline, the expression throws a warning:
“Property or method “tSecs” in class “global” is missing or does not exist.”
here’s my mod to your code below. Error happens on line 8, but i can’t figure out why:
transition = effect("Transition Duration")("Slider"); // transition time in frames
minVal = [-48,-48];
maxVal = [0,0];
if (time < (inPoint+outPoint)/2){
tSecs = transition/(1/thisComp.frameDuration);
 linear(time,inPoint,inPoint+tSecs,minVal,maxVal);
}else{
 linear(time,outPoint-tSecs,outPoint,maxVal,minVal);
}
-
Bryan Woods
October 19, 2014 at 9:16 pm in reply to: AE CC 2014.1.1 Random divid by zero error in expression?Things seem to be stable with this fix. Thanks Dan!
Any idea why this was happening? I’m guessing something may have changed internally with javascript with the new AE update?
-
Bryan Woods
May 28, 2014 at 1:33 am in reply to: Is it possible to change multiple comps start frame with a script?I wanted to add to this thread with a minor tweak that allows for the user when they run the script to put in the frame rate they are currently at. The modded code is below.
This saved me today! Thank you!
For those who just stumbled upon this thread in search of something like this. The code is below. Copy and paste the code into a text document, and make sure its plain text (not .rtf or any other extension). Save it out with the extension .jsx, and put it in your scripts folder in AE. Restart after effects and give it a try!
{//Set Undo Group
app.beginUndoGroup("Reset_StartFrame");frameRate = parseFloat(prompt("What is the frame rate?"));
var myItems = app.project.selection;
for (var i = 0; i < myItems.length; i++) {
if (myItems[i] instanceof CompItem) {
myItems[i].displayStartTime = 1/frameRate;
}
}app.endUndoGroup();
}
-
Got it. I keep thinking the CTI is its own property that you have to move, but its actually represented by the active layer’s current time. Thanks for that.
this seems to work well, after the loop:
activeItem.time = (holdLength*activeItem.frameDuration)+t;
and if I’m understanding correctly, we multiply the holdLength variable by the activeItem’s frame duration to convert to frames instead of AE interpreting it as seconds? And then adding the last value of t from the loop to it.
**********
Here is the final script for anyone who stumbles across this thread looking to do something similar:function main(){
//Set Undo Group
app.beginUndoGroup("xsheet_remap");//Define project and active items
var activeItem = app.project.activeItem;
var selectedLayer = activeItem.selectedLayers[0];
var curTime = activeItem.time;//User Input
var numFrames = parseFloat(prompt("Number of Frames"));
var holdLength = parseFloat(prompt("Frame Hold Length"));//Meat and Potatoes
if (! selectedLayer.timeRemapEnabled){
selectedLayer.timeRemapEnabled = true;
selectedLayer.timeRemap.removeKey(2);
selectedLayer.timeRemap.setInterpolationTypeAtKey(1, KeyframeInterpolationType.LINEAR, KeyframeInterpolationType.HOLD);
var nKeys = 0;
}else{
var nKeys = selectedLayer.timeRemap.numKeys;
}
var t;
for (var f=0; f < numFrames; f++){ t = f*holdLength*activeItem.frameDuration+curTime; //t is the frame number read as frames and not seconds selectedLayer.timeRemap.setValueAtTime(t,(f+nKeys)*activeItem.frameDuration); selectedLayer.timeRemap.setInterpolationTypeAtKey(f+nKeys+1, KeyframeInterpolationType.LINEAR, KeyframeInterpolationType.HOLD); } activeItem.time = (holdLength*activeItem.frameDuration)+t; app.endUndoGroup(); } main(); -
Ah, one last question; something that just came up from testing with the animators. They would like the script to move the CTI the same number of frames indicated after the last keyframe+1. So if they put in hold each frame for 5 frames, when the script finishes, advance the CTI by 6 frames (5 frame hold, the 6th is the start of the next key frame where they would run the script again with different values). Do you know how to move just the CTI? This would just run after the loop finishes.