Skip to main content
beatgram
Participant
April 28, 2014
Question

Create Shape Layer with Script in After Effects

  • April 28, 2014
  • 2 replies
  • 4224 views

I wrote a simple script for After Effects and it works well but there is a weird problem.

My script creates a shape layer which includes group, ellipse path, stroke and fill. Why does the "Group 1" have "Material Options: Group 1" property group? It's empty and it disappers when I click on its eyeball button. I don't want to display the property group. It seems like this problem doesn't happen on CS5.

Are there any solutions to avoid this? Is this a AE CC bug?

OS: Windows8.1

After Effects: version 12.2.1.5

Here's my script code.

app.beginUndoGroup("Add new shape layer");

var curComp = app.project.activeItem;

if(curComp){ var shapeLayer = curComp.layers.addShape();
var shapeGroup = shapeLayer.property("Contents").addProperty("ADBE Vector Group");
shapeGroup.property("Contents").addProperty("ADBE Vector Shape - Ellipse");
shapeGroup.property("Contents").addProperty("ADBE Vector Graphic - Stroke");
shapeGroup.property("Contents").addProperty("ADBE Vector Graphic - Fill");
}

app.endUndoGroup();

This topic has been closed for replies.

2 replies

Participant
July 7, 2016

Not sure what would be causing that. Another thing I noticed is that you can't use the "UU" shortcut to twirl down shape layer contents. I can create a regular shape layer, and "UU" works fine, but when I try to twirl down the shape layer created by this script, it doesn't respond to the "UU" shortcut. Any thoughts on why that's happening?

Tomas Sinkunas
Legend
April 28, 2014

Just ran a quick test on MAC:

AE CS3, CS4, CS5 don't produce that Material Options

AE CS6 & CC have Material Options, but they dissapear once toggle eye icon.

beatgram
beatgramAuthor
Participant
April 28, 2014

Thank you for giving me your cooperation, Tomas. I'll try to submit this problem as a bug report to Adobe team.