Bryan Woods
Forum Replies Created
-
Well, its a script intended for after effects, I just don’t know if it will be used on PCs or Macs, so i’m trying to make this thing flexible as possible and combine file paths and file names together and have proper slashes in the path.
-
Yeah, normally I would do this too. But I don’t know what platform this script will be used on, so I’m trying to join these two variables and get the proper slashes for free. Any suggestions?
-
Couldn’t you just pull out the last keyframe of your timeremap property to slow down your footage? The loop expression is just going between the first and last keyframes of the timeremap property.
-
Bryan Woods
October 2, 2015 at 1:04 am in reply to: Expression for link relative position of a stroke to a track/nullI think you’re better off with planar tracking the license plate and then painting on a still thats distorted to the planar tracker’s output. Otherwise, to get this to work in AE I think you might need to track each individual feature you’re painting out so you have positional data for that paint fix, and then apply a paint layer tied to the position value of that tracked feature.
-
Thanks Xavier! That worked great.
-
Got it. Never mind.
Answer is to use .property(group index number).
So for me, it was circleLocator.property(2).setValue(halfHeight); Because Circle effect’s radius is the second property in that effect group.
-
So what have you done in the past to fix this? This code is just sitting in an orientation layer property. My camera is the length of the comp so there shouldn’t be any issues “finding” a camera at any point in the timeline.
-
Thanks Xavier. This all worked really well once I pulled it apart and got it working with my existing code.
One issue I’m having though is detecting if the layer actually has tracking data or not. Here’s part of my code:
if (selectedLayers[i].property("motionTracker")){ // I would think this would work, but its not -
AH, I new it would be a double loop, but just couldn’t figure out the correct property names to get the tracker’s points.
I’m noticing the first two variables seem to have multiple items in them. Is this a compact way of defining multiple variables on one line? I’m used to just “var “x” = “z”; I haven’t seen comma separated values inside a defined variable before (aside from something like an array).
Thanks for your response Xavier! I’ll try this out on monday and report back if I have any more issues or questions.
-
Yup, that did the trick. Although my example wasn’t entirely accurate, I needed to add .toString() to my variable to get it to work properly, but I got it working! Glad to see you’re still hanging around here Dan! Always appreciative of your help. Its been a while since I’ve needed to script in AE again; a little rusty.
Actually, one quick followup:
How would you insert a large chunk of expression but keep it readable in my script editor? At the moment, I have to crush all of the expression code I’m inserting into one very long line. Is there some operator, like \n to do a line break, but not affect the actual expression being inserted?Thanks again!