Skip to content

How to obtain the tree structure data of layers? #58

Description

@826327700

I wish to obtain the layer structure and format it into JSON, structured as follows:

[
    {
        "type": "group",
        "visible": true,
        "opacity": 1,
        "blendingMode": "normal",
        "name": "group test",
        "left": 0,
        "right": 0,
        "top": 0,
        "bottom": 0,
        "height": 0,
        "width": 0,
        "children": [
            {
                "type": "layer",
                "visible": true,
                "opacity": 1,
                "blendingMode": "normal",
                "name": "layer test",
                "left": 0,
                "right": 0,
                "top": 0,
                "bottom": 0,
                "height": 0,
                "width": 0,
                "mask": {},
                "image": {}
            }
            
        ]
    }
]

Can anyone tell me how to do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions