Skip to content

Instantly share code, notes, and snippets.

@dacap
Created July 5, 2023 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dacap/d1065c7530a2f88aed46f044069dcfe8 to your computer and use it in GitHub Desktop.
Save dacap/d1065c7530a2f88aed46f044069dcfe8 to your computer and use it in GitHub Desktop.
----------------------------------------
Layer Head
Default Category:
Properties:
* categories table: 0x55c3cbcda3e0
* folders table: 0x55c3cbcda4f0
* id 2
----------------------------------------
Layer Tilemap 1
Default Category:
Properties:
* categories table: 0x55c3cbcde030
* folders table: 0x55c3cbcde0e0
* id 4
local db = dofile('Attachment-System/db.lua')
for _,layer in ipairs(app.sprite.layers) do
if layer.isTilemap then
print('----------------------------------------')
print('Layer', layer.name)
local ts = db.getBaseTileset(layer)
if ts then
print('Default Category:', ts.name)
end
print('Properties:')
for k,v in pairs(db.getLayerProperties(layer)) do
print('*', k, v)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment