Dave Currie
Forum Replies Created
-
You understood correctly, and I finally just got it to work by changing the place where the preset was applied to the layer.
Thanks for your help Andreas!
-
Hmm I gave that a try and it still doesn’t want to work. The script creates the layers and doesn’t time out or anything, but it doesn’t apply the preset or any of the expressions I have set.
I looked at the JavaScript reference here:
https://estk.aenhancers.com/3%20-%20File%20System%20Access/folder-object.htmlAnd tried this:
var presetPath = Folder(appPackage.parent.absoluteURI + "/Support Files/Presets/MyPreset.ffx");
I put an alert to see the actual file path that’s being retrieved and everything looks correct except for maybe the beginning of the string which looks like this:
/c/Program Files/…..And it still produces the same result 🙁
-
Dave Currie
March 9, 2016 at 7:17 pm in reply to: Extendscript – Check if Layer Name Exists, Increment Last IntegerWorks perfectly! Thank you Dan!
-
No, I am able to have either the Light or the Solid with Element, but not both. And this is just in AE CC – in CS 5.5 everything works perfectly!
Actually it looks like AE isn’t crashing, but after about 60 seconds I get a ‘Timeout while waiting for engine’ error.
Says it’s getting hung up on this line:
accum[0] += pSpeed.valueAtTime(framesToTime(f))[0];
-
Thank you for your help Dan!
This seems to work in CC:
pSpeed = thisComp.layer("Easy Camera Controller").effect("X Y Z Rig Speed")("3D Point");
pOffset = thisComp.layer("Easy Camera Controller").effect("Camera Rig Position")("3D Point");accum = [0,0,0];
f = 0;
while ( f <= timeToFrames(time)){
accum[0] += pSpeed.valueAtTime(framesToTime(f))[0];
accum[1] += pSpeed.valueAtTime(framesToTime(f))[1];
accum[2] += pSpeed.valueAtTime(framesToTime(f))[2];
f++;
}x = accum[0]*thisComp.frameDuration+pOffset[0];
y = accum[1]*thisComp.frameDuration+pOffset[1];
z = accum[2]*thisComp.frameDuration+pOffset[2];[x,y,z]
So my rig is in the scene and I add a solid layer with Element 3D, everything works fine.
The second I add a light to the scene the whole thing crashes – could this have something to do with how CC caches in the background and the frame-by-frame integration in the expression?
I’m pulling my hair out trying to figure this one out!
Thanks again Dan and Happy Thanksgiving!
-
Hello Dan,
I made a camera rig in CS5.5 using a similar expression to your solution here.
You can start from 0 and accelerate, then decelerate back to 0. Here is the position expression I used for that:
pSpeed = thisComp.layer("Easy Camera Controller").effect("XYZ Rig Speed")("3D Point");
pOffset = thisComp.layer("Easy Camera Controller").effect("Camera Rig Position")("3D Point");
accum = 0;
f = timeToFrames(inPoint);
while (f < timeToFrames()){
accum += pSpeed.valueAtTime(framesToTime(f));
f++;
}
accum*thisComp.frameDuration+pOffsetThis works nicely in CS5.5, and I made a modified version for CS5 by splitting the 3D point controls into individual sliders.
Using the same expressions in CC works, but for some reason when I use Element 3D and add a light, it crashes After Effects every time with no error messages.
Here is the expression so far for the CC version but for some reason it always comes up with ‘valueAtTime is undefined’. I need to find the right solution so that AE doesn’t crash with Element, and I still have the same functionality on the rig.
pSpeed = thisComp.layer("Easy Camera Controller").effect("XYZ Rig Speed")("3D Point");
pOffset = thisComp.layer("Easy Camera Controller").effect("XYZ Rig Position")("3D Point");accum = [0,0,0];
f = timeToFrames(inPoint);
while ( f <= timeToFrames()){
accum[0] += pSpeed[0].valueAtTime(framesToTime(f));
accum[1] += pSpeed[1].valueAtTime(framesToTime(f));
accum[2] += pSpeed[2].valueAtTime(framesToTime(f));
f++;
}[accum[0]*thisComp.frameDuration+pOffset[0], accum[1]*thisComp.frameDuration+pOffset[1], accum[2]*thisComp.frameDuration+pOffset[2]]
If you’d like to see the whole rig just let me know and I can send you a copy.
Thank you for any help you can provide!