• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

need a help on trim path animation

Community Beginner ,
Dec 17, 2023 Dec 17, 2023

Copy link to clipboard

Copied

I have multiple paths in single layer, if i use trim path for this layer... then am getting  one path after another continouly, but i need some little break (like 5 to 10 frames) in between each path... Please provide the expression that I could use for a pause of few seconds between each path.

TOPICS
Expressions , How to , User interface or workspaces

Views

196

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 17, 2023 Dec 17, 2023

Copy link to clipboard

Copied

The simplest approach is to create one Trim Path for each shape.

Using expressions, it should be possible if your paths don't contain bezier curves.

 

screenshot.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 17, 2023 Dec 17, 2023

Copy link to clipboard

Copied

Hi thanks for replying, but I have more than 50 layers this method takes much time that's why I'm looking for some expressions or short cut

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 17, 2023 Dec 17, 2023

Copy link to clipboard

Copied

Then, you'll need to use a script to add a trim path property and keyframes to each shape.

But how do you determine the animation duration for each path, is it fixed??

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 17, 2023 Dec 17, 2023

Copy link to clipboard

Copied

Where can I get such a script for trim path?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 17, 2023 Dec 17, 2023

Copy link to clipboard

Copied

50 layers or 1 layer with 50 shapes?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 17, 2023 Dec 17, 2023

Copy link to clipboard

Copied

Sorry 50 shapes  in one layer

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 17, 2023 Dec 17, 2023

Copy link to clipboard

Copied

I wrote this code; you can edit the initial variables. (pathDuration and timeBreak)

I hope you have the same hierarchy as I do.

 

 

function framesToTime(frames) {
  return thisComp.frameDuration * frames;
}

var proj = app.project;
var thisComp = proj.activeItem;

// in seconds or use framesToTime(15) for 15 frames
var pathDuration = 5;
var timeBreak = .5;


if (!thisComp.selectedLayers.length) {
  alert('Select a shape layer');
}

app.beginUndoGroup("Undo");
var selectedLayer = thisComp.selectedLayers[0];
var currentTime = 0;

for (var i = 1; i <= selectedLayer.content.numProperties; i++) {
  var shapeGroup = selectedLayer.content.property(i).property("ADBE Vectors Group");
  var trimPath = shapeGroup.addProperty("ADBE Vector Filter - Trim");
  trimPath.property("ADBE Vector Trim End").setValueAtTime(currentTime, 0);
  trimPath.property("ADBE Vector Trim End").setValueAtTime(currentTime + pathDuration, 100);
  currentTime += pathDuration + timeBreak;
}

app.endUndoGroup();

 

screenshot.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 17, 2023 Dec 17, 2023

Copy link to clipboard

Copied

LATEST

Thank you, really appreciate your time and work. 

 

Since each shape has different length, can the pathDuration variable be set dynamically in correspond to the length of the shape? I will send you my work in DM for clear understanding.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines