LoginSignup
1
1

More than 5 years have passed since last update.

シェイプレイヤーの塗り(fill)設定

Posted at

やりたい事

シェイプレイヤーの塗りを変更する

function createLay(){
    //シェイプ 追加
    var adLay=comp.layers.addShape();
    adLay.name=("layer name")
    //パス1 追加
    adLay.property("ADBE Root Vectors Group").addProperty("ADBE Vector Shape - Group").property("ADBE Vector Shape")
    //シェイプ形状
    var myShape = new Shape();
    myShape.vertices = [[-cw/2,0], [cw/2,-100], [cw/2,100]];
    myShape.closed = true;
    //形状を適用
    var targetShape=adLay.property("ADBE Root Vectors Group").property("ADBE Vector Shape - Group").property("ADBE Vector Shape");
    targetShape.setValue(myShape);
    var myFill=adLay.property("ADBE Root Vectors Group").addProperty("ADBE Vector Graphic - Fill").property("ADBE Vector Fill Color").setValue([0, 0, 0, 0]);
}

何故か解決に時間がかかってしまったので、メモです。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1