1
1
Fork
You've already forked DeltaPaint
0
Fully keyboard-driven pixelart software, intended for voice-driven art
Lua 99%
GLSL 1%
2024年12月29日 23:43:03 +00:00
api Remove grid mode, replacing it with a new grid target 2024年09月09日 19:58:01 -04:00
assets Change outline rendering to use shaders 2023年10月30日 20:11:06 -04:00
commands Switch undo/redo backend and support cursor pos / canvas size tracking 2024年12月05日 17:57:02 -05:00
lib Track modified state and block destructive actions when the image has unsaved modifs 2024年12月22日 19:07:05 -05:00
modes Continue code cleanup 2024年03月20日 11:50:43 -04:00
src Avoid backing up things that are already saved to disk 2024年12月29日 18:39:07 -05:00
targets Remove grid mode, replacing it with a new grid target 2024年09月09日 19:58:01 -04:00
util Assorted cleanup of globals and questionable functions 2024年03月14日 21:03:58 -04:00
.gitmodules Switch undo/redo backend and support cursor pos / canvas size tracking 2024年12月05日 17:57:02 -05:00
.luacheckrc Continue code cleanup 2024年03月20日 11:50:43 -04:00
conf.lua Remove grid mode, replacing it with a new grid target 2024年09月09日 19:58:01 -04:00
defaultConfig.lua Add autosave & backup/restore after crash 2024年12月29日 10:30:08 -05:00
KDPScreenshot.png Add files via upload 2021年10月17日 22:14:31 +00:00
LICENSE.txt Added licence (MIT) 2022年12月08日 00:45:03 +00:00
main.lua Add autosave & backup/restore after crash 2024年12月29日 10:30:08 -05:00
README.md Remove grid mode, replacing it with a new grid target 2024年09月09日 19:58:01 -04:00

DeltaPaint

This is a fork of KDP, the keyboard driven pixel art editor. The goal of this fork is to continue development and steer it in the direction of accessibility.

screenshot

Why?

As a bit of an experiment. When I'm coding, I use vscode with a vim emulator extension, or occasionally just vim. So my programming workflow is almost entirely keyboard driven. I was curious if such an approach might work for pixel art. Curiously there's not a whole lot of keyboard driven pixel art editors out there so i had to make my own.

This was the original author's intent, but I ran into KDP at a time in my life when I was unable to draw due to wrist health issues. I realized that as backwards as it sounds to an artist, a fully keyboard-driven art tool would be perfect for "painting by voice". The goal of this fork is to try and further unlock that potential for the sake of any artists suffering as I have.

How does it work?

DeltaPaint is operated similarly to vim. This implies a learning curve, but allows the user to dictate actions in a way that mimics regular (English) grammar.

Motions and Targets

Moving the cursor in DeltaPaint is performed by inputting targets. Targets used both for movement and a number of actions, allowing a single command to operate at a specific location or within a specific area.

Some targets also accept a magnitude. When entering a target starting with Δ, you can optionally input any number to adjust the magnitude of the target. If you don't, the magnitude is 1.

By default, the following targets are available:

  • , - The cursor's location. Useless for moving, but allows commands that expect a target to execute at the cursor's location. (eg. d , translates to "draw under the cursor")
  • Δ <arrow keys> - Δ pixels away from the cursor in the specified direction
  • Δ <shift> <arrow keys> - Δ ×ばつ jump length pixels away from the cursor in the specified direction. By default, the jump length is 10, but you can adjust with with the settings.jump_length setting
  • Δ <numpad +> <numpad +> - Δ pixels down-right from the cursor
  • Δ <numpad -> <numpad -> - Δ pixels up-left from the cursor
  • Δ <numpad -> <numpad +> - Δ pixels down-left from the cursor
  • Δ <numpad +> <numpad -> - Δ pixels up-right from the cursor
  • Δ <shift> <numpad +> <numpad +> - Δ ×ばつ jump length pixels down-right from the cursor
  • Δ <shift> <numpad -> <numpad -> - Δ ×ばつ jump length pixels up-left from the cursor
  • Δ <shift> <numpad -> <numpad +> - Δ ×ばつ jump length pixels down-left from the cursor
  • Δ <shift> <numpad +> <numpad -> - Δ ×ばつ jump length pixels up-right from the cursor
  • Δ i <column> <row> - Targets a location relative to the cursor on a grid, using character inputs similar to chess notation. Pressing i will display the grid and letters along the rows and columns. By inputting a pair of letters, you can target arbitrary positions near the cursor. Δ adjusts the resolution of the grid (eg. 1 means rows/columns are adjacent pixels, 2 is every other pixel, 3 every 3rd, etc), allowing you to target more distant locations at the cost of precision

Currently, new targets cannot be created and existing ones can't be rebound. This is planned for future development.

Actions

Editor commands can be bound to a particular sequence of keys, which we refer to as actions. Some of these actions are available at all times, while others are mode-specific. This means that key inputs can call different actions in different modes as needed. In this section, actions that take target inputs represent the target as .

You can repeat any action input by typing the number of times to repeat it first. For instance, 5 d ↑ calls d ↑ 5 times in a row. In some cases (such as the one that was just given), the actual result may be identical to the equivalent target magnitude. 5 d ↑ and d 5 ↑ are generally going to have the same result. On the other hand, 5 t ↑ does not produce the same result as t 5 ↑

By default, the following keybound actions are available in at all times:

  • f1 - Toggles the pixel grid
  • f2 - Toggles fullscreen mode
  • z ↑ - Zooms the view in one level
  • z ↓ - Zooms the view out one level
  • <ctrl> ⊙ - Move the color selection in the palette to
  • u Undo the last change
  • y Redo the last undone change
  • b Discard colors from the brush's copied content, turning it into a shape that can be drawn in any color
  • <ctrl> b Reset the brush shape to default

By default, the following keybound actions are available in draw mode:

  • d ⊙ - Draw a line from the cursor position to , moving the cursor to as well. This line includes the current cursor position
  • x ⊙ - Erase all pixels in a line from the cursor position to , moving the cursor to as well. This line includes the current cursor position
  • t ⊙ - Change the selected palette color to the color at
  • f - Fill all connected pixels of the same color, starting from the cursor
  • r - Replace all pixels matching the color beneath the cursor
  • s - Switch to select mode. Select mode selects a rectangular region between the cursor and the location the selection started in

By default, the following keybound actions are available in select mode:

  • d - Draw the outline of the selected region (specifically the pixels inside the region that are next to its edge)
  • f - Fill all pixels within the selected region with the current color
  • escape - Switch back to draw mode
  • g - Copy the selection to the brush
  • <ctrl> g - Cut the selection to the brush

Commands

More actions are performed using the built-in command prompt, which can be opened/closed with tab. Here are the commands available by default:

  • new [width] [height] - Creates a new image with the specified dimensions. If only width is provided, it will be used for height as well. If neither are provided, DeltaPaint will use the default width & height settings.
    • new - Creates a new image
    • new 16 - Creates a new 16x16 image
    • new 16 32 - Creates a new 16x32 image
  • resize [width] [height] - Resizes the current canvas, without scaling the current image and cropping if necessary. If only width is provided, it will be used for height as well.
    • resize 16 - Resizes the canvas to 16x16
    • resize 16 32 - Resizes the canvas to 16x32
  • save [filename] - Saves your image to the given file. If filename is not specified and you previously save or loaded this image, it will save to the same file. This command will always prompt you before overwriting an existing image.
    • save brick - Saves to "brick.png" in the default save folder
    • save brick with spaces - Saves to "brick with spaces.png" in the default save folder
    • save /home/myUsername/Pictures/brick.png - Saves to the exact file specified
  • load [filename] - Loads an image, replacing your current canvas (be careful, you can't undo this).
    • load brick - Loads "brick.png" from the default save folder
    • load /home/myUsername/Pictures/brick.png - Loads the exact file specified
  • loadpalette [filename] - Loads a new palette, replacing the current palette (but not the colors in the image).
    • loadPalette myColors - Loads "myColors.png" as a palette from the default palettes folder.
    • loadPalette /home/myUsername/Pictures/palettes/myColors.png - Loads the exact file specified as a palette
  • selectpaletteindex [color] - Selects the specified color index in the current palette
    • selectPaletteindex 1 - Selects the 1st color
    • selectPaletteindex 24 - Selects the 24th color
  • grayscale - Desaturates your canvas, replacing all colors with corresponding shades of grey
  • `opendatadir - Opens DeltaPaint's data directory in the file browser.

Configuration

DeltaPaint is designed to be highly customizable from the ground up. You can change any of the UI colors, keyboard shortcuts & other settings in the config.lua file which is generated on first run. Please note that at the moment the config file is a disorganized mess. That's because internally, the contents of the config file are stored in a key-value pair table, and lua doesn't iterate over them in any particular order when writing to a file.

Color palettes

DeltaPaint can load and use color palettes from images as long as they're at an 1x scale, such as any palettes on lospec. To load a palette from DeltaPaint's palettes folder, use the loadPalette your_palette command. You can also change the default palette using the palette.default setting in config.lua.