Automation "trim path" and "end" property

hi, i want to add “trim path” to multiple paths layer in after effect and set “end” keyframe to them.
but in automation toolkit, i didn’t found where should i select “Trim Paths”.
can you please guide me. thanks.

Hi @hadi, Welcome to the Forum!

Adding the properties from this menu is unfortunately not supported natively in AT (Group, Rectangle, Ellipse, Polystart, Path and so on…), I missed those options when I created AT (there are so many features in After Effects :sweat_smile:) but I have already noticed that and it is planned to be added in the next update, the missing action should be “add property” you will be able to choose this in the UI dropdown list and it should give you these properties to choose from.


Solution


In the meantime we can add this property using another method, running custom Javascript code inside the automation. In Automation Toolkit we can essentially pass variables/loops to the code and run the code only for some parts with some properties, so it can add the missing functionality.

var prop = variables["property"]
prop.addProperty("ADBE Vector Filter - Trim")

This is the custom code we will be running, the first line retrieves the property that we want to add to it the Trim Paths and the second line runs the code to add this property.
(the name of this property is different from the name in the ui menu).




It is complicated but i will try to explain the flow,

  1. we loop over the properties of the selected shape layers.
  2. when we find the property that we want to it the Trim Paths by its name - in that case it is the “Contents” of the shape layer.
  3. then we passed this property in the “javascript variable inputs” by the name of the loop, and run the code that can access this property by its name “property”.

This is the highest level of creating automations and used only in rare cases so it is probably not necessary to fully understand.


In the next part we can add the animation for this Trim Path by first Finding the new Trim Paths property, and then adding keyframes to “End” inner property.

I added a comment for each line so it should be easier to folllow.

Download -
Trim Paths Shape.zip (3.5 KB)

  • You need to enable javascript code in the automation advanced settings.

right click on the automation button → edit information → advanced settings



Please let me know if you have more questions,
Thanks,
Alon

Wow amazing.
i used that file and import it and that is exactly what is want.
i really waiting for new update now!

i forgot about adding “dash” also.
i tried to copy couple block in section “end” and try to add “dash” property to these paths.
but i couldn’t find option in “action” to add that “+” in dash inner property.
btw i don’t want to bother you bro.
i wait for new update. ppl like me don’t know much about coding and js codes.

please add some actions so we can add those property like “trim path” and actions for inner property like adding “dash” or set value for inner inner property like “dash” or “offset”. this plugin gonna make many works faster by adding action on inner properties.

thanks a lot again for creating this plugin.

@hadi I’m glad it worked as expected!
The next update has a long list of new supported properties, actions and bug fixes, so it will take some time to implement all of them into a new release, so unfortunately it could take some time.


Adding a “Dash” and “Offset” under the “Dashes” is the same process as adding “Trim Paths” to the “Contents”, even if it looks different in the ui
(in one you have a menu and the other has “+” button, but in both you add new property under another property.)

You can modify the js code for earlier to add these properties to the “Dashes” property.

var dashes_property = variables["Dashes_Property"]
dashes_property.addProperty("ADBE Vector Stroke Dash 1")
dashes_property.addProperty("ADBE Vector Stroke Offset")

the properties needs to be added by their respective “match name”, it is the unique name/identifier of the property in After Effects under the hood.
the are a cases where different properties can have the same name in the ui but they are not the same. In those cases match name can be helpful as it lets you to use it instead of just the name to get the right property.


the next part is to find the new properties under “Dashes” and set them to the desired values.

All the new line colored purple so you can easy see them.

Download -

Trim Paths Shape v2.zip (4.7 KB)


You aren’t, and it is completely understandable, coding is available in Automation Toolkit only to let coders to be able to use their skills too and bend some rules if they want (it is also a requested feature by them).

Let me konw if you have more questions,
Alon

thanks a lot again. :heart_eyes:
no problem. The important thing is the quality of the output, which will naturally take more time.
I have no other questions and thank you very much for answering my questions. :pray:

1 Like