ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

add time to comp at cursor script?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andy Engelkemieradd time to comp at cursor script?
by on May 5, 2015 at 3:45:31 pm

I have layers, I have keyframes. Lots of both actually. Who doesn't?
Well, now, someone says, "Hey, can you add this one more 3 second animation right here, 8 seconds before the end? Just push everything over. That's easy right?"

Well, no. That's not all that easy all the time. Assuming I'll have a bunch more changes later, because that's what happens, I'd like to do it neatly.

Currently, I can think of 2 ways to do this. I can duplicate my animation, create the 3 second portion that I need, trim that comp and put it into another precomp that I split so I can insert the 3 second addition into. The downside here is I now have all my elements in different comps. So if someone asks for a slight animation change, I have to do it in both places, or remember to do this 3 second split again. This method is terrible for flexibility.

I could also select each layer, one at a time and move the end points 3 seconds, as well as shift the keyframes over 3 seconds, adding my animation in the segment that I created. Of course, if some layers have in And out points after that time, then I just have to shift them over. That's great, but I have to do one layer at a time.
An alternative here would be splitting all the layers, but that causes expression problems, and it nearly doubles the amount of layers I already have.

That being said....Is there a script anyone knows of that does this for me? I'm not able to find one. The closes I could find is rd_Shifter, but I'm not having good luck even figuring out what that is supposed to do.

Here's what I'm looking for. I put the cursor at a time, say 9 seconds. My total time is 12 seconds. I need to add 3 seconds starting at 9 seconds. Now I run the script and say, add 3 seconds.
It would shift any in-point, out-point, or keyframe 3 seconds that happens to be at/after 9 seconds. That's it. I don't want to retime anything. I just want to add time.
Yeah, that's probably an issue if you're using footage without time remaps. So maybe there are some options there for splitting the layer or adding time remaps if there aren't any? Perhaps adding keyframes for that section? I'm not using footage, so it's not my concern today.

Anyone know of a script that does that? I just want to move those things exactly as I described. This actually comes up quite often.

or any other suggestion that isn't a script?


Return to posts index

Dave LaRondeRe: add time to comp at cursor script?
by on May 5, 2015 at 3:56:34 pm
Last Edited By Dave LaRonde on May 5, 2015 at 4:06:21 pm

I'd start with a new comp. I'd copy-paste the layers involved up to the point in the comp where the extra time goes. I'd move the timeline cursor later in the comp. I'd cop-paste the layers involved after the extra time has been inserted.

That MIGHT work, but without knowing how the comp is laid out, it might not. But a script? I'd say with 99% confidence, "no". There are just too many things that can be done in a comp to make a script a viable option.

Cripes, a script that could:
1) understand your intentions for the extension,
2) take all the currently-existing parenting, expressions and scripting that could link pre-extension and post-extension layers into account and
3) execute the change flawlessly
would probably be an application all by itself, selling for a few hundred bucks.

No, I'm afraid it comes down to work and time.

I hate it when people who don't get effects ask for changes after the fact. That's why, when I go over the project with them, I tell them, "After this point, any changes to the project will inevitably cause it to be delivered late. Do you understand this?"

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Walter SoykaRe: add time to comp at cursor script?
by on May 5, 2015 at 4:33:57 pm

I have started writing a script to do this, but as Dave says, it gets incredibly complicated very quickly.

How to handle footage? Precomps? Precomps with precomps? Precomps within precomps within precomps? Time-remapping?

If your comp is relatively simple, this can be done very quickly by hand.

1) Position the CTI at the start of the first layer that begins after the insertion point. Move the CTI forward 3 seconds. Select each layer that begins after the insertion point, and drag the first layer from its original start point to the CTI. Shy all these layers.

2) Position the CTI at the out point of the first layer that would be split by the insertion point. Move the CTI forward 3 seconds. Select each layer that would be split by the insertion, then drag the end of the first layer from its original out point to the CTI.

3) Keeping the selection from step 2, position the CTI at the insertion point. Hit U to reveal all keyframes. Use the accent grave (tilde) key to maximize the timeline, and lasso select all visible keyframes after the CTI. Use Alt+RightArrow to nudge them one frame or Alt+Shift+RightArrow to nudge them ten frames forward in time until you have moved them 3 seconds.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index


Andy EngelkemierRe: add time to comp at cursor script?
by on May 5, 2015 at 5:40:05 pm

I agree that with footage, this would become difficult, knowing what to do. But it wouldn't even make sense to do this to footage that didn't have time remap applied, so that would be solved with that wouldn't it? The same goes for precomps. If something is non-animating as a precomp, that's fine. It could just have time remap applied without causing a problem.
For the first draft of the script, you could just leave it up to the user to make sure they are selecting the correct layer types. Maybe just give one warning first. Or simply leave a marker, with a label of how much time it should be, on any failed layer at that time so the user knows that they'll need to manually add some time on that layer however they choose.

I would just say that if you have footage in your selection for the script, then a time remap automatically gets applied, and you'll end up with a pause in the footage.

But I'll be using your method here Walter. Thanks for listing that out. I didn't know I could hold alt to nudge keyframes. I would have moved the CTI to one that snapped well, added my 3 seconds, then snapped to that.

And Dave, I don't really appreciate the tone of your reply. Your assumptions are over the top, and listing them out in such a way is not helpful to anyone. It seems you are jumping to the conclusion that I want magic. It's not an impossible script at all, and not all script NEED to work in all situations. That just makes them better. In the situation where I know what I have, and all I'm looking for is that, I could run it. Get all in points after time, get all out points after time, get all keyframes after time, move all these variables a set amount of time. Done.
These are all things that I would be inputting. So is it really magically understanding what I want?
There's no copying and pasting. I wasn't even following what you were saying. How would copying and pasting add time? Wouldn't that just give me double footage, and increase the already towering number of layers?
What I'm looking for is pretty much the rd_Shifter script, but have it only move half of a layer after the CTI instead of the whole thing.


Return to posts index

Walter SoykaRe: add time to comp at cursor script?
by on May 6, 2015 at 3:25:21 am

[Andy Engelkemier] "I agree that with footage, this would become difficult, knowing what to do. But it wouldn't even make sense to do this to footage that didn't have time remap applied, so that would be solved with that wouldn't it?"

Maybe it would. Maybe the user would simply want to extend the edit.


[Andy Engelkemier] "the same goes for precomps. If something is non-animating as a precomp, that's fine. It could just have time remap applied without causing a problem. "

How do you time-remap it? A keyframe at the beginning and end, which slows everything down and almost certainly throws off timing? Keyframes around the insertion point, effectively pausing the precomp during the inserted time?

What if the precomp has internal animation that's supposed to be synchronized with the main comp? Should those layers/keyframes be adjusted as well? What if the precomp is used multiple times?

I'm still thinking about this problem, because it's one we face a lot and I'd like to make this problem easier to deal with -- but in a project of a certain level of complexity (where this script would be most handy), it's also the hardest to implement correctly.

I am very much open to any additional input you'd have.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Andy EngelkemierRe: add time to comp at cursor script?
by on May 6, 2015 at 12:28:50 pm

Ha, I always focus too much on animation footage. There is rarely a time when you would be able to "extend" footage there. That would just mean you wasted a lot of time rendering. But you're right. extending footage could be an option.

I think it's definitely best to have an option box come up with a few different ways to treat selected items. In case your footage is timed only before, extend is probably the best option. If it's not timed and you don't have enough of it, you may need to add a time remap and live with less frames. Or you may just want it to add a marker and leave the footage alone otherwise. I'd like that marker to be named with the amount of time/frames things were extended.

Regarding precomps: Many times I'll precomp something that doesn't animate. But that Has to have time. Unless AfterEffects added a way to say a precomp is a still image, I usually just keep the time it gives me, create a time remap, then delete the second key. Sure, I could render out to a photoshop file or other still format, but then it's no longer live linked to all the footage items which may not be complete.

If your precomp has timed animation, you're likely going to have a bad time including it. Although, in my case for this project (which is finished now) I did have some precomps with some animation. But the timing for that was done with time remap. The animation was done in the precomp with no pauses. The pauses needed were then added using time remap. I do this often for 3d rendered footage. You don't render pauses from there. So you make whatever edits you need in one comp, and then use that precomp in your new composition. I leave markers in the precomp, which come over when I insert it in (if not, there are scripts for that). I add a time remap, then insert keyframes at, and immediately after markers. Then I switch the keyframe on the markers to hold frames. This way I can insert my pauses easily, without having to split up my footage into new lines. I try and keep it under 50 layers per composition when possible, mostly just so it fits on screen. And precomping just makes expression more complicated.

I think one big challenge is that it's most convenient to do all your layers at once. But you may have to treat them differently. You may not be able to just say, do this for all precomps, do this for all footage, etc. You almost want to select what layers are treated how. I'm not sure how that works with scripts though. That's most likely more rare than not though, so you could just use the shy layer trick you mentioned. Do some of them, and could even have the script switch them to shy. Then do the others.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]