Skip to main content
Inspiring
July 17, 2024
Answered

Creating a shape layer using a script using vertex data

  • July 17, 2024
  • 1 reply
  • 402 views

Hi, I'm looking for a way to create shape layers based on input data.

Could someone tell me where to look for information? Searching the forum didn't help me

        "shape": {
            "path": {
                "vertices": [
                    [321.189575195312, 270.334594726562],
                    [49.9019775390625, 201.4365234375],
                    [-157.850402832031, 389.007446289062],
                    [-176.156921386719, 109.706909179688],
                    [-418.746490478516, -29.9147644042969],
                    [-158.77294921875, -133.633911132812],
                    [-100.949157714844, -407.495758056641],
                    [78.0298461914062, -192.297210693359],
                    [356.356506347656, -221.93147277832],
                    [206.998046875, 14.7876892089844]
                ],
                "inTangents": [
                    [35.1029663085938, -41.7064819335938],
                    [0, 0],
                    [50.5125732421875, 20.496826171875],
                    [0, 0],
                    [-3.88442993164062, 54.3741760253906],
                    [0, 0],
                    [-52.9132995605469, 13.1082458496094],
                    [0, 0],
                    [-28.8178100585938, -46.2728729248047],
                    [0, 0]
                ],
                "outTangents": [
                    [-35.1029052734375, 41.7064208984375],
                    [0, 0],
                    [-50.5125732421875, -20.4968872070312],
                    [0, 0],
                    [3.88442993164062, -54.3742065429688],
                    [0, 0],
                    [52.9132995605469, -13.1082458496094],
                    [0, 0],
                    [28.8177490234375, 46.2728729248047],
                    [0, 0]
                ],
                "closed": true
            }
        }
This topic has been closed for replies.
Correct answer Harchenko

I searched the forum even deeper and found a Solution

1 reply

Stephen Marsh
Community Expert
Community Expert
July 17, 2024

UXP (.psjs) or ExtendScript (.jsx)?

HarchenkoAuthor
Inspiring
July 17, 2024

jsx,

I already managed to create a shape using vertices, but without taking into account inTangets and outTangets, this is not what I need

HarchenkoAuthorCorrect answer
Inspiring
July 18, 2024

I searched the forum even deeper and found a Solution