1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-24 06:23:13 +00:00
Commit graph

336 commits

Author SHA1 Message Date
Emmanouil Papadeas
c928b7622e Add a Gradient layer effect
Alongside its image effect equivalent.
2025-02-11 00:06:40 +02:00
Emmanouil Papadeas
64209c83b9 Add support for dither textures on ShaderLoader
Is not currently used anywhere.
2025-02-10 22:43:00 +02:00
Emmanouil Papadeas
5df01a9170 Users can now add custom dithering matrix images
Not exposed somewhere in the UI yet, but users can now add custom dithering pattern as images in "user://dither_matrices". Right now only used for gradient generation.
2025-02-10 20:15:45 +02:00
Emmanouil Papadeas
7902465cf1 Add user data for individual tiles 2025-02-10 03:03:29 +02:00
Emmanouil Papadeas
34ef0d4d15 Add tile properties window, allowing you to change each tile's probability
More options can be added there in the future. Perhaps we could even add Godot tileset data, once we add Godot tileset exporting.
2025-02-09 03:34:10 +02:00
Emmanouil Papadeas
96d0efe3ba Organize image and layer effects into subcategories
The amount of image/layer effects keeps getting bigger and bigger, especially now that users can load their own effects.

At some point, it might also be a good idea to refactor the code so that image and layer effect code combines. Image effects could use ShaderLoader.gd to generate their UI, like layer effects do.
2025-01-31 00:14:54 +02:00
Emmanouil Papadeas
4b3f37a115 Fix orphan node memory leak and format/lint previous commit 2025-01-30 17:24:56 +02:00
Emmanouil Papadeas
722eb59b3a Group all of the color channel curves of the color curves layer effect
Making it consistent with its image effect counterpart. The code inside ShaderLoader.gd keeps getting uglier and uglier, it might be worth a refactor at some point.
2025-01-30 17:05:32 +02:00
Emmanouil Papadeas
5e2901971b Make RGBA bool uniforms in invert and desaturate buttons instead of checkboxes in layer effects
They are now consistent with their image effect counterparts.
2025-01-29 21:51:55 +02:00
Emmanouil Papadeas
0db7cd99f6 Show a menu when right clicking on a tile button in the tiles panel to allow deleting it
Only unused tiles can be deleted
2025-01-29 19:15:18 +02:00
Emmanouil Papadeas
055e4e1cb9 Fix group layer blending not working properly when it has invisible children
Should completely fix #1166
2025-01-29 16:57:11 +02:00
Emmanouil Papadeas
87b9df8049 Fix group layers blending twice in Canvas.update_texture() when their blend mode is set to passthrough
This solves a part of #1166
2025-01-29 16:45:33 +02:00
Emmanouil Papadeas
71200309f2 Add an icon in the layer buttons for layers that contain effects 2025-01-23 00:04:17 +02:00
Emmanouil Papadeas
a8c41312f8 [Experimental] Expose selection rotation gizmo
It's not working perfectly yet so it's possible it may get unexposed in the stable version if many issues are found, especially if it causes regressions to selection moving & resizing. Needs testing.
2025-01-21 03:40:43 +02:00
Emmanouil Papadeas
48130809c9 Update ObjParse.gd
Updated to c3156e2105/obj-parse/ObjParse.gd. Should fix #1165.
2025-01-16 20:17:21 +02:00
Emmanouil Papadeas
c60c62f476 Fix tileset being completely cleared when resizing a project
Now only remove the tiles that are used so they can be remade as resized tiles. Unused tiles remain in the tileset as is.
2024-12-27 03:30:56 +02:00
Emmanouil Papadeas
d4c3ae3dc6 Change PXO_frame and PXO_layer to PXO_frame_index and PXO_layer_index 2024-12-21 00:31:51 +02:00
Emmanouil Papadeas
80e93629d1 Add PXO_frame and PXO_layer as special loaded shader uniforms 2024-12-17 19:36:01 +02:00
Emmanouil Papadeas
5a17117d59 Improve support for visual shader loading
ShaderLoader now gets the VisualShaderNodeTextures of the VisualShader into account, allowing for visual shaders that are being loaded to have default textures.
2024-12-17 18:11:36 +02:00
Emmanouil Papadeas
3edb37168c Fix issues with the noise generator node
Its nodes now get updated when changing the noise texture, and it waits for `noise_texture.changed` to emit before emitting the `value_changed` signal. See https://docs.godotengine.org/en/stable/classes/class_noisetexture2d.html for the explanation.
2024-12-17 13:38:18 +02:00
Emmanouil Papadeas
0f53fc32fe Start working on a noise generator node
Used for shaders that need noise textures.

Still WIP. needs the nodes to set their appropriate values when setting a noise texture. Which means I'll probably have to re-write the whole thing, yay :D
2024-12-17 03:21:23 +02:00
Emmanouil Papadeas
2d81bd495a Move value and basis slider files into a folder 2024-12-17 01:04:56 +02:00
Emmanouil Papadeas
11ae7c007b Implement support for elapsed time in loaded shaders for layer effects
Simply add `uniform float PXO_time;` in the shader's uniforms, and replace all instances of `TIME` with `PXO_time`. This will make the shader animate per frame.
2024-12-17 00:53:58 +02:00
Emmanouil Papadeas
39c85c3079 Implement the ability to load custom shaders and image and layer effects
Finally expose the feature of importing custom shaders as image effects, and implement custom shader loading for layer effects as well. To load a shader, drag and drop a .gdshader file into Pixelorama and it will get copied into `user://shaders`. Then, in the Effects menu, a new "Loaded" submenu will appear, and the new shaders will also be available in the layer effects dialog. Since they are stored on a persistent location, the shaders will also be available on the next times Pixelorama will launch as well.
2024-12-16 01:18:56 +02:00
Emmanouil Papadeas
93eab6929b For PixelCel's set_content not working when passing an Image instead of ImageExtended 2024-12-15 21:05:10 +02:00
Emmanouil Papadeas
1d9b9fda1e Add color curves layer effect 2024-12-15 21:04:32 +02:00
Emmanouil Papadeas
18e9e2ec56
Implement audio layers (#1149)
* Initial work on audio layers

* Load ogg audio files

* Fix playback position

* Support mp3 files

* Play audio at the appropriate position when the animation runs, and stop when the pause button is pressed

* Change audio cel textures for the cels where audio is playing

* Fix audio not playing at the appropriate position

* Don't play audio is layer is invisible

* Set the audio layer names to be the imported audio file names

* Import audio from videos

* Export videos with audio

Only works with mp3 for now

* Remove support for ogg audio files as they cannot be saved

At least until I find a way to save them. Wav files will be supported with Godot 4.4

* Fix adding/removing in-between frames breaking the visual indication of audio cels

* Minor code improvements

* Export audio in videos with custom delay

* Support frame delay

* Change the frame where the audio plays at

* Fix crashes when the audio layer has no track

* Remove unneeded cel properties for audio cels

* Pxo loading/saving

* Load audio files from the audio layer properties

* Change the audio driver to Dummy from the Preferences for performance reasons

* Clone audio layers, disable layer merge and FX buttons when an audio layer is selected

* Easily change the playback frame of an audio layer from the right click menu of cel buttons

* Update Translations.pot

* Some code improvements and documentation

* Stop audio from playing when looping, and the audio does not play at the first frame

* Update audio cel buttons when changing the audio of the layer

* Mute audio layer when hiding it mid-play

* Only plays the portion of the sound that corresponds to the specific frame so maybe we should do that as well

When the animation is not running. If it is running, play the sound properly.

* Some code changes to allow for potential negative frames placement for audio

This woud allow audio to be placed in negative frames, which essentially means that audio would start before the first frame. This is not yet supported, however, because I don't know how to make it work with FFMPEG.
2024-12-14 00:30:04 +02:00
Emmanouil Papadeas
11e05ac471 Fix loading project with linked cels
Regression from #1146.
2024-12-09 16:30:53 +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
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
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
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
Emmanouil Papadeas
01b55aca07 Fix crash when using indexed mode without a palette 2024-11-23 14:17:41 +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
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
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
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
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
b0b1361722 Fix layer effect slider values being rounded to the nearest integer 2024-11-12 00:47:53 +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