Export and import
Import
You rarely start a character from nothing. The art arrives as a layered Photoshop file, as a folder of cut-out images, as a Spine export from a colleague or from an older project, or as another Ligamen project with parts that you want to reuse. File → Import… brings all of these in through one window. This article describes the window, the four sources, the options that each one has, how the imported data lands in the project, and the Texture Unpacker, which goes the opposite way and turns an atlas back into separate images. Opening a project, which replaces the current one, is a different thing and is described in Project files.
The Import window#
The row of source tiles under the title picks what you import: PSD layers, Images, Spine JSON and Ligamen data. Below it is a drop zone, where you drop a file or click browse…, and a row that shows the chosen file with a short summary of what it contains. The drop zone says which file types it accepts for each source: a .psd file, PNG, JPG or WebP images, .json or .skel, and a .ligamen file. Cancel closes the window without changes, and Import runs the import. The whole import is one undo step.
A project that is already open keeps its bones, and the form fields under the file row decide where the new data goes. Import data into has Current project, which adds the data to the open project, and New project, which discards whatever is open, after the usual question about unsaved changes, and starts from the imported file. Scale goes from 0.1 to 2 and multiplies every spatial value on the way in, which helps when the source was drawn at a different size. Padding is the transparent border, 2 pixels by default, around each image that is written out. Images folder is where the images that the import creates are saved, ./images by default. If the project has no images folder yet, the import makes this one the project's folder, and otherwise it adds it as an additional folder. Both are undone with the import.
PSD layers#
A layered .psd file turns into slots and region attachments. Every layer, taken at any depth of the groups, becomes one slot with its own image, named after the layer and placed where the layer sits on the canvas of the PSD file. The pixels of every layer are written as a PNG into the images folder. Layers that share a name are numbered, name (2), name (3), so nothing is lost. The options are Ignore hidden layers, on by default, Delete previously imported images, Create bones per group, which makes a bone for every group of layers, Keep layer order, which keeps the order of the layers, Trim transparent and Replace existing. Layers… shows the list of objects that will be imported, and a button next to the file reads the file again after you changed it in Photoshop.
Images#
The Images source imports separate PNG, JPG or WebP files, or a whole folder, as slots. The list under the drop zone has a check box for each file, so you can leave some out. The options are Trim transparent, One slot per image, Create region attachments, Sort by file name, Replace existing and Auto mesh, which makes a mesh instead of a plain region for each image. Dragging image files onto the viewport does the same with the default options, and that is the quickest way for a few images (see Images). The Atlas switch of this source is not available yet, and the window says so. To work from an atlas, unpack it first, as described at the end of this article.
Spine JSON#
Spine JSON reads a Spine skeleton, a .json file or a binary .skel. The summary shows how many bones, slots, skins, animations and constraints the file has. The options let you leave parts out: Import animations, Import skins, Import constraints and Import events, all on by default, Convert Bezier curves, and Replace existing. With Current project, the skeleton is added as an additional skeleton and does not mix into the one you have, so two characters that share the same rig names do not collide. With New project, the file is loaded as the project.
Images are not part of a Spine skeleton, so the attachments look for their files in the images folder. Put the images there, or point the project to the right folder, before you check the result.
Ligamen data#
Ligamen data takes bones, slots and skins from another .ligamen project, which is how you reuse a part of one character in another, such as a weapon or a set of clothes. Merge adds the incoming data to what is there, and Replace replaces it. On name conflict decides what happens when something with the same name already exists: Rename keeps both, Skip keeps the existing one and Overwrite takes the incoming one. A project that was saved by an earlier release of the editor, under its earlier name, can be imported in the same way.
Texture Unpacker#
File → Texture Unpacker… is the reverse of packing, described in Texture packing. It reads an atlas and writes every region back as its own PNG in a folder that you choose. It restores the size of each image, puts the pixels back on a transparent canvas of the original size, so that stripped whitespace comes back, undoes the rotation that the packer applied, and converts premultiplied pages back. It does not change the open project. Import the result with the Images source afterwards.