Skip to content

Commit 5ccba07

Browse files
committed
try this?
1 parent 2523802 commit 5ccba07

File tree

4 files changed

+1269
-1198
lines changed

4 files changed

+1269
-1198
lines changed

README.md

Lines changed: 87 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,87 @@
1-
> [!NOTE]
2-
> This project has been taken under stewardship of the SS13 org to provide updates and allow for community support, as the original creator [is no longer maintaining it](https://github.com/Seefaaa/aseprite-dmi).
3-
4-
# DMI Editor for Aseprite
5-
6-
This project is a DMI (BYOND's Dream Maker icon files) editor extension for Aseprite, a popular pixel art tool. It is written in Rust and Lua and aims to enhance the Aseprite experience by providing tools for editing and managing DMI files.
7-
8-
## Download
9-
10-
The latest version of this extension is available for download from the [Releases](https://github.com/spacestation13/aseprite-dmi/releases) page on the project's GitHub repository.
11-
12-
The plugin will also prompt you to download an update when a new version is released.
13-
14-
## Usage
15-
16-
Once the project has been downloaded or built, the extension can be added to Aseprite by dragging and dropping it into the application or by selecting the 'Add Extension' button in the 'Edit > Preferences > Extensions' menu.
17-
18-
DMI files can now be opened in Aseprite in the same way as any other file format. You will need to change the open file dialog filter to 'All Files'.
19-
20-
### Creating New Files
21-
22-
New files can be created via the following pathway: `File > DMI Editor > New DMI File`.
23-
24-
### Changing Iconstate Properties
25-
26-
The state properties, including the state name, can be modified by right clicking on the state or by clicking on the text below the state in the editor.
27-
28-
### Copy and Paste
29-
30-
Right-clicking on the state will bring up the context menu. The context menu allows the user to copy the state to the clipboard, which can then be pasted at a later stage. Right click on an empty space within the editor to paste the copied state. The states are copied in the JSON format, with PNG images, which are base64-encoded, included for the frames.
31-
32-
### Frames and Delays
33-
34-
In Aseprite's timeline, new frames can be added and delays between frames can be modified.
35-
36-
### Expand, Resize, Crop
37-
38-
The DMI file may be expanded, resized, or cropped via the `File > DMI Editor` menu. It should be noted that the active sprite must be a DMI iconstate in order to utilise these commands.
39-
40-
### Plugin Preferences
41-
Under the `File > DMI Editor` menu, there is an `Preferences` menu which contains various options:
42-
43-
- **Auto Overwrite**: Automatically overwrites the source DMI file when saving an iconstate.
44-
- **Auto Flatten** *(Enabled by Default)*: Automatically flattens layers downward into directional layers when saving an iconstate, allowing you to fully use Aseprite layers.
45-
46-
## Building the Project
47-
48-
### Requirements
49-
50-
- [Rust](https://www.rust-lang.org/)
51-
- [Python](https://www.python.org/) (build script)
52-
53-
To build the project, run `tools/build.py` Python script.
54-
55-
### Releasing
56-
57-
Push a tag like `v1.0.8` via `git`, after changing the Cargo.toml and package.json files.
58-
59-
## LICENSE
60-
61-
**GPLv3**, for more details see the [LICENSE](./LICENSE).
62-
63-
Originally created by [Seefaaa](https://github.com/Seefaaa) at https://github.com/Seefaaa/aseprite-dmi.
1+
> [!NOTE]
2+
> This project has been taken under stewardship of the SS13 org to provide updates and allow for community support, as the original creator [is no longer maintaining it](https://github.com/Seefaaa/aseprite-dmi).
3+
4+
# DMI Editor for Aseprite
5+
6+
This project is a DMI (BYOND's Dream Maker icon files) editor extension for Aseprite, a popular pixel art tool. It is written in Rust and Lua and aims to enhance the Aseprite experience by providing tools for editing and managing DMI files.
7+
8+
## Download
9+
10+
The latest version of this extension is available for download from the [Releases](https://github.com/spacestation13/aseprite-dmi/releases) page on the project's GitHub repository.
11+
12+
The plugin will also prompt you to download an update when a new version is released.
13+
14+
### Additional Instructions for Linux and macOS
15+
16+
To use this project, you need to have Lua 5.4 installed on your system.
17+
18+
#### Linux
19+
20+
For Debian-based distributions, you can install Lua 5.4 using the following command:
21+
22+
```sh
23+
apt install lua5.4
24+
```
25+
26+
Otherwise, follow the relevant instructions for your distribution to install Lua 5.4.
27+
28+
#### macOS
29+
30+
For macOS, you can install Lua 5.4 using Homebrew. First, ensure you have Homebrew installed, then run:
31+
32+
```sh
33+
brew install lua
34+
```
35+
36+
Make sure Lua 5.4 is correctly installed by running `lua -v` in your terminal, which should display the version information.
37+
38+
## Usage
39+
40+
Once the project has been downloaded or built, the extension can be added to Aseprite by dragging and dropping it into the application or by selecting the 'Add Extension' button in the 'Edit > Preferences > Extensions' menu.
41+
42+
DMI files can now be opened in Aseprite in the same way as any other file format. You will need to change the open file dialog filter to 'All Files'.
43+
44+
### Creating New Files
45+
46+
New files can be created via the following pathway: `File > DMI Editor > New DMI File`.
47+
48+
### Changing Iconstate Properties
49+
50+
The state properties, including the state name, can be modified by right clicking on the state or by clicking on the text below the state in the editor.
51+
52+
### Copy and Paste
53+
54+
Right-clicking on the state will bring up the context menu. The context menu allows the user to copy the state to the clipboard, which can then be pasted at a later stage. Right click on an empty space within the editor to paste the copied state. The states are copied in the JSON format, with PNG images, which are base64-encoded, included for the frames.
55+
56+
### Frames and Delays
57+
58+
In Aseprite's timeline, new frames can be added and delays between frames can be modified.
59+
60+
### Expand, Resize, Crop
61+
62+
The DMI file may be expanded, resized, or cropped via the `File > DMI Editor` menu. It should be noted that the active sprite must be a DMI iconstate in order to utilise these commands.
63+
64+
### Plugin Preferences
65+
Under the `File > DMI Editor` menu, there is an `Preferences` menu which contains various options:
66+
67+
- **Auto Overwrite**: Automatically overwrites the source DMI file when saving an iconstate.
68+
- **Auto Flatten** *(Enabled by Default)*: Automatically flattens layers downward into directional layers when saving an iconstate, allowing you to fully use Aseprite layers.
69+
70+
## Building the Project
71+
72+
### Requirements
73+
74+
- [Rust](https://www.rust-lang.org/)
75+
- [Python](https://www.python.org/) (build script)
76+
77+
To build the project, run `tools/build.py` Python script.
78+
79+
### Releasing
80+
81+
Push a tag like `v1.0.8` via `git`, after changing the Cargo.toml and package.json files.
82+
83+
## LICENSE
84+
85+
**GPLv3**, for more details see the [LICENSE](./LICENSE).
86+
87+
Originally created by [Seefaaa](https://github.com/Seefaaa) at https://github.com/Seefaaa/aseprite-dmi.

scripts/constants.lua

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
1-
------------------- CONSTANTS -------------------
2-
3-
DIRECTION_NAMES = { "South", "North", "East", "West", "Southeast", "Southwest", "Northeast", "Northwest" }
4-
DIALOG_NAME = "DMI Editor"
5-
TEMP_NAME = "aseprite-dmi"
6-
LUA_LIB = app.fs.pathSeparator ~= "/" and "lua54" or nil
7-
DMI_LIB = app.fs.pathSeparator ~= "/" and "dmi" or "libdmi"
8-
TEMP_DIR = app.fs.joinPath(app.fs.tempPath, TEMP_NAME)
9-
10-
COMMON_STATE = {
11-
normal = { part = "sunken_normal", color = "button_normal_text" },
12-
hot = { part = "sunken_focused", color = "button_hot_text" },
13-
} --[[@as WidgetState]]
1+
------------------- CONSTANTS -------------------
2+
3+
DIRECTION_NAMES = { "South", "North", "East", "West", "Southeast", "Southwest", "Northeast", "Northwest" }
4+
DIALOG_NAME = "DMI Editor"
5+
TEMP_NAME = "aseprite-dmi"
6+
7+
-- OS-specific library extensions and names
8+
local function get_lib_info()
9+
if app.os.windows then
10+
return "lua54", "dmi"
11+
elseif app.os.macos then
12+
return "lua54", "libdmi.dylib"
13+
else -- Linux
14+
return "lua5.4", "libdmi.so"
15+
end
16+
end
17+
18+
LUA_LIB, DMI_LIB = get_lib_info()
19+
20+
TEMP_DIR = app.fs.joinPath(app.fs.tempPath, TEMP_NAME)
21+
22+
COMMON_STATE = {
23+
normal = { part = "sunken_normal", color = "button_normal_text" },
24+
hot = { part = "sunken_focused", color = "button_hot_text" },
25+
} --[[@as WidgetState]]

0 commit comments

Comments
 (0)