Forum Replies Created
-
Gabriele Bartoli
March 23, 2016 at 1:16 pm in reply to: Hidden Content groups inside a Shape Layer Hierarchy – can anyone explain why this happens?Thanks, now it makes a little more sense! I’ll try to keep this in mind.
I kind of subconsciously figured out when to expect this hidden group to be there, but I was curious for a more reasoned answer to why it was there in the first place!Cheers.
-
Gabriele Bartoli
December 9, 2015 at 2:11 am in reply to: Bake expressions of a specific property for all layers inside selected compsHi.
I finally got the code to do what I needed it to be (which was slightly different from baking the expression for the whole length of the layer), and I thought I’d share it. Let me know what you think!
/*
Freeze expression at inPointThis script goes through the layers of the comps selected in the project panel and identifies all Text Layers.
If the Source Text property is being evaluated via expression, a keyframe is created at inPoint for the expression-driven value.
After creating such keyframe, the expression is disabled.This can be useful to save a lot of rendertime if the expression is not used to change the value across time but only to get
it from another source (.txt file, comp name, another text layer).
*/{
function manipulateTextLayers(comp){
var totLayers = comp.numLayers; // Store the length of the input argument 'comp'for (j = 1; j <= totLayers; j++){
var myLayer = comp.layer(j); // Store the layer object in a var// Check if the layer is a Text layer, then proceed
if(myLayer instanceof TextLayer){
var myProperty = myLayer.property("sourceText"); // Store property of interest in var// Check an expression is currently applied
if (myProperty.expressionEnabled){
var inPoint = myLayer.inPoint; // Store the inPoint time for the layer in var
var valAtInPoint = myProperty.valueAtTime(inPoint, false); // Store the value of the property at inPoint
// NOTE: Using 'false' as the second argument, any applied expression is NOT ignoredmyProperty.setValueAtTime(inPoint, valAtInPoint); // Create a keyframe inPoint with the expression-driven value
myProperty.expressionEnabled = false; // Disable the expression
}
}
}
}app.beginUndoGroup("Freeze expressions at inPoint"); // Set the undo group
// $.write("\n=============\n"); // Debug line of text
// Store the selection. The selection attribute returns an array
var selection = app.project.selection;// Run through the selected items and invoke function only for comps
for (i = 0;i < selection.length; i++){
if ( selection[i] instanceof CompItem){
$.write(selection[i].name + "\n"); // Debug// Invoke function
manipulateTextLayers(selection[i]);
}else{
$.write(selection[i].name + " is selected but not a comp!\n");
}
}}
-
Gabriele Bartoli
December 3, 2015 at 8:24 pm in reply to: Bake expressions of a specific property for all layers inside selected compsThanks for taking the time to look at the code. Hope you don’t mind, but I’m going to focus on the third point, which is the most important to me. I’m on a deadline and I’d like to focus on that for now. The rest of the code is exactly what Dan Ebberts wrote and it works, so I’ll leave it as is for the time being.
I’ll let you know how it goes!
Thanks again.
-
If I had to bet, I’d say your problem lies with the “” inside the txt file. Try to retype them or make sure they are the proper character.
The code itself works for me, I just pasted it as source text in a new project and I obviously get “MISSING” because I don’t have the txt file on my desktop.
Hope this helps 🙂
-
Gabriele Bartoli
November 25, 2015 at 4:09 pm in reply to: .txt files and relative paths: this might be a step towards a solutionUpdate: today I opened the project after turning on my machine, and the path shown above was not working anymore. I assume it was working yesterday because I somehow managed to declare the myPath variable as a global variable. I tried to recreate the conditions but I can’t seem to be able to do that. Oh well, too bad. 🙁
-
Gabriele Bartoli
November 25, 2015 at 12:41 am in reply to: Expression to point to folder containing comp in the project panelThanks. I have another fun question coming your way, but I’ll make a new topic. 🙂
-
Gabriele Bartoli
November 16, 2015 at 11:24 am in reply to: About corner pin: get corners position in world coordinate space and convert corner pin data to 3D NullThanks! I actually got it working last night 🙂
Cheers
-
Well, you could export everything in 4096 × 2304 and letterbox them. You shouldn’t have to convert the comps to do that, just change the output module crop settings to the proper negative values (which should be -72). Make sure the comps bg color is black though.
Even better, queue everything in Media Encoder and create a preset there.Not an elegant solution though, so I would probably go with Unknown and specify the 1.90 ratio if there is an option to add comments or notes.
-
Gabriele Bartoli
March 15, 2013 at 5:09 pm in reply to: Reference to expression text instead of final resultOk, thanks!
So, what it does is simply reading a string and then treat it as an expression, nothing more. Good to know. Kudos!
-
Gabriele Bartoli
March 15, 2013 at 4:56 pm in reply to: Reference to expression text instead of final resultNever mind, I found another post where you suggested to use triple quotations, and that worked out fine. But since we’re here, can I ask you where I can find a little more info regarding the eval() function?
Cheers and thanks a lot