1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00
Commit graph

2007 commits

Author SHA1 Message Date
Emmanouil Papadeas 0873a7bf70 Make the tiles panel immediately visible when loading a project at startup that only has tilemap layers 2024-12-09 00:17:24 +02:00
Emmanouil Papadeas 0d2b579afe Don't export the first frame twice when using ping pong loop 2024-12-08 15:40:03 +02:00
Emmanouil Papadeas 9c628c403b Fix stack tile editing mode not increasing the tile's times_used variable 2024-12-07 17:01:56 +02:00
Emmanouil Papadeas d41037d2df Fix tilemap manual editing mode not working with shape & text tools, and fixed issues with the pencil tool
Not the most performance-friendly solution, but it works. If users encounter performance issues in the future, we should rewrite this, as it does the same for loop two times.
2024-12-06 18:06:23 +02:00
Emmanouil Papadeas 65e907e1d2 Do not add an empty tile in the tilesets when loading a pxo file 2024-12-06 15:19:19 +02:00
Emmanouil Papadeas e5c7d46997 Fix crash when saving a loaded pxo file that has tilesets 2024-12-06 15:16:01 +02:00
Emmanouil Papadeas b7c34f4233 Fix pencil/eraser/shading previews turning white for a brief moment when changing image brushes 2024-12-06 04:11:05 +02:00
Emmanouil Papadeas 1ea80a342a Fix some unintentional behaviors with tilemap layer tile editing modes 2024-12-06 04:03:57 +02:00
Emmanouil Papadeas f91bb18fb2
Implement tilemap layers (#1146) 2024-12-05 03:57:44 +02:00
Emmanouil Papadeas b48bb4a094 Fix moving selections with arrow keys moving two pixels instead of one 2024-12-04 01:19:45 +02:00
Variable ff5713ae91
When picking color, ensure that the correct index is selected in palette (#1144)
* When picking color, ensure that the correct index is selected

* if drawing over same color in index mode, check and update index as well

* revert an optimization (croping indices image before display)

* typo
2024-12-02 19:44:52 +02:00
Spencer Beckwith 55f83a3367
Extract export path from output CLI option (#1145) 2024-12-01 16:47:16 +02:00
Emmanouil Papadeas c72a1f4b90 Enable always on top for the child dialogs of the export dialog 2024-11-30 22:23:09 +02:00
Emmanouil Papadeas be8b7728e4 [skip ci] Fix typo in ImageExtended docstrings 2024-11-29 20:19:19 +02:00
Variable 31981a1def
Added a way to see index of color (plus bugfixes) (#1143)
* add a way to see indices

* fix some things

* Fixed more than one swatch selected if there is the same color available in an earlier swatch

* fixed wrong index drawn when moved to an smpty swatch

* make active_button public

* fixed wrong color getting stored in   array (similar fix to #1108.)

* If the color selected in the palette is the same then it should take prioity.

* formatting

* hide 0 index
2024-11-29 19:10:02 +02:00
Variable 7f4c7a6bf1
Grid patch (#1142)
* fix second grid not *shown* removed when first grid has default values.

* Make next added grid twice the previous size, and with a different color

* Formatting
2024-11-28 22:02:13 +02:00
HuanWuCode 41ea287df4
Update Import.gd (#1121) 2024-11-27 17:01:00 +02:00
Variable 6224d06428
Allow multiple Grids (#1122)
* Allow upto 10 grids

* Fixed more stuff

* fixed a bug

* formatting

* removed some left over stuff

* linting

* formatting and a bugfix
2024-11-25 15:57:13 +02:00
Variable fe6efb0f1d
fixed recorder label not updating when project is changed (#1139) 2024-11-24 14:37:02 +02:00
Emmanouil Papadeas 8b1367494d Ensure that the swatches get deleted when the user removes all palettes 2024-11-23 17:54:28 +02:00
Emmanouil Papadeas 01b55aca07 Fix crash when using indexed mode without a palette 2024-11-23 14:17:41 +02:00
Emmanouil Papadeas 5f53a3eb7b Fix crash when Pixelorama starts without a palette 2024-11-23 14:17:27 +02:00
Emmanouil Papadeas 658477ed4b Sort system font names by alphabetical order 2024-11-23 01:21:22 +02:00
Emmanouil Papadeas 3fb8484ac5 Use Control + mouse wheel to increase the size of the text tool 2024-11-23 01:00:49 +02:00
Emmanouil Papadeas 0484b1012f Fix Delete button and fill selection mode of the bucket tool not working with indexed mode 2024-11-23 00:58:34 +02:00
Emmanouil Papadeas b87a8e2ab8 Fix cel copying not working with indexed mode 2024-11-22 21:00:38 +02:00
Emmanouil Papadeas e6c4a72158 Fix crash when using indexed mode and the palette has empty swatches between colors 2024-11-22 20:47:38 +02:00
Emmanouil Papadeas 1dcb696c35 Use texelFetch instead of texture for indexed mode shaders
Fixes various weird issues when palettes have empty slots, and removes unnecessary calculations.
2024-11-22 20:47:05 +02:00
Emmanouil Papadeas d580523c6e Revert "Slightly optimize IndexedToRGB.gdshader"
This reverts commit 7cf87ac142.
2024-11-22 18:29:27 +02:00
Emmanouil Papadeas 11da07b9ac Hide the color mode submenu when selecting an item 2024-11-22 18:02:36 +02:00
Emmanouil Papadeas 7cf87ac142 Slightly optimize IndexedToRGB.gdshader
Multiply the index by 255.0 only once, instead of dividing and multiplying it again
2024-11-22 18:01:29 +02:00
Emmanouil Papadeas bd7d3b19cc Add a crop_image boolean parameter to Palette.convert_to_image()
Fixes some issues with the Palettize effect where the output would be different if the palette size changed and empty swatches were added, even if the colors themselves stayed the same.
2024-11-22 17:56:39 +02:00
Emmanouil Papadeas 996a234d0d Call Palettes.current_palette_set_color() immediately when changing the color of a swatch 2024-11-22 15:26:30 +02:00
Emmanouil Papadeas 77f6bcf07b Fix Palette.convert_to_image() storing wrong colors in the image
Similar fix to #1108.
2024-11-22 15:07:16 +02:00
Emmanouil Papadeas fede2d8e6f Fix undo/redo not working if the cursor is over the timeline 2024-11-22 02:56:57 +02:00
Emmanouil Papadeas d0ecf3b03d Center diagonal symmetry guides when initializing a new project
The guides appear centered, but the symmetry itself is not working properly yet
2024-11-21 16:33:19 +02:00
Emmanouil Papadeas 3d65e48c92 Add backend for diagonal mirror buttons
The buttons are not yet visible
2024-11-21 12:48:52 +02:00
Emmanouil Papadeas aa1731b701 Initial work on diagonal symmetry guides
Still no buttons yet, and they cannot be moved yet.
2024-11-21 04:00:40 +02:00
Emmanouil Papadeas 558140b309 Add partial logic for diagonal mirroring
Still WIP, no buttons and guides exposed yet.
2024-11-21 03:25:41 +02:00
Emmanouil Papadeas 849b815562 Further simplify mirror_array() 2024-11-21 02:21:11 +02:00
Emmanouil Papadeas 3615ce087c Reduce duplicated code by calling mirror_array by tools less times 2024-11-21 02:15:50 +02:00
Emmanouil Papadeas 2d28136449
Implement indexed mode (#1136)
* Create a custom PixeloramaImage class, initial support for indexed mode

* Convert opened projects and images to indexed mode

* Use shaders for RGB to Indexed conversion and vice versa

* Add `is_indexed` variable in PixeloramaImage

* Basic undo/redo support for indexed mode when drawing

* Make image effects respect indexed mode

* Move code from image effects to ShaderImageEffect instead

* Bucket tool works with indexed mode

* Move and selection tools works with indexed mode

* Brushes respect indexed mode

* Add color_mode variable and some helper methods in Project

Replace hard-coded cases of Image.FORMAT_RGBA8 with `Project.get_image_format()` just in case we want to add more formats in the future

* Add a helper new_empty_image() method to Project

* Set new images to indexed if the project is indexed

* Change color modes from the Image menu

* Fix open image to replace cel

* Load/save indices in pxo files

* Merging layers works with indexed mode

* Layer effects respect indexed mode

* Add an `other_image` parameter to `PixeloramaImage.add_data_to_dictionary()`

* Scale image works with indexed mode

* Resizing works with indexed mode

* Fix non-shader rotation not working with indexed mode

* Minor refactor of PixeloramaImage's set_pixelv_custom()

* Make the text tool work with indexed mode

* Remove print from PixeloramaImage

* Rename "PixeloramaImage" to "ImageExtended"

* Add docstrings in ImageExtended

* Set color mode from the create new image dialog

* Update Translations.pot

* Show the color mode in the project properties dialog
2024-11-20 14:41:37 +02:00
Emmanouil Papadeas 428e5edb8f
Add a text tool (#1134)
* Initial port of the text tool to Godot 4

* Change font (WIP)

* Add antialiasing option and remove some old unneeded lines

* Remove outline code

* Add horizontal alignment and update the text edit font size

* Improve the text edit

* Don't activate tools while typing

* Format

* Give input priority to the text edit so the key X and shortcuts such as control-z work in the text edit

* Add style settings for bold and italic

* Fix text going blank when changing font

* Use `font.draw_multiline_string()`

* Change the move behavior of the text tool, add confirm and cancel buttons

* Compress images on undo/redo

* Fix text position
2024-11-19 01:20:34 +02:00
Emmanouil Papadeas dd8bf5cc1b Release v1.0.5 2024-11-18 17:53:53 +02:00
Emmanouil Papadeas e2b6262560 Update translators in AboutDialog 2024-11-18 17:50:19 +02:00
Emmanouil Papadeas 763783f2f1 Improve the UI of the tile mode offsets dialog and add an Isometric button 2024-11-15 17:59:57 +02:00
Emmanouil Papadeas e10b0d1b08 Fix crash when opening the tile mode offsets dialog 2024-11-15 17:59:25 +02:00
Emmanouil Papadeas 0d6b140dea Add border selection, fix some missing translation strings 2024-11-15 01:41:44 +02:00
Emmanouil Papadeas dec698024c Implement selection expanding and shrinking via the Select menu 2024-11-14 17:59:53 +02:00
Emmanouil Papadeas 785d8cfc83 Hide the density slider by default
So that it doesn't appear in the shape tools, where it has no effect.
2024-11-14 16:22:53 +02:00
Emmanouil Papadeas 4c7d7da5e7 Fix regression where pressing Enter or Control would not confirm/cancel selection when a selection tool wasn't active 2024-11-14 01:39:41 +02:00
Emmanouil Papadeas 36329efaf6 Add density to the square & circle brushes
00% density means that the brush gets completely drawn, anything less leaves gaps inside the brush, acting like a spray tool.
2024-11-14 01:02:51 +02:00
Emmanouil Papadeas 7c1435e95f When using the mouse wheel over a slider, don't scroll in ScrollContainers 2024-11-13 17:32:01 +02:00
Emmanouil Papadeas ad77d98f42 Slightly optimize circle brushes by only calling the DrawingAlgos methods once while drawing
They keep getting called when size dynamics are enabled, however.
2024-11-13 02:55:15 +02:00
Emmanouil Papadeas 2600180736 Remove the Recorder from the Web version
It's not working anyway, and I'm not sure if there is a way to make it work, at least with a good and user-friendly way. If we find a way we could re-add it in the future.
2024-11-13 00:40:58 +02:00
Emmanouil Papadeas ce738f02c2 Don't change brush size when resizing the timeline cels and the palette swatches 2024-11-12 00:59:01 +02:00
Emmanouil Papadeas b0b1361722 Fix layer effect slider values being rounded to the nearest integer 2024-11-12 00:47:53 +02:00
Variable 5fa97988b5
Fixed unexpected behavior of resize_selection() (#1132)
* Fixed unexpected behavior of resize_selection()

* Fix typo

---------

Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2024-11-10 23:12:09 +02:00
Variable af703d486e
Add a way to get autoloads through the api (#1131)
* add autoloads to api

* A name Dilemma, There are 2 autoloads for ImportApi

* add docstring
2024-11-09 23:26:14 +02:00
Emmanouil Papadeas d2892358e3 Add a set_display_scale() method to Main to avoid duplicate code 2024-11-04 18:47:29 +02:00
Emmanouil Papadeas ec17e970e0 The Recorder panel now automatically records for the current project
Making its behavior more intuitive and consistent with the other panels. This also allows for multiple projects to be recorder at the same time, something that was not previous before. Changing projects now also changes the UI accordingly, depending on whether the current project is being recorded or not.

This change also fixes a memory leak, where either the first ever project or the last recorded one, stayed forever referenced in memory by the `project` variable.

Also fixed an issue where the recorder's settings size label was not showing the correct project size.
2024-11-03 18:54:08 +02:00
Emmanouil Papadeas 8beb79a33b Fix memory leak where the project remained referenced in BaseDraw even when its tab was closed
Another memory leak remains in Recorder.gd, where the first project forever remains referenced in memory, until the user changes the project from the option button. Perhaps we should remove that option button completely and always record the current project, that also sounds like the intended behavior to me.
2024-11-03 03:36:37 +02:00
Emmanouil Papadeas e2971a8fe9 Add UI buttons for confirming and cancelling a transformation
Needed especially for users without a keyboard.
2024-10-31 23:49:58 +02:00
Emmanouil Papadeas 6863adf957 Implement support for mouse buttons to be used as menu shortcuts - fixes #1070
Also maps the mouse thumb button 1 to undo, and the mouse thumb button 2 to redo.
2024-10-30 14:25:34 +02:00
Variable 2d9a582f21
Added an OKHSL Lightness sorting in palette (#1126)
* added a lightness sort system

* static check

* lightness

* formatting

* more formatting

* more formatting
2024-10-26 01:31:52 +03:00
Emmanouil Papadeas 6c31708e35 Release v1.0.4 2024-10-25 15:48:59 +03:00
Emmanouil Papadeas 638130c5c8 [skip ci] Update AboutDialog.gd 2024-10-25 12:02:26 +03:00
Emmanouil Papadeas 2d7d7e7c06 Allow greater values in the resize slider of the export dialog 2024-10-23 12:02:19 +03:00
Emmanouil Papadeas f42d361a42 Minor UI improvements for the mirroring buttons 2024-10-23 12:00:19 +03:00
Emmanouil Papadeas dd8d217dc3 Changes in formatting due to gdtoolkit's new update
https://github.com/Scony/godot-gdscript-toolkit/releases/tag/4.3.2
2024-10-22 15:54:59 +03:00
Emmanouil Papadeas 17d56bb432 Update tool child scenes to reflect the changes of #1105
Just to fix some warnings
2024-10-22 15:43:07 +03:00
Emmanouil Papadeas e2b54f70f7 Bump pxo file version to 4 to fix blend mode compatibility with older pxo files
The addition of the erase blend mode from #1117 resulted in loading pxo files from v1.0-v1.0.3 to have incorrect blend modes in their layers, if they are set to anything below normal, because the values of the `BaseLayer.BlendModes` enumerator changed.
2024-10-22 15:39:30 +03:00
Emmanouil Papadeas 370ae7525a Fix formatting and make unused docstrings to comments of the previous commit 2024-10-18 00:01:27 +03:00
Variable 2cb29ab274
somewhat fix transparency for floating window (#1116)
* somewhat fix transparency

* some formatting
2024-10-17 19:51:45 +03:00
Emmanouil Papadeas a64f5f3429 Make ExtensionsAPI version 5 backwards compatible with version 4
This means that extensions that use version 4 can work in version 5, but not necessarily vice versa. Therefore we don't need to show a warning message when loading version 4 extensions.

TODO: Find a better way to determine which API versions have backwards compatibility with each other.
2024-10-17 17:16:17 +03:00
Emmanouil Papadeas 203340b3a1 If the selected font index is out of bounds, fall back to Roboto 2024-10-17 16:58:15 +03:00
Emmanouil Papadeas fd714d04df Update the ExtensionsAPI to handle fonts 2024-10-17 16:52:42 +03:00
Emmanouil Papadeas 91f0b26245 Change the font of the interface from the properties 2024-10-17 14:41:43 +03:00
Emmanouil Papadeas 120bd9a7df Use American English spelling for "Center Canvas" to make it more consistent with the rest of the application 2024-10-17 13:46:18 +03:00
Emmanouil Papadeas c83680183b Minor changes in Shading.tscn 2024-10-17 13:08:43 +03:00
Emmanouil Papadeas 263e19f17a Add a tooltip of the "Share options between the left and the right tools" preference 2024-10-17 13:06:53 +03:00
Emmanouil Papadeas 4dc55e538e Fix issues when picking color with the bucket tool
1) The bucket tool now picks colors from the top-most layer, like the rest of the drawing tools.
2) Using the tool while moving the cursor and also holding the color picker shortcut (Alt by default), now picks colors instead of using the bucket tool.
2024-10-17 02:34:27 +03:00
Variable d894e9db86
Added Centre Canvas Option (#1123)
* add a centre frame option

* moved code to view menu

* restore left over stuff

* fix typo
2024-10-16 16:30:30 +03:00
Variable 3863cbaee7
Add a preference to share options between tools (#1120)
* Add share config button

* fill parameter now saves with curve tool

* rename _fill to _fill_inside for sync consistency (fill in pencil and shape tools basically represent the same thing)

* add icon

* Move the option to the preferences

* Add string to Translations.pot

* Re-introduce `is_syncing`

---------

Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2024-10-16 16:00:20 +03:00
Emmanouil Papadeas 1ae34bf57a Use an anchor and offset preset for the CollapsibleContainer's texture rect 2024-10-15 16:31:04 +03:00
Variable 4561c1fee4
improved rotate/flip brush UI (#1105)
* Update BaseDraw.tscn

* Update BaseDraw.gd

* Implemented proposed changed, Also added a VFlowContainer for Rotate options
2024-10-14 16:08:10 +03:00
Emmanouil Papadeas fe5ced8085 Set the backup confirmation dialog's popup_window to false 2024-10-14 15:55:48 +03:00
Emmanouil Papadeas 9899734090 Ensure that the preview clears when switching to a different tool 2024-10-13 14:22:01 +03:00
HuanWuCode a2e5d165cb
[skip ci] Update PerspectiveEditor.gd (#1119) 2024-10-13 14:03:52 +03:00
Variable c21e089e58
Add alpha erase blend mode (#1117)
* Add alpha erase blend mode

* implemented suggestions
2024-10-13 01:57:10 +03:00
Emmanouil Papadeas 1ed52903b3 Implement the ability to change the font of a 3D text
This code will also be useful for the text tool
2024-10-12 16:30:16 +03:00
Emmanouil Papadeas b52cdc6e7b Fix some text in the About dialog not having the text color of the theme 2024-10-12 15:44:06 +03:00
Emmanouil Papadeas be7d45205e Remove Roboto-Italic
Pixelorama now takes ~100KB less space
2024-10-12 15:36:46 +03:00
Emmanouil Papadeas 9fcb06aa72 Add a 3D text line spacing option 2024-10-12 14:31:15 +03:00
Emmanouil Papadeas bbf0ae8040 Add a 3D text depth option 2024-10-12 01:14:37 +03:00
Emmanouil Papadeas 970b24ec40 Fix 3DShapeEdit option values not updating when selecting 3D objects 2024-10-12 00:52:18 +03:00
Emmanouil Papadeas dcd93b4366 Remove Global.open_sprites_dialog and Global.save_sprites_dialog. 2024-10-11 17:12:55 +03:00
Emmanouil Papadeas ed5449bb66 Use an enum for the loop types in the timeline
I should have done that years ago. Literally. I don't know what took so long.
2024-10-11 16:42:11 +03:00
Emmanouil Papadeas b9bf8290b0 Remove Global.animation_timer 2024-10-11 16:38:35 +03:00
Emmanouil Papadeas dddcfed3c4 Add a new "CanvasRulers" node group for the canvas rulers 2024-10-11 16:31:18 +03:00