How to make an NFT generation script?

A place to talk about anything else with other Pixelmator users.
User avatar

2022-03-18 17:15:17

I need to figure out how to make a script that:

Opens a document
Hides all layers in all groups
Unhides one layer from each group
Exports the resulting image
Exports a .JSON file

Original project by someone else:
https://github.com/HashLips/hashlips_ar ... _ps_script

NFT generation script:
https://github.com/HashLips/hashlips_ar ... enerate.js

Example exported JSON file

{"name":"NFT ITEM #777",
"description":"10,000 magic coins",
"image":"To be replaced",
"edition":777,"
attributes":[{"trait_type":"Metal","value":"Copper"},{"trait_type":"Logo","value":"Sakura"}}

In this case, there'd be a folder named Metal and a layer in the folder named Copper. There'd be a folder named Logo with a layer in the folder named Sakura.

help