You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JS extension API allows the creation of maps and tilesets, but the created map or tileset can't be opened without first saving it somewhere. It should be possible to open the created asset in Tiled and allow the user to choose where to save it and in which format.
Hmm, the main issue with this is probably that for opened files, the EditableMap and EditableTileset instances are owned by the MapDocument and TilesetDocument instances on the C++ side, whereas for assets created by the script, they are owned by the scripting engine (where they are subject to garbage collection). But maybe we can change their ownership with QQmlEngine::setObjectOwnership once you try to "open" them.
How does this interact with Tilesets, which currently can't be used before being saved AFAIK?
It just... allows creating an unsaved tileset, which could then also be used... and when you save a map using the unsaved tileset, it'll probably just get embedded (see #3161 (comment)). I forgot to test it.
The JS extension API allows the creation of maps and tilesets, but the created map or tileset can't be opened without first saving it somewhere. It should be possible to open the created asset in Tiled and allow the user to choose where to save it and in which format.
See #1902 (comment).
The text was updated successfully, but these errors were encountered: