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

How to expose Stroke Dashes "Offset" property via scripting? After Effects Scripting Bug

Participant ,
Aug 29, 2025 Aug 29, 2025

Hi all,

I'm trying to write a script that creates consistent dash lengths in shape layers, but i cannot seem to operate on the 'Stroke/Dashes/offset' property

From digging (using scripting + property inspection) I found that the Dashes group always contains:

Dash 1

Gap 1

Dash 2

Gap 2

Dash 3

Gap 3

Offset

When working in the UI, if I add a Dash or Gap, After Effects automatically makes the Offset property visible, and each dash and gap as you add them setting a value. 


However, when I do the same via scripting, Dash 1 and Gap 1 become visible as expected, but the Offset never shows up in the UI. Scripting can still find the property (ADBE Vector Stroke Offset), but it remains hidden in the panel.


Example

var comp = app.project.activeItem;
var lyr = comp.selectedLayers[0];
var contents = lyr.property("ADBE Root Vectors Group");
var grp = contents.addProperty("ADBE Vector Group");
grp.name = "Group 1";

var sub = grp.property("ADBE Vectors Group");
var stroke = sub.addProperty("ADBE Vector Graphic - Stroke");
var dashes = stroke.addProperty("ADBE Vector Stroke Dashes");

var dash = dashes.addProperty("ADBE Vector Stroke Dash 1");
var gap = dashes.addProperty("ADBE Vector Stroke Gap 1");
var offset = dashes.property("ADBE Vector Stroke Offset");

Has anyone figured out a way to make the Offset visible in the UI via scripting (the same way AE does automatically when you add a dash manually

I'm 99% confident this is a bug in scripting.
The user guide has the property listed as a match name along with the dash and gaps which work properly but fail to mention that it cannot be exposed. Hopefully i can draw attention to this bug to the right team,

TOPICS
Scripting
63
Translate
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
Participant ,
Aug 31, 2025 Aug 31, 2025

I'm thinking I should have set this up as a bug. The scripting guide lists the "Dashes" "Offset" matchname the same way as "Dashes and "Gaps" yet it cannot be exposed as they can.  

Can a mod move this to bugs please, if you agree.

Translate
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
Valorous Hero ,
18 hours ago 18 hours ago
LATEST

Looks like you missed the addProperty - 

var offset = dashes.property("ADBE Vector Stroke Offset");


var offset = dashes.addProperty("ADBE Vector Stroke Offset"); 


Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
Translate
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