How to expose Stroke Dashes "Offset" property via scripting? After Effects Scripting Bug
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.addProperty("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,
