

Timur Solomon
Forum Replies Created
-
Timur Solomon
June 1, 2022 at 5:16 pmI solved the issue with hyperlinks, it’s not much more difficult than just adding dashes, but they were needed as well.
Thank you for your time
-
Timur Solomon
June 1, 2022 at 1:52 pm -
Timur Solomon
May 29, 2022 at 7:13 pmI added a new list, through a loop with add(“item”, “name”)
Understood)) -
Timur Solomon
May 29, 2022 at 6:32 pmHi Brian,
You did everything right, you just didn’t have enough information that the composition needs to be found through a loop.
The code below references your composition. You can make a button for it for convenience.
I myself have been studying scripts for about six months. And it’s worth it! I wish you success.app.beginUndoGroup("Set Default Text");
var defaultText = "Insert Title"; // << Type you text here
for (var c = 1; c <= app.project.numItems; c++) {
var comp = app.project.item(c);
if (comp instanceof CompItem && comp.name == "Global Topic Reference") {
for (var i = comp.numLayers; i > 0; i--) {
var layer = comp.layer(i);
if (layer instanceof TextLayer) {
var textProp = layer.property("Source Text");
textProp.setValue(defaultText + " " + i);
};
};
};
};
app.endUndoGroup(); -
Timur Solomon
May 29, 2022 at 5:34 amHi Brian,
Do I understand correctly that you want to change the text of all text layers in some composition?I’m not sure it’s possible to “reset” parameters through expressions. But through a script, it’s possible.
app.beginUndoGroup("Set Default Text");
var comp = app.project.activeItem;
var defaultText = "Insert Title"; // << Type you text here
for (var i = comp.numLayers; i > 0; i--) {
var layer = comp.layer(i);
if (layer instanceof TextLayer) {
var textProp = layer.property("Source Text");
textProp.setValue(defaultText + " " + i);
};
};
app.endUndoGroup();
If you are using KBar, you can create a button to execute a script. You need to open compositions with text layers and run the script to “reset” them.
If this is what you need. For convenience, you can make an option without having to open a composition with text to run the script. But this requires the name of the composition to set the conditions
-
Timur Solomon
May 26, 2022 at 3:47 amHi Walter, thanks, i think this is what i need 👍
-
Timur Solomon
May 23, 2022 at 10:50 amThe solution is the following:
setInfluence = fx(4).setTemporalEaseAtKey(i, [inInfluence[0]], [outInfluence[0]]);
The keys of the layer transformation parameter contain several objects, planes, width, height.
And for the transform effect, these parameters are decoupled. Therefore, it is necessary to specify the part of the array with key data
-
Timur Solomon
May 17, 2022 at 3:01 amHi Walter,
Thanks for your reply.
The most valuable thing is that you explained to me that it didn’t have to be done in a loop. I figured out what the script logic error is.
-
Timur Solomon
May 13, 2022 at 7:20 amThe issue is resolved, I just added another character – \
textProp.expression = ‘text.sourceText.replace(/\\D+/g, “”)’;
😄
-
Timur Solomon
May 12, 2022 at 3:14 pmHi Dan,
Thank you for your help, it helped.