How to collapse position property in after effects

21 Views Asked by At

I'm asking about a function that collapse position property for selected layer in after effects through a java script file. Is there any ways to do that? Thanks in advance

I could be able to selected the position property, but not to collapse or view it.

function viewPositionProperty() {
  var activeComp = app.project.activeItem;

  if (activeComp && activeComp instanceof CompItem) {
    var selectedLayers = activeComp.selectedLayers;

    if (selectedLayers.length > 0) {
      for (var i = 0; i < selectedLayers.length; i++) {
        var layer = selectedLayers[i];

        if (layer.property("Position") !== null) {
          layer.property("Position").selected = true;
        }
      }
    }
  }
}

0

There are 0 best solutions below