1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 01:29:49 +00:00
Commit graph

1881 commits

Author SHA1 Message Date
Emmanouil Papadeas a4f06d8cbe Fix 3D layer buttons not having the same offset as the other layer type buttons 2024-04-10 01:25:57 +03:00
Emmanouil Papadeas 1c9c8bf4e3 Add Palettize and Pixelize effects
Pixelize makes the image pixelated, and Palettize maps the color of the input to the nearest color in the selected palette. Useful for limiting color in pixel art and for artistic effects.
2024-04-10 01:20:28 +03:00
Emmanouil Papadeas dbfd4d8412 When merging layers, automatically make the bottom layer visible
If the bottom layer is invisible, it becomes visible now. Consistent with behavior seen in Krita and Photopea.
2024-04-09 02:30:50 +03:00
Emmanouil Papadeas 8f395b2be7 Create a new Effects menu and move all of the cel-specific effects there, away from the Image menu
Also moves Project properties into Image
2024-04-09 01:52:12 +03:00
Emmanouil Papadeas 25a69a99d6 Fix texture loading in LayerEffectsSettings 2024-04-08 02:43:01 +03:00
Emmanouil Papadeas 785701b093 Add an option to export a JSON file with the project data
Probably temporary, it might be a good idea to add a third "Data" tab in the export dialog, if we add stuff like exporting to Godot resources, such as AnimatedSprite, AnimationPlayer etc.
2024-04-06 03:30:50 +03:00
Emmanouil Papadeas 8c0a194468 Update camera when the viewport size changes 2024-04-06 00:09:58 +03:00
Emmanouil Papadeas 971fb67db1 When running in headless mode, don't set a custom cursor and don't save window data on exit 2024-04-05 20:36:03 +03:00
Emmanouil Papadeas 1062f88e4c Automatically load an image as a new project, when there is only one empty project
This is also useful for the CLI
2024-04-05 20:16:54 +03:00
Emmanouil Papadeas 0ac7789bf9 Store image data in undo/redo of the move tool, reverts 4f5f37a522
This fixes an issue where, if the user moves pixels outside the canvas and then undos, those cut pixels will not be restored.
2024-04-05 18:02:46 +03:00
Emmanouil Papadeas 596c174c92 Add a project properties dialog
Allows users to change project name and add custom user data. I was not sure where to put this, so I put it under the Edit menu. It might be a good idea to add a new "Project" menu in the future, and perhaps Scale Image, Resize Canvas and Crop to Content/Selection could be placed there, as they always affect the entire project.
2024-04-05 02:24:47 +03:00
Emmanouil Papadeas c5c421bd28 Add layer properties 2024-04-04 03:21:07 +03:00
Emmanouil Papadeas 2cdd426a45 Update Translations and minor UI improvement in cel, frame and tag properties 2024-04-04 02:46:50 +03:00
Emmanouil Papadeas 14a13a2161 Add user data for cels, frames and tags
Projects and layers are next, once I add project and layer setting dialogs respectively.
2024-04-04 01:27:50 +03:00
Emmanouil Papadeas bc4b4dff0f Fix CLI exporting even though an unknown option has been provided
Allowing exporting even if an unknown option has been provided could lead to unexpected results
2024-04-04 00:27:20 +03:00
Variable 04caa5f7f5
Experimental refactor of the CLI (#1006)
* experimental refactor

* some fixes, some improvements

* some formatting and add check for invalid argument

* formatting

* added similarity option

* linting
2024-04-04 00:22:05 +03:00
Emmanouil Papadeas 1c8d81d1b7 [CLI] Make arguments case sensitive, add support for OS.get_cmdline_user_args(), add short form flags as alternatives for the long form arguments 2024-04-03 16:25:34 +03:00
Emmanouil Papadeas af01234470 Implement a basic CLI
Supports exporting images & spritesheets with frame, direction, scale and output file name specification. Also added some informative arguments that simply print out some data.
2024-04-02 00:36:33 +03:00
Emmanouil Papadeas 183bee6a0f Load preferences from the config file before waiting for process_frame 2024-04-02 00:02:20 +03:00
Emmanouil Papadeas 53e4ebc668 Fix spritesheet exporting from bug introduced in 6fa4a27589 2024-04-01 23:50:50 +03:00
Emmanouil Papadeas ea8748ca55 Use a dictionary in Export to group FileFormat enums and their respective file extensions and descriptions 2024-04-01 23:16:12 +03:00
Emmanouil Papadeas 473dabf004 Replace "{name}" with the project name when exporting 2024-04-01 21:45:39 +03:00
Emmanouil Papadeas bf14ac1565 Add an ExportFrames enum in Export to make code clearer 2024-04-01 21:45:11 +03:00
Emmanouil Papadeas 1d262c62f7 Don't include the ".pxo" extension in the project's name, when opening or saving 2024-04-01 20:11:27 +03:00
Emmanouil Papadeas 6fa4a27589 Directly export the final blended images from the pxo, if they exist
This only happens when the pxo file contains the final blended images (happens when "include blended" is enabled when saving), project has been saved, it hasn't been changed and "Visible layers" is selected.
2024-04-01 19:39:10 +03:00
Emmanouil Papadeas 77bea9a6e3 Re-add old layer blending logic from 0.x, if running on headless mode
Only meant to prevent crashes when trying to export from headless mode. This blending logic does not support blend modes, clipping masks, and layer effects.
2024-04-01 17:31:10 +03:00
Emmanouil Papadeas 1cb4d22233 Fix the same frames being exported multiple times when "Selected frames" is selected, and multiple cels of the same frames are currently selected on the timeline - Fixes #1001 2024-03-31 00:55:55 +02:00
Emmanouil Papadeas 11a1428eef Add an Apply button to the font size slider in the Preferences, fix display scale not being applied on startup 2024-03-30 01:25:01 +02:00
Emmanouil Papadeas 963819a71a Fix color picker selecting fully transparent pixels that are not black 2024-03-26 02:11:21 +02:00
Emmanouil Papadeas d9888036f2 Hide the dynamics popup
Oops
2024-03-25 00:32:00 +02:00
Emmanouil Papadeas 94fdfd8f02 Hide and show dynamics properties when dynamics are enabled 2024-03-24 15:35:40 +02:00
Emmanouil Papadeas b620cf2a9e Lazy load the preferences dialog
Speeds up the initial loading time of Pixelorama. It's now almost as fast as 0.x on my computer (a bit more than 2 seconds). Lazy loading the preferences dialog also drastically reduces memory usage and node count (when preferences have not been opened), from 150MB, 13634 objects and 3680 nodes, to 94MB, 8207 objects and 1823 nodes. This essentially cuts the initial node count to half!
2024-03-24 02:46:57 +02:00
Emmanouil Papadeas 8c9a01feae Move theme handling code in a new Themes autoload
The preferences code only handles the UI related stuff, while the Themes autoload is now solely responsible for theme adding, removing and changing. This makes it possible to handle themes without having the preferences dialog be in the middle.
2024-03-24 02:08:54 +02:00
Emmanouil Papadeas 11fb2c2b65 Move language handling code in Global, remove HandleLanguages.gd
This makes it possible to handle language without having the preferences dialog be in the middle.
2024-03-24 01:41:19 +02:00
Emmanouil Papadeas f3ca6d1c33 Separate extension handling code from the Preferences UI
The preferences code only handles the UI related stuff, while HandleExtensions is now solely responsible for extension enabling, loading and uninstalling. This makes it possible to handle extensions without having the preferences dialog be in the middle.
2024-03-24 01:20:51 +02:00
Emmanouil Papadeas ebfc3c04fe Lazy load the frame tag dialog 2024-03-24 00:14:57 +02:00
RorotoSic 8bfd474613
Add flip X and Flip Y, and Rotation (90, 180, 270) buttons to BaseTool (#988)
* Add Flip X, Flip Y, Rotate 90, Rotate 180, Rotate 270

* node placement

* flip_rotate for BrushButton

* flip corrected for BrushButton (x, y was reversed)

* code changed for github static checks

* github static checks

* github static checks 2

* remove " _ " before my variable name

hope this was the problem

* var brush_texture_rotation

* Hide Flip/Rotate buttons where it is unnecessary

* btns flip/rotate  hide when a non-image brush is selected

* rotate ButtonGroup (radio btn)

* expand button for flip/rotate

* radio btn grp 2

* expand button (forgot to add the tscn )

* cursor shape to pointing hand

* tooltip R90 R180 R270

i dont add txt to the Translations.pot bc not sure to understand and dont want to make mistake

* shading.tscn  (nodes placement debreaking)

back as before

* Revert "expand button (forgot to add the tscn )"

This reverts commit 3062afe73f.

* Revert "expand button for flip/rotate"

This reverts commit 51189ac793.

* Collapsible Container

change "expend buton" to the pixelorama custum node "CollapsibleContainer"

* remove thick white outline when CollapseContainer is pressed and focus

* styleboxflat when CollapseContainer is pressed and empty for checkbox

* Revert "styleboxflat when CollapseContainer is pressed and empty for checkbox"

This reverts commit 0af0e1f427.

* StyleboxEmpty for normal /  keep hover unchanged

* Revert "StyleboxEmpty for normal /  keep hover unchanged"

This reverts commit 14b3745053.

* Revert "remove thick white outline when CollapseContainer is pressed and focus"

This reverts commit b80ab1ad5c.

* "flip_rotateD" + "Flat CollapsibleContainer'"

* conflicts Resolved

signal color_changed(color: Color, button: int)

---------

Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2024-03-23 16:39:44 +02:00
Emmanouil Papadeas 6d2d09d222 More static typing improvements 2024-03-23 04:36:26 +02:00
Emmanouil Papadeas 572fabbe66 Remove Global.reference_panel
Slowly trying to remove nodes from Global
2024-03-23 02:52:27 +02:00
Emmanouil Papadeas 54142eb048 Add serialize() to AnimationTag 2024-03-23 02:17:55 +02:00
Emmanouil Papadeas acce1dda2e Move even more code away from Project.change_project()
Making Pixelorama more modular by relying more on signals
2024-03-23 02:12:28 +02:00
Emmanouil Papadeas 48145b7f61 Use signals to move some code away from Project.change_project()
WIP, more code can be moved
2024-03-22 21:05:00 +02:00
Emmanouil Papadeas dd8145d369 Greatly simplify backup code, got rid of OpenSave's current_save_paths and backup_save_paths
The previous backup code was unnecessarily complicated, hard to read/understand and prone to errors. The new system simply stores the save and backup paths in the `Project` class, and stores the backup files inside `user://backups`, instead of having their file paths be in `cache.ini`.
2024-03-22 18:24:41 +02:00
Emmanouil Papadeas 42bce917dc Never change window title and save path when loading a backup 2024-03-22 15:54:00 +02:00
Emmanouil Papadeas 2c985027b9 Fix backup dialog not appearing 2024-03-22 15:30:28 +02:00
Emmanouil Papadeas 6e0d4eb660 Fix Project.export_directory_path being set incorrectly in open_pxo_file() 2024-03-22 15:30:00 +02:00
Emmanouil Papadeas 4d077594ad Remove old Ubuntu Touch code, as it's no longer supported 2024-03-22 15:14:58 +02:00
Emmanouil Papadeas ad85c8dd3e Minor open/save dialog path related code cleaning 2024-03-22 15:12:27 +02:00
Emmanouil Papadeas 60af6b27e3 Remove duplicate code in Main's load_last_project() 2024-03-22 14:44:11 +02:00
Emmanouil Papadeas 6c8b2ae36b Rename Project.directory_path to Project.export_directory_path 2024-03-22 14:42:47 +02:00
Emmanouil Papadeas 64983b0404 Some static typing improvements 2024-03-22 03:07:21 +02:00
Emmanouil Papadeas 8f8e6b7e32 Lazy load Recorder's FileDialog 2024-03-22 02:49:31 +02:00
Emmanouil Papadeas fd4c7078b2 Lazy load create & edit palette dialogs 2024-03-21 17:29:00 +02:00
Emmanouil Papadeas 07fa1266d3 Remove three calls to Global.preferences_dialog 2024-03-21 03:00:21 +02:00
Emmanouil Papadeas 491d81f393 Minor config file section key re-organization 2024-03-21 01:51:19 +02:00
Emmanouil Papadeas 377c24c981 Make Pixelorama load slightly faster by not calling some setters of Global's variables if the value is the same 2024-03-21 00:02:54 +02:00
Emmanouil Papadeas c45ac70d2b Lazy load the splash dialog 2024-03-20 20:20:47 +02:00
Emmanouil Papadeas 722cb1a1e4 Lazy load the layer fx settings dialog 2024-03-20 19:03:46 +02:00
Emmanouil Papadeas 6f3796627f Add a flat property to CollapsibleContainer 2024-03-20 15:49:53 +02:00
Emmanouil Papadeas f1ef01bb87 Replace Camera2D with a custom CanvasCamera to reduce idle GPU usage
Necessary workaround because of https://github.com/godotengine/godot/issues/89514
2024-03-19 15:39:34 +02:00
Emmanouil Papadeas 9fa90ab3b1 Set license text in the About dialog to be uneditable 2024-03-16 22:49:22 +02:00
Emmanouil Papadeas 03b173b76e Optimize cel switching by avoiding changing the stylebox of every CelButton 2024-03-15 01:31:12 +02:00
Emmanouil Papadeas d3be746290 Change UI of layer buttons - bring the small buttons out of the main button
This makes the visible/lock/linked/expand buttons more clear that they are indeed buttons. This commit also slightly changes the look of child layers, as they only appear intended and they no longer change color.
2024-03-14 20:13:42 +02:00
Emmanouil Papadeas c1b78e4c01 Implement basic clipping masks
A very simple implementation, not as complex as something like #768 yet, but it can be done in the future.

The main current limitation is that it doesn't work with group layers as of right now.
2024-03-14 01:08:57 +02:00
Emmanouil Papadeas fdc92ccfc3 Fix group layer expand button not working 2024-03-13 01:22:46 +02:00
Emmanouil Papadeas 3c5c659f01 Disable 3D for the SubViewports
This doesn't affect 3D layers, as they are being rendered on another Viewport
2024-03-12 22:18:15 +02:00
Emmanouil Papadeas 6ea6df0e26 Fix size label not being updated on the Export dialog's spritesheet tab when the direction changes 2024-03-11 19:19:27 +02:00
Emmanouil Papadeas 3fb2877b73 Fix pattern sampler2D in shaders not repeating
When using the Bucket tool to fill with pattern in "Similar colors" and "Whole selection" modes, the pattern was not being repeated.
2024-03-10 14:59:55 +02:00
Emmanouil Papadeas 4614a648d1 Update hint tooltip of the alpha lock button 2024-03-09 02:51:29 +02:00
Emmanouil Papadeas dc9ba6dd9c Implement alpha lock as a global tool option 2024-03-09 02:47:13 +02:00
Emmanouil Papadeas c225553042 Fix linked cels not working when importing a pxo file
Godot 4 has changed how ImageTexture works, as now it doesn't work when the Image is empty. Thus, we need to add Images to PixelCels right when they are created, before the linked cel logic is being handled.
2024-03-08 02:15:58 +02:00
Emmanouil Papadeas 90f7df0f5d Exporting each layer as a different file is now possible 2024-03-07 16:08:20 +02:00
Emmanouil Papadeas cb58cf7163 Minor refactor of Export & ExportDialog to combine processed_images and durations into a single ProcessedImage class 2024-03-07 02:10:21 +02:00
Emmanouil Papadeas cd2787b373 Set opacity of multiple layers at once 2024-03-07 01:16:43 +02:00
Emmanouil Papadeas d17a151f8d Delete and change properties of multiple cels at once 2024-03-07 01:06:46 +02:00
Emmanouil Papadeas 20fecc5a7a Export spritesheets based on animation tags 2024-03-06 19:49:05 +02:00
Emmanouil Papadeas 55df23e400 Fix exporting not including the last frame of a tag and "Selected layers" not including the non-selected frames 2024-03-06 01:47:00 +02:00
Emmanouil Papadeas 36d4b0fa18 Fix crash when importing a corrupt pxo 2024-03-05 16:05:13 +02:00
Emmanouil Papadeas e726dcfc09 Fix static typing 2024-03-04 18:27:58 +02:00
Emmanouil Papadeas 2e9c4eb1b9 Add a timeline_updated() signal in Project
Used by https://github.com/Orama-Interactive/TeledrawingPixelorama extension
2024-03-04 18:25:03 +02:00
Emmanouil Papadeas b0a8ad17d4 Revert using Image.rotate_90() from the previous commit
Image.rotate_90() is also changing the size of the image, which we don't want to, at least not yet
2024-03-02 18:03:06 +02:00
Emmanouil Papadeas 4a404b2883 Use Image.rotate_90() and Image.rotate_180() on CPU rotation algorithms when the angle is 90, 180 or 270 degrees 2024-03-01 20:25:37 +02:00
Emmanouil Papadeas 57856ed327 Update ExtensionsApi.gd 2024-02-29 23:54:19 +02:00
Emmanouil Papadeas 9b439327b8 Fix ExtensionsAPI's new_project() not working, and add a new new_empty_project() method 2024-02-24 15:25:54 +02:00
Emmanouil Papadeas 03ce5d40a2 Set the window's minimum size only once in Main.gd 2024-02-23 20:24:37 +02:00
Emmanouil Papadeas d3db8f5be7 Rename project_changed to project_data_changed signal, add a new method for this signal in ExtensionsAPI 2024-02-22 17:43:47 +02:00
Emmanouil Papadeas a06d6a2909 Improve static typing in the ExtensionsAPI 2024-02-22 00:46:28 +02:00
Emmanouil Papadeas 22ddc96962 Use getters to lazy-load cleanEdge and OmniScale shaders 2024-02-19 02:09:35 +02:00
Emmanouil Papadeas 66ea1fcfe9 Update the DockableContainer plugin 2024-02-18 19:47:21 +02:00
Variable 81dbc0177d
Moved live preview code to ImageEffect Dialog (#978)
* live fixes

* added accidentally disconected signals

* Update RotateImage.tscn

* improved code

* Formatting
2024-02-17 00:23:31 +02:00
Emmanouil Papadeas 9a313821dc When exporting, Pixelorama now remembers the last exported path 2024-02-15 18:41:24 +02:00
Emmanouil Papadeas b3fa8870f8 Fix null instance error causing a crash on startup, originating from #974 2024-02-14 20:58:21 +02:00
Variable 909f38bd0c
Further Reference UI Improvements (#974)
* references UI refactor

* changed select icon

* fixed a bug
2024-02-14 19:53:35 +02:00
Emmanouil Papadeas f56d536b36 Create a get_mirrored_positions() method in Tools
Reduces some code replication across tools
2024-02-13 02:31:48 +02:00
OverloadedOrama 47fc659170 Add yet another MarginContainer in the timeline
To fix the outline of the first frame (when selected) from being cut off, while also keeping frames & cels glued to the layers
2024-02-12 05:02:07 +02:00
Emmanouil Papadeas 9f82c85b73 Fix issue when uploading a shader on the Web version 2024-02-12 00:29:30 +02:00
Emmanouil Papadeas 0a63664391 Remove some dialog parent nodes
Also removes the GIF warning in the ExportDialog, as #697 no longer occurs in 1.0
2024-02-12 00:28:50 +02:00
Emmanouil Papadeas 5c58562d6b Fix theme color preview spacing in the Preferences 2024-02-11 19:12:09 +02:00
Emmanouil Papadeas 85b255032f Keep the aspect ratio correctly in the image effect dialog previews 2024-02-11 18:44:22 +02:00
Emmanouil Papadeas 2b4d85ac3e Fix PointCollapseContainer's TextureRect being rotated incorrectly 2024-02-11 18:21:35 +02:00
Emmanouil Papadeas 0e4c9bad20 Remove CollapsibleContainer.tscn, only keep it as a script/node type 2024-02-11 18:20:46 +02:00
Emmanouil Papadeas 8d8a147142 Lazy load the window opacity dialog 2024-02-11 16:20:04 +02:00
Emmanouil Papadeas be7427fd9c Fix memory leak when previewing layouts in the ManageLayouts dialog 2024-02-11 16:02:15 +02:00
Emmanouil Papadeas c4a4bd4602 Implement lazy loading for some dialogs to make the initial loading of Pixelorama faster
Only load dialogs when they are needed and not at the start of the program. Right now only the new image, about, manage layouts and image effects dialogs are being loaded on demand, but more dialogs can be handled this way in future commits.
2024-02-11 16:01:59 +02:00
Emmanouil Papadeas a6060d9ff6 Remove unused variable from ReferencesPanel 2024-02-11 02:20:44 +02:00
Emmanouil Papadeas 8448dbd4ba Various theme improvements 2024-02-10 15:11:53 +02:00
Emmanouil Papadeas 8b91d95258 Make alpha affect all of the blend modes besides Normal and Screen 2024-02-09 20:09:25 +02:00
Emmanouil Papadeas bec6dfc256 Fix semi-transparent pixels being blended incorrectly in the BlendLayers shader
There may still be some semi-transparency issues in blend modes, some extra testing is required
2024-02-09 19:45:26 +02:00
Emmanouil Papadeas a05dbabf98 Slightly increase the layer container minimum size to match the layer buttons 2024-02-09 14:50:18 +02:00
Emmanouil Papadeas 3935bfd2d3 Control + wheel works on the line tool's thickness now 2024-02-09 14:42:10 +02:00
Emmanouil Papadeas b75573d19c Make CelProperties its own scene and put it in Main.tscn instead of having it as a child of each CelButton
This drastically reduces the number of nodes. Before, each cel would have its own property node which, when the project had many cels, drove the node count quite high.
2024-02-09 04:01:01 +02:00
Emmanouil Papadeas 7f1aad280c Fix cel buttons not changing colors when switching themes 2024-02-09 03:33:34 +02:00
OverloadedOrama d8d05c73de Add a new Rose theme, made changes to the other themes
Made by @Erevoid
2024-02-08 22:30:14 +02:00
OverloadedOrama 12036364b5 Timeline UI improvements, better visual indication of the cels that are selected and the cels that are linked 2024-02-08 20:46:07 +02:00
OverloadedOrama e11ecb2e8d Add get_position() and get_minimum_size() methods to AnimationTag 2024-02-07 03:17:39 +02:00
Emmanouil Papadeas a5a0ac103c Enable gestures and treat long press as right click for Android
Gestures are not yet working very smoothly, but that's something that can be improved after 1.0
2024-02-06 02:50:55 +02:00
Emmanouil Papadeas c9ddde7194 Use FFMPEG to import videos and gifs
Haven't tried large videos, but I imagine Pixelorama would run out of memory quickly. Maybe we should safeguard against that somehow. We also need to get the fps from the imported video and use it in the new project.
2024-02-05 03:32:43 +02:00
Emmanouil Papadeas 85ac0897a9 Remove unused method parameter in Palettes' copy_palette() 2024-02-05 00:17:56 +02:00
Emmanouil Papadeas fb948c33b4 Add a "Create a new palette" option on the sort palette button
Enabled by default, every time you sort a palette it creates a copy of the original palette and it sorts that, instead of sorting the original palette directly. This reduces the risk of destructive change, as the palette system does not have undo/redo support. If disabled, sorting affects the original palette directly, without creating a new one.
2024-02-05 00:16:22 +02:00
Emmanouil Papadeas afaae8ee4b Simplify guard conditions in Bucket's draw_start() 2024-02-04 14:45:16 +02:00
Emmanouil Papadeas 5dfe1cc271 Set Selection.gd process input false by default, fix cursor still being set to a cross when entering the canvas if it's disabled in the preferences 2024-02-04 00:12:19 +02:00
Emmanouil Papadeas 6a7e060f73 Set the cursor to cross when entering the canvas and to resize when hovering selection gizmos 2024-02-04 00:05:20 +02:00
Emmanouil Papadeas 647ec29ab0 The crop tool can now be applied by pressing enter 2024-02-03 15:16:21 +02:00
Emmanouil Papadeas 978ddf3b45 Fix 3DShapeEdit import object not using native dialog 2024-02-03 13:57:05 +02:00
Emmanouil Papadeas 4c39e29b67 Fix UI not staying dimmed after opening a native file dialog 2024-02-03 13:55:17 +02:00
Emmanouil Papadeas 9a842ad33e Sort layouts alphabetically when adding a new one so that Pixelorama will remember the correct last used layout when opening again 2024-02-02 03:50:28 +02:00
Emmanouil Papadeas 5824d2a0eb Choose which layout to copy from when adding a new layout 2024-02-02 02:59:07 +02:00
Emmanouil Papadeas 534a7fd356 Change the selected UI layout every time it changes
This way, Pixelorama remembers the changes users make to the UI, without them having to go to Window, Manage Layouts and clicking on Edit, which was an unintuitive and slow way. Needs testing because bugs may linger.

This commit also adds a new `save_on_change` variable and a `save` method on layout.gd of the dockable_container plugin. Perhaps I should also add this upstream as well.

I also need to add a way to create new layouts based off the default ones (which are permanently stored within Pixelorama's pck file and cannot be modified), so users will always have the option to resort to the default layouts.
2024-02-02 02:31:29 +02:00
Emmanouil Papadeas da0066259e [WIP] Copy default layouts to the layout directory so they can be modified
Moved some logic away from TopMenuContainer to Main.gd and the layout array to Global.gd.
2024-02-02 01:42:29 +02:00
Emmanouil Papadeas ffd729486f Expose window transparency as an option in the preferences, keep it disabled by default
I had to disable it, because for some reason having it be enabled by default does not seem to be working. This may be a good idea anyway, as many people will not need this feature, and having this enabled affects performance.

This commit also allows for changing project setting related options in the preferences to also work when running Pixelorama inside Godot.
2024-02-02 00:19:53 +02:00
Emmanouil Papadeas ed072de84e Change the layouts array in TopMenuContainer to only contain DockableLayouts instead of being an array of arrays 2024-02-01 22:10:18 +02:00
Emmanouil Papadeas 606ce965f6 Remove unneeded layout code from TopMenuContainer 2024-02-01 21:41:32 +02:00
Emmanouil Papadeas 276a872f73 Rename "ui" variable to "main_ui" in Main.gd and TopMenuContainer.gd 2024-02-01 20:53:52 +02:00
Emmanouil Papadeas 2e8cf6a30a Minor code improvements in WindowOpacityDialog.gd 2024-02-01 20:51:26 +02:00
Emmanouil Papadeas e648d0d612 Some code improvements in DrawingAlgos
Should also result in minor optimizations
2024-01-31 02:26:49 +02:00
Emmanouil Papadeas 399fc8dfbd Make similar_colors() in DrawingAlgos faster
We finally found some use for Godot 4's new Vector4, let Godot's built-in functions handle the math, since they run in native C++.
2024-01-31 01:41:58 +02:00
Emmanouil Papadeas 63691cacaf Load pxo files from the Web version - Fixes #820 2024-01-30 21:17:31 +02:00
Emmanouil Papadeas 1dce3ebe22 Change get_tree().get_root() to get_window() in TransparentChecker.gd 2024-01-29 16:37:56 +02:00
Emmanouil Papadeas 6345c52b5f Fix override.cfg being created in the wrong location if Pixelorama is launched through a launcher or a shortcut 2024-01-29 16:35:23 +02:00
OverloadedOrama a7cf93d1e5 Fix not being able to draw when closing the splash screen
Regression from b08420d0
2024-01-26 04:05:37 +02:00
Emmanouil Papadeas 508f8f0d15 Minor simplifications of some parts in Selection.gd 2024-01-26 02:31:38 +02:00
Emmanouil Papadeas b126e95b64 Almost made selection rotation with gizmos functional
Not exposed yet
2024-01-25 02:33:41 +02:00
Emmanouil Papadeas 3d04a8d276 Selection rotation with gizmos works on selections without content now
Still not ready and thus not exposed
2024-01-25 01:35:42 +02:00
Emmanouil Papadeas 964e9fbd26 Don't set the selection_map of the project to the original_bitmap, if the latter is empty
Shouldn't happen, but best to check in case it does. Setting empty data to the selection_map breaks selections.
2024-01-25 01:06:30 +02:00
Emmanouil Papadeas de5db85345 When resizing a selection with gizmos or from the tool options, only set the original_bitmap when we're not already transforming content 2024-01-25 00:59:53 +02:00
Emmanouil Papadeas f8b32762a1 Fix canceling selection content resizing breaking the selection 2024-01-25 00:45:49 +02:00
Emmanouil Papadeas 56fe1840e0 Make selections scale properly even if they don't transform any image content
Fixes #774.
2024-01-25 00:40:53 +02:00
Emmanouil Papadeas 3a0977ce21 Some code cleanup in Selection.gd 2024-01-25 00:11:19 +02:00
Emmanouil Papadeas ce7a5e77ba Add a single window mode setting in the preferences
True by default, when set to false the UI uses multiple windows
2024-01-24 18:31:22 +02:00
Emmanouil Papadeas f0a5637d8a Some recorder UI improvements
Removed the fps option completely as it doesn't have any effects to exported static images. Should be re-introduced once we add video exporting with ffmpeg though.
2024-01-24 14:41:15 +02:00
Emmanouil Papadeas 5297fe6a80 Forgot to format the previous commit :( 2024-01-24 04:22:45 +02:00
Emmanouil Papadeas d640b6a979 Add a setting to allow usage of native file dialogs in the preferences
Closes #274 and implements #568, at long last! Some issues remain:
- The native save pxo dialog doesn't have an "Include blended images" option. This will be fixed once https://github.com/godotengine/godot/pull/83480 is merged.
- When a native file dialog closes, the interface still remains dimmed.
- In the export dialog, the "Browse" file dialog will also close the export dialog itself when it closes, when it's native.
2024-01-24 04:20:46 +02:00
Emmanouil Papadeas 4bc0fba941 Add a variable in Global for setting file dialogs as native, and add a "FileDialogs" node group
This settings is not exposed in the preferences in this commit
2024-01-24 03:57:40 +02:00
Emmanouil Papadeas b08420d09d Don't change the value of can_draw in Global.dialog_open()
In Godot 4 dialogs seem to be blocking the input to the rest of the UI, so this may not be needed
2024-01-24 03:19:57 +02:00
Emmanouil Papadeas 4e9b657077 Remove Global.has_focus completely
Might be a risky change, but I haven't noticed any bugs so far
2024-01-24 03:14:11 +02:00
Emmanouil Papadeas 42de5ccb29 Remove unneeded has_focus checks 2024-01-24 03:06:09 +02:00
Emmanouil Papadeas d9c0cd7546 Remove Global.can_draw conditions from TopMenuContainer
These were needed with Godot 3 to ensure that you couldn't open any other dialog when a dialog is already open, by using keyboard shortcuts. This no longer seems to be required in Godot 4.
2024-01-24 02:37:28 +02:00
Emmanouil Papadeas 3a852e44ff Add a popup_error() method in Global
Just to reduce code duplication and make error appearing easier
2024-01-24 02:27:57 +02:00
Emmanouil Papadeas 43d241a5c2
Video exporting by calling FFMPEG externally (#980)
* Basic mp4 exporting, needs ffmpeg

* Add avi, ogv and mkv file exporting

* Add webm exporting

* Set ffmpeg path in the preferences

* Show an error message if the video fails to export

* Make sure to delete the temp files even if video exporting fails
2024-01-24 02:00:17 +02:00
Emmanouil Papadeas 204eff8184 Fix selection being incorrect when the image is being scaled (mostly when being made smaller). 2024-01-23 19:38:21 +02:00
Emmanouil Papadeas e7a469fa4d Refactor scale methods of DrawingAlgos 2024-01-23 19:25:32 +02:00
Emmanouil Papadeas 6448b7ee7c Remove unnecessary Array casting in DrawingAlgos 2024-01-23 19:07:35 +02:00
Emmanouil Papadeas 519fa77791 Add a recent colors section to the color picker
Sort-of implements #859
2024-01-23 03:57:31 +02:00
Variable f43f80cee0
Integrate Extension Explorer (#910)
* Integration of ExtensionExplorer

---------

Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
Co-authored-by: Emmanouil Papadeas <manoschool@yahoo.gr>
2024-01-23 03:25:37 +02:00
Variable ddce0393dd
Fixed some issues with perspective lines and removed unneeded code from the rotate image dialog (#979)
* fix drag gizmo of perspectice lines

* fix more stuff
2024-01-22 00:09:57 +02:00
Emmanouil Papadeas bec7ceb974 Fix Global.can_draw being set to true all the time
Note for the future, perhaps using _unhandled_input() might remove the need of this variable.
2024-01-21 19:46:01 +02:00
Variable 561a374cc0
Fixed rotation gixmo (#976) 2024-01-20 02:06:44 +02:00
Emmanouil Papadeas bc8fadb67c Fix cel button image texture breaking when the image gets resized 2024-01-19 18:25:50 +02:00
Emmanouil Papadeas 73e40ed127 Add a ShaderInclude file for common shader rotation code 2024-01-18 00:19:30 +02:00
Emmanouil Papadeas aa77dcb61f Selection rotation with gizmo improvements, still not usable and not exposed 2024-01-17 20:04:19 +02:00
Emmanouil Papadeas 9631527da6 Always show panel tabs if there are more than one
Bringing this feature back from 0.x. Not very happy that we're once again not synced with upstream dockable_container, so hopefully https://github.com/gilzoide/godot-dockable-container/pull/27 is merged soon.
2024-01-12 20:56:35 +02:00
Emmanouil Papadeas 80bcfe200d Don't use Global.main_viewport on guides, plus some static typing improvements 2024-01-11 16:23:00 +02:00
Emmanouil Papadeas 72bec41e63 Add icons to some Help menu items, add a new "Support Pixelorama's Development" item and remove "Donate" from the About dialog 2024-01-10 00:30:27 +02:00
Emmanouil Papadeas 3dd288f32f Hide PasteTagPopup 2024-01-09 20:47:00 +02:00
Emmanouil Papadeas 404aa190cf Fix AddExtensionFileDialog 2024-01-09 20:46:39 +02:00
Emmanouil Papadeas 4d113dbc75 Change some method names in the SignalsAPI, improve docs of some signals in Global 2024-01-09 16:32:17 +02:00
TheLsbt f373dae714
Better signal representation (#971)
* Update 3DShapeEdit.tscn

Change the menu button to flat to indicate that it is a button that you can press and not a label

* Changed Signal names to make sense

Note: I did not change functions in the ExtensionsAPI

Changed signals in Global.gd (and everywhere else they are referenced) from *_changed to *_switched

* Bonus Signal

Added a signal in Global.gd that gets emitted just before the project is changed.

Added project_changed to Global.gd which also emits what project was changed by an action (not switched).

* Formatting
2024-01-09 00:22:56 +02:00
Emmanouil Papadeas ae9449500a [AboutDialog] Remove "Developers", rename "Contributors" into "Authors" and put Erevoid's and mine names there
There's no need for our two names to be on their own, they should be together with the rest of the people who contributed to the project.
2024-01-08 22:13:54 +02:00
TheLsbt 782cc62c6e
Update 3DShapeEdit.tscn (#970)
Change the menu button to flat to indicate that it is a button that you can press and not a label
2024-01-08 18:49:49 +02:00
Emmanouil Papadeas 4f54ffc987 Rename "Crop Image" to "Crop to Selection" and "Trim Image" to "Crop to Content"
Same names as the GNU Image Manipulation Program, much more clear as to what each option does.
2024-01-04 16:28:39 +02:00
Emmanouil Papadeas 97a588bfdd Fix formatting 2024-01-04 15:58:57 +02:00
Emmanouil Papadeas e377813a73 Export palettes as images on the Web version 2024-01-04 15:46:28 +02:00
Emmanouil Papadeas 33ffa88a5b Remove unneeded signal connect from the rulers 2024-01-01 02:00:56 +02:00
Emmanouil Papadeas 08db10faad Clean Canvas.gd's _input() method a bit 2024-01-01 01:52:21 +02:00
TheLsbt c8f37943d8
Reference Image Improvements (#961)
* Reference Image Updates

* Fixed static typing

Fixed static typing in "src\UI
\ReferenceImages\ReferenceEditPanel.gd"
Changed "ri == null" to "!ri" in "src\UI\Canvas\ReferenceImages.gd"

* Tried fixing the static typing again

Removed lambda functions for the confirmation dialog.
Removed irrelevant print statement.

* Tried fixing static typing again

I think its fixed now

* Changed Spacing

* Fixed Trailing Whitespaces and tabs

* Fixed Final Trailing Whitespace

* Fixed styling and removed useless enum

* Removed double tabs left over from previous commit

* Fixed remove ConfirmDialog Showing on startusp

* Tried Fixing gdlint issues

* Fixed Linting

* Fixed Spelling issues

* Drag and drop to rearrange reference images

Added the ability to drag and drop Reference Images similar to dragging and dropping layers. These can be dragged or used with buttons (similar to the buttons that move frames). With full undo/redo support.

Added tool buttons these should help people who draw on tablets that cannot use keyboard shortcuts (icons still need to be created)

Renamed ReferenceEditPanel.gd to ReferenceEdit.gd (because it is no longer the script of a panel) and changed the base class of the Reference Panel.

Added some more translations.

Remade ReferenceImageButton.tscn to allow for drag and drop

Added drag highlight

* Added Icons

Added icons for the tools of the Reference Images

* Applied the icons to the UI

* Fix Scripting Issues

* Fixed Linting

* Rename Move.png to move.png

* Update Canvas.gd

* Updated the tooltips

Also added the correct translations

* Rename Select.png to select.png

* Rename Select.png.import to select.png.import

* Rename Move.png.import to move.png.import

* Rename Rotate.png to rotate.png

* Rename Rotate.png.import to rotate.png.import

* Fixed import files

* Rename Scale.png to scale.png

* Rename Scale.png.import to scale.png.import

* Added logic to update the reference panel when the project changes

Also fixed visual bugs related to highlighting the current reference image.

Made it so the reference image that was selected in a project get selected again when the project opens instead of going back to -1 (nothing)

* Update Project.gd
2023-12-31 14:12:37 +02:00
Variable 87b5a818bb
Improved the Paste tag system (#946)
* cloned frames only keep original selected cels as selected

* Fixed PasteTagPopup dialog, fixed tag created immediately after starting pixelorama not placed correctly

* formatting

* typo

* Pase tag popup 2.0

* improved code

* formatting

* Update PasteTagPopup.gd

* fixed code messed up while resolving conflict

* group sync achieved

* linting

* quality of life additions

* fixed projects not updating

---------

Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2023-12-30 14:53:45 +02:00
Emmanouil Papadeas bcdefe66ce [skip ci] Add the sort palette button to the UIButtons node group 2023-12-27 02:43:28 +02:00
Clara Hobbs 3d2d9e47a8
Add support for InputEventMouseMotion.pen_inverted (#966)
* Add support for InputEventMouseMotion.pen_inverted

This commit adds support for stylus erasers, both for drawing and
choosing tools.  This may be supported on some styli by inverting them
as the property name suggests, or by holding a button while drawing with
the nib.

* Formatting fixes
2023-12-25 02:50:10 +02:00
Emmanouil Papadeas dffaf1d504 Fix bug where the wrong cel would be drawn on the canvas when undoing 2023-12-24 14:47:35 +02:00
Emmanouil Papadeas d36f89365c Change "Crop Image" to "Trim Image" and add a new "Crop Image" that actually crops the image based on the active selection 2023-12-24 01:11:12 +02:00
Emmanouil Papadeas 866de8b6ae Add transparent backgrounds to the color buttons 2023-12-23 22:05:51 +02:00
Emmanouil Papadeas 893b2a8c7f Make palette swatches use TransparentChecker.tscn 2023-12-23 22:03:44 +02:00
Emmanouil Papadeas 1b9e0c1ea0 Hide transparent background in cel buttons if they are empty
Since changing the self_modulate no longer seems to have any effect. Changing the alpha in the shader itself would be a bad idea, since it would require every button background to have its own material, instead of sharing the same one.
2023-12-23 21:57:18 +02:00
Emmanouil Papadeas 165217acc3 Fix palette swatch highlight not being shown 2023-12-23 21:44:38 +02:00
Emmanouil Papadeas 06b405dae8 Implements palette sorting 2023-12-23 19:00:24 +02:00
Emmanouil Papadeas 9bf8eb13c4 Align tool buttons to the center 2023-12-23 13:30:01 +02:00
Emmanouil Papadeas 65ab504e22 Add a MarginContainer in the onion skinning settings dialog 2023-12-23 13:26:38 +02:00
Emmanouil Papadeas 0cb98f6e2e
Revert palette file format back to JSON (#967)
* Some static typing and use notification to check if the theme has changed in swatches

* Use Vector2i for scrolling, hide scrollbars in the node properties

* More static typing improvements

* More static typing & docstring improvements, remove some methods from Palettes.gd

* [WIP] Go back to json for palettes instead of tres

* Revert back to using dictionaries for palette colors instead of array

Reverts part of the previous commit

* Read width & height from files, don't store the name

* Fix palette renaming

* Copy non-json palettes into json files

* Fix palette duplication

* Add a new _fill_imported_palette_with_colors() to avoid duplicate code in import file methods

* Fix palette file importing when not initialising

* Export palettes as images

* Replace "tres" with "json" filter in the open sprite dialog

* When exporting a palette as an image, automatically set the file name to the palette name

* Replace default palette files with json

* Remove the Global.palette_panel variable, use signals instead.

* Static typing in signals

* Fix warning in Palettes.gd

* Fix formatting

* Add missing comments to the palette files

* Update Palettes.gd

* A few more static typing improvements
2023-12-23 00:28:35 +02:00
Variable 54604fa0af
Allow Internal extensions (#963)
* Moved tools to Extension

* removed accidental change

* code re-arrangement

* some improvements

* Restored tools and some improvements

* typo

* re-arranged tools

* formatting
2023-12-20 16:23:20 +02:00
Emmanouil Papadeas 65c2a770d7 Set is_quitting_on_save = false after saving while quitting
Just in case a project gets saved while quitting, and for the next project, the user cancels.
2023-12-18 21:30:30 +02:00
Emmanouil Papadeas 42e8c8cb50 When saving, don't include ".pxo" in the project name 2023-12-18 20:56:38 +02:00
Emmanouil Papadeas 10ca31b916 Add "include blended images" in SaveSpriteHTML5.tscn, and use save_project() for both desktop and web platforms 2023-12-18 20:55:40 +02:00
Emmanouil Papadeas 89b17177a1 Show multiple save confirmation dialogs on quit for each project that has changes 2023-12-18 20:23:55 +02:00
Emmanouil Papadeas be2245ca76 Put add/remove swatch color on the same horizontal container as the palette select and add/edit palette buttons
This allows for horizontal placement of the palette panel without any wasted space
2023-12-16 23:13:11 +02:00
Emmanouil Papadeas 9034b32d44 Use a MenuBar node in the top menu container
I didn't know this was a new node in Godot 4, very cool
2023-12-16 22:25:06 +02:00
Emmanouil Papadeas 0996d0405e Fix create and edit palette dialogs being very long 2023-12-16 22:07:11 +02:00
Emmanouil Papadeas b42c2d4cae Fix crash reported in #960 2023-12-15 18:54:10 +02:00
Variable 8d09713774
ExtensionApi Improvements (#959)
* Improved signal api

* added two more signals

* Improved debug messaging system

* fix typo
2023-12-14 03:44:50 +02:00
Variable 17ee10a131
[ExtensionsAPI] Implement an Import API (#957)
* Added ImportAPI

* Delete src/UI/Dialogs/PreviewDialog.gd

* Delete src/UI/Dialogs/PreviewDialog.tscn
2023-12-12 16:04:49 +02:00
Emmanouil Papadeas 6b5ba2bf0f Fix brush and palette importing not working 2023-12-10 14:23:14 +02:00
Emmanouil Papadeas a5e73e1fcd Fix layers not being rendered on certain devices
Looks like some kind of textureSize() bug with sampler2DArrays when accessing the z member. I have only confirmed this bug on an AMD GPU. Nevertheless, it should be fixed now with this workaround.
2023-12-10 02:59:30 +02:00
Emmanouil Papadeas 495c3b8ebe Don't call project_changed() whenever a reference image gets imported 2023-12-07 16:09:00 +02:00
Emmanouil Papadeas 91bf44c4fb Make the RGB buttons pressed by default in Invert Colors & Desaturate dialogs 2023-12-07 00:21:58 +02:00
Emmanouil Papadeas df0cbe0bc2 Add margins to the palette container 2023-12-06 22:32:24 +02:00
Emmanouil Papadeas 30827461fd Add margins to the tool options 2023-12-06 21:55:13 +02:00
Emmanouil Papadeas dc06e3aa06 Change dark theme colors and remove unneeded items 2023-12-06 20:34:50 +02:00
Emmanouil Papadeas f801b5bc07 Minor UI improvements
Replaced the "FX" text with a texture in the timeline's FX button, added left and right margins in the DockableContainer
2023-12-06 17:34:03 +02:00
Emmanouil Papadeas aacd41f2e5 More z-index layer ordering fixes 2023-12-06 15:11:04 +02:00
Emmanouil Papadeas b40fef2c97 Fix the layer order being wrong 2023-12-06 04:29:35 +02:00
Emmanouil Papadeas 8ca0e12b90 Attempt to fix the "add layer" button not working when pressed 2023-12-06 04:16:53 +02:00
Emmanouil Papadeas c8bead14b2 Fix crash when the palette directory doesn't exist 2023-12-06 03:57:26 +02:00
Emmanouil Papadeas 359f509d57 Make the opacity slider affect layer opacity instead of cel opacity
And move cel opacity inside the cel properties.
2023-12-06 03:44:55 +02:00
Emmanouil Papadeas c0a8202145 Add cel properties and z-index to individual cels 2023-12-06 03:22:33 +02:00
Emmanouil Papadeas f893e68d59 Move even more code away from Global and Project to AnimationTimeline
This time related to layer buttons
2023-12-05 02:04:34 +02:00
Emmanouil Papadeas 80e351a2a1 Move some code away from Global and Project to AnimationTimeline 2023-12-05 01:46:42 +02:00
Emmanouil Papadeas d60c686368 Fix typo 2023-12-05 01:13:46 +02:00
Emmanouil Papadeas f40ef6f329 Some more LayerButton.gd code improvements 2023-12-05 01:11:51 +02:00
Emmanouil Papadeas 5ece616a9a Only use one LayerButton scene instead of using inheritence
And make some code improvements in LayerButton.gd
2023-12-05 01:08:26 +02:00
Emmanouil Papadeas a627cff107 Only have one CelButton scene instead of using inheritance 2023-12-05 00:40:16 +02:00
Emmanouil Papadeas 41fdba266a Organize layer and cel class files by putting them in folders 2023-12-05 00:33:26 +02:00
Emmanouil Papadeas 29f4f52600
Change the file format of pxo to be a ZIP (#952)
* Save pxos as zip files in disguise

* Load pxo files as zip

* Add a checkbox in save dialog to let users include the final blended images in the pxo or not
2023-12-05 00:12:05 +02:00
Emmanouil Papadeas 9a85de74b5
Make the color picker be always visible in the UI instead of a popup (#953)
* Initial work of a color picker that is always visible

* Make the new color picker fully functional

* Minor UI fixes

* Change the UI a bit so the color picker buttons look like they used to

To save horizontal space

* Add sliders as a separate panel and rename some file names

* Move the left/right color buttons next to the hex text edit

* Add color picker sliders to the same panel as the rest of the color picker, as an expandable/collapsible area

* Change default layout

* Some minor UI improvements

* Remove guides from ColorPicker.tscn

* Reduce the lines of code that calculate the average color

* Make Pixelorama remember if the color picker is expanded and its color mode

* Update tallscreen.tres

* Update tallscreen.tres

* Pixelorama now also remembers the last used picker shape

* Add some extra comments in the code

* Fix typo

* Add some translation strings
2023-12-05 00:10:42 +02:00
Emmanouil Papadeas d2734ab044 Add a basic stabilizer
Not as powerful as other art software, but should be enough for pixel art
2023-12-04 14:55:38 +02:00
Emmanouil Papadeas 1b22e75034 Some timeline UI improvements 2023-12-01 21:13:28 +02:00
Emmanouil Papadeas 8c34532cda Store layer effect data in pxo files 2023-12-01 03:12:55 +02:00
Emmanouil Papadeas 4f1705c1e1 Update project.godot and fix formatting 2023-12-01 02:18:35 +02:00
Emmanouil Papadeas 5b1c79df05 Make undo/redo support echo again
Thanks to Godot 4.2!
2023-12-01 02:12:02 +02:00
Emmanouil Papadeas 4b84803456 Loop through frames when clicking on go to previous/next frame buttons on the timeline 2023-11-29 02:47:33 +02:00
Emmanouil Papadeas ab3fb9a975 Fix bug where using shortcuts to switch between frames also moved the selection, causing deletions 2023-11-26 14:04:11 +02:00
Emmanouil Papadeas e58993d1e3 Fix crash when linking and then unlinking cels, use set_image() and update() instead of create_from_image() 2023-11-25 17:08:41 +02:00
Emmanouil Papadeas 56264fda3b Fix not being able to transform if the selection size is bigger than the project size
Also introduces a new `return_cropped_copy()` method in SelectionMap to avoid duplicate code.
2023-11-25 00:18:44 +02:00
Emmanouil Papadeas bc8a9de4db Optimize layer blending modes and make them work on all GPUs (hopefully) - Fixes #938 2023-11-25 00:10:19 +02:00
Emmanouil Papadeas 88a2ef593e Fix project tab title not updating when loading a file and replacing an empty project 2023-11-23 16:34:25 +02:00
Emmanouil Papadeas e4373ded07 Set the default clear color to its correct value when Pixelorama first starts and no theme/clear color option has already been set in the preferences before
Also removes a piece of unnecessary code.
2023-11-22 17:54:33 +02:00
Emmanouil Papadeas 4024858292 Set the minimum size of the layer buttons container to be the same as the size of the layer options container 2023-11-22 17:44:38 +02:00
Emmanouil Papadeas 29a5994cec Fix canvas preview play button minimum size 2023-11-22 17:22:57 +02:00
Emmanouil Papadeas 768869b519 Limit outline width step to 1 and allow lesser/greater values for shader-generated sliders 2023-11-22 17:18:37 +02:00
Emmanouil Papadeas d5c520643b Fix layer button hierarchy lines being drawn in the wrong position 2023-11-22 17:12:30 +02:00
Emmanouil Papadeas d84c2dd6f3 Fix crash when deleting a layer that is being renamed 2023-11-22 15:18:55 +02:00
Emmanouil Papadeas 74273d5b59 Fix frame duration being set to x1.01 instead of x1.0 by default 2023-11-22 03:59:21 +02:00
Emmanouil Papadeas 08b03ae0e5
Implement layer effects (#940)
* Basic logic for layer effects

* Add an FX button and the ability to add effects, no way to remove or change properties of effects yet

* Basic and ugly UI for adding and removing effects, no property changing yet

* Swap effects

* Fix preload shader paths

* Change parameters for layer effects

* Change gradient parameter in layer effect shaders, and other fixes

* Use CollapsibleContainers for the shader properties

* Set the correct gradient interpolation mode and color space in the UI

* Make effects of group layers apply to children

* Change `apply_fx` to `apply_effects`, formatting, some extra doc comments

* Apply effects to other canvases, when merging layers and when exporting

* Display humanized names of the shader unifrms

* Some UI improvements to the LayerEffectsSettings

* Add an Enabled button in the layer effects window, and change checkboxes to checkbuttons

* Change BaseLayer.apply_effects() to take a cel as a parameter instead

* Make layer effect buttons be affected by the modulate icon color

* Add option in the View menu whether layer effects are displayed in the canvas or not

* Rename `apply_effects()` to `display_effects()`

* Add translation strings

* Add nearest filter to the gradient map

* Don't change Main.tscn

* Fix more translations

* Change the default cursor shape of the generated UI elements of the layer effects

* Add undo/redo and effect application (apply effect destructively)

There are some errors due to the usage of anonymous lambda methods in undo/redo, but it seems to be working well regardless.

* Make layer effect application work on all cels
2023-11-22 01:06:25 +02:00
Variable d532aee550
Added Measurements to move tool (and other fixes) (#932)
* fixed mouse guide, added measurements

* typo

* code improvements

* change width

* fixed accidental uneven indentation

* minor fixes

* formatting

* formatting

* fixed ui of canvas preview container

* centered labels of tool names

* changed text overrun behaviour of Mode to Ellipsis

* use grid container

* Revert "use grid container"

This reverts commit 8ac9ac2aae.

* Revert "changed text overrun behaviour of Mode to Ellipsis"

This reverts commit eec1482e5f.

* Revert "centered labels of tool names"

This reverts commit 9720e37ef8.

* Revert "fixed ui of canvas preview container"

This reverts commit 9809fa3336.
2023-11-21 16:54:03 +02:00
Variable 60d4b1fd81
Make cloned frames only select a cel if it's coresponding original cel was selected as well (#942)
* cloned frames only keep original selected cels as selected

* Fixed PasteTagPopup dialog, fixed tag created immediately after starting pixelorama not placed correctly

* formatting

* typo
2023-11-21 16:48:48 +02:00
Variable 07fe676f4f
Exposed get_enclosed_image() to API (#944)
* Exposed get_enclosed_image() to API

* minor adjustments

* did the suggested changes
2023-11-20 14:43:40 +02:00
Variable 5d858eb0ec
revised project api (#945) 2023-11-20 14:30:26 +02:00
Variable b71353cd75
fixed some typos (#943) 2023-11-19 14:04:19 +02:00
Emmanouil Papadeas 417102da22 Fix selection resizing when transforming content 2023-11-17 18:54:21 +02:00
Emmanouil Papadeas 16a2f524b3 Slightly optimize the start of transformations with selections 2023-11-17 17:24:19 +02:00
Emmanouil Papadeas 78ab0bf3db Remove comments left over by the previous commit
Oops
2023-11-15 04:04:41 +02:00
Emmanouil Papadeas e6d5329254 [Undo/Redo] Compress SelectionMaps stored in memory, get rid of a lot of selection_map_copy instances 2023-11-15 03:53:52 +02:00
Emmanouil Papadeas 2c5ece53dd [Undo/Redo] Compress images when replacing cels and merging layers 2023-11-14 17:08:09 +02:00
Emmanouil Papadeas 9279a8e0ab Save compressed images in undo/redo memory when scaling and centering frames 2023-11-14 03:57:02 +02:00
Emmanouil Papadeas 5d7da079cc Fix shader-based rotation not working 2023-11-14 03:27:05 +02:00
Emmanouil Papadeas e22794e611 Compress mirror image in undo/redo 2023-11-14 03:18:08 +02:00
Emmanouil Papadeas 4f5f37a522 For the move tool, only store the difference vector in undo/redo
Instead of storing copies of entire images. This is a bit slower on the CPU side, mostly on larger canvases, but it is a massive RAM optimization. Perhaps it could be move optimal to use a shader here.
2023-11-14 00:58:53 +02:00
Emmanouil Papadeas e62548517f Compress image data saved in undo/redo for image effects, buckets and selection transformations 2023-11-14 00:48:02 +02:00
Emmanouil Papadeas e2fce61980 Change some statements in ExtensionsApi's PanelAPI to check for class names instead 2023-11-12 02:02:02 +02:00
Variable 7fbc3aa210
documenting global.gd autoload (#937)
* added some docs to global

* more docs

* completed preference docs

* removing typos

* added more docs

* some more docs

* some doc revisions

* typo

* removed typos

* added more docs

* completed global doc

* fix typos

* changed some stuff

* replaced (Preference Variable) with "Found in preferences"
2023-11-12 01:16:51 +02:00
Emmanouil Papadeas 94b3e75f30 Mark dialogs as popup_windows
So they can close when the user clicks outside the window on Godot 4.2
2023-11-11 03:12:49 +02:00
Emmanouil Papadeas 397e9e7c17 Fix recent projects submenu not working on Godot 4.2.beta5 2023-11-11 01:55:14 +02:00
Emmanouil Papadeas 90ef7c0d16 Resize image effect preview images to (1, 1) when the dialogs are being hidden
So that they do not waste RAM for no reason anymore
2023-11-10 23:15:24 +02:00
Emmanouil Papadeas 786cc39e89 Fix memory leak when applying image effects 2023-11-10 22:51:15 +02:00
Emmanouil Papadeas 970d1d3c23 Fix issue where nothing would be drawn in the canvas if the first cel is a GroupCel 2023-11-09 02:07:08 +02:00
Emmanouil Papadeas ffd9d2bca8 Update tile mode opacity when changed from the preferences, and remove unused variables 2023-11-08 19:01:31 +02:00
Emmanouil Papadeas c8a69e2913 Fix some UI issues in FrameTagDialog 2023-11-08 16:22:53 +02:00
Emmanouil Papadeas be83c94693 Change OS.has_feature("standalone") to "template" instead
Which is the new name for the tag for exported builds in Godot 4
2023-11-08 15:57:01 +02:00
Variable 45736cf624
Added Godot generated documentation to the ExtensionsApi and some classes (#925)
* ExtensionsAPI.gd to ExtensionsApi.gd

* added docs to outer Api

* added empty line

* added docs to GeneralAPI

* added docs to MenuAPI

* added docs to DialogAPI

* added docs to PanelAPI

* added docs to ThemeAPI

* added docs to ToolAPI

* added docs to SelectionAPI

* added docs to the remaining APIs

* fix typo

* formatting

* linting

* linting

* documented AnimationTag class

* documented BaseCel class

* more accurate instructions to generate api

* improve/clean docs a bit

* documented BaseLayer class

* linting

* added some more docs

* Update BaseLayer.gd

* typo

* added some more info
2023-11-08 01:22:55 +02:00
Emmanouil Papadeas 79ff486c7b Put all of the image effect shaders in an Effects folder 2023-11-07 00:52:25 +02:00
Emmanouil Papadeas ec57e5173d Make the canvas preview use the same material as the main canvas except when its animation is being played
This is both an optimization and it restores live changes of the canvas preview when the user is drawing, without any extra performance cost, since the material is the same.

The only case when the canvas preview is using a different material is when its animation preview is being played, so it can show a different frame than the main canvas.
2023-11-06 22:51:21 +02:00
Emmanouil Papadeas 5b67880a9b Fix tool shortcuts not working with Control
Addresses #935
2023-11-06 02:42:33 +02:00
Emmanouil Papadeas 0e5cc58058 Fix random brushes not working 2023-11-06 01:28:54 +02:00
Emmanouil Papadeas 8a87f721b8 Fix the sides of the textures of layers drawn on the canvas being repeated when using the Move tool 2023-11-02 16:06:52 +02:00
Emmanouil Papadeas f62d7d4f6a Make "Shift + Delete" the default shortcut for removing frames 2023-11-01 17:46:21 +02:00
Emmanouil Papadeas a13881ef58 Make animation button visible on DropShadow dialog 2023-11-01 17:44:20 +02:00
Emmanouil Papadeas 8ffcfd7bd9 Fix global increment/decrement actions of shape tools and change "Fill Shape3D" to "Fill Shape" 2023-11-01 17:33:53 +02:00
Emmanouil Papadeas 7404bf23de Fix ellipses with sizes larger than 11px sometimes producing gaps
Their thickness seemed incorrect too, this commit also fixed that
2023-11-01 17:30:29 +02:00
Emmanouil Papadeas af8ba560ac Fix ellipses having gaps with sizes bigger than 2px
Not a complete fix, sometimes ellipses still have gaps on sizes 12px and bigger
2023-11-01 15:41:15 +02:00
Emmanouil Papadeas b8e83becc9 Fix missing button shortcuts 2023-11-01 14:41:05 +02:00
Emmanouil Papadeas 1e70a15055 Fix selection transformations and move tool not updating the canvas 2023-11-01 02:55:44 +02:00
Emmanouil Papadeas 58e694abec Optimize canvas drawing by only calling queue_redraw when the image has changed 2023-10-31 14:06:59 +02:00
Variable 1d35198a25
Ask user if they wish to delete Extensions permanently or not (#919)
* don't delete extensions permanently

* some further improvements to the previous commit

* add a tab to make log reading easier

* move to bin on uninstall

* attemp fix formatting

* attemp fix formatting

* attemp fix formatting

* attempt fix formatting

* attempt fix formatting

* attempt fix formatting

* attempt fix formatting

* Ask user if they prefer their extensions fried or disintegrated

* removed accidental change

* formatting

* fix uninstall dialog not apearing

(missed it due to a small blunder)
2023-10-29 13:55:22 +02:00
Variable 9e8d210623
Improve cel3d Gizmos (#929)
* improved gizmos

* removed accidental unused variable

* typo
2023-10-27 19:26:24 +03:00
Emmanouil Papadeas 16a4ae6899 Fix origin of 3D shapes exported from 0.x being scaled
Continuation of #927
2023-10-25 00:42:13 +03:00
Variable c3a651f01d
Fix cel3d compatibility when transferring project from 0.x to 1.0 (#927)
* part 1/2

* part 2/2

* increased pxo version

* improvements

* formatting

* formatting (missed this one on last commit)

* fix capsule and text 3d

* formatting

* fixed capsule shape

* Fixed text mesh and exposed some new parameters

* fix some typos

* Fixed some bugs

* minor typo

* formatting

* thin lines on hover, thick lines on select

* add proposed changes
2023-10-24 13:26:24 +03:00
Emmanouil Papadeas 895636272b Fix canvas not immediately updating when adding/removing 3D objects 2023-10-23 01:54:36 +03:00
Emmanouil Papadeas ff8f06bd47 Fix blend mode option button selecting the wrong option when changing cels 2023-10-23 00:52:01 +03:00
Emmanouil Papadeas a84b92c5a8 Some timeline UI changes, translation and documentation for the blend modes 2023-10-22 17:53:45 +03:00
Emmanouil Papadeas 8de9697be0
Layer blend modes (#911)
* Preview blend modes

No support for exporting and layer merging yet. Also need to fix the move tool preview.

* Preview blend modes on tile mode

* Raise layer limit to 1024

* Export images with layer blending modes

* Save blend modes in pxo files

* Merge layers with blending modes

* Fix crash when adding a new layer

* Preview blending in the other canvases

* Update DrawingAlgos.gd

* Move tool preview

* Re-arrange blend menu and add lighten, darken, linear burn and exclusion

* Add divide blend mode

* Add hue, saturation, color & luminosity blend modes

* Undo/redo when changing blend modes
2023-10-22 01:57:45 +03:00
Emmanouil Papadeas 6247ab2252 Fix crash when pasting 2023-10-21 16:35:38 +03:00
Variable 5e64491bee
Re-implement the ability to add custom export formats from extensions and allow preview display (#924)
* Fixed ExportApi

* Added ability for custom exporters to show their preview

* renamed a function

* Formatting

* Linting
2023-10-18 16:06:19 +03:00
Variable a5151bf739
Added new signals (#922)
* Added new signals

* fixed some kinks
2023-10-15 14:32:58 +03:00
Variable 90dd325b08
If "Save & Exit" is pressed while quitting, don't close the software if the project failed to save (#920)
* Dont quit if project failed to save

* Formatting

* spell Formatting
2023-10-14 14:25:34 +03:00
Variable fd5adef1d9
Allow user to move Palettes to Trash/Recycle Bin instead of deleting them permanently (#914)
* move paletes to bin instead of deleting them permanently

* changed emit_signal to deleted.emit()

* allow user to choose between permanent and temporary deletion

* added translation for "Move to bin"

* changed delete dialog to a confirmation dialog

* added "Delete Permanently"
2023-10-11 19:20:05 +03:00
Emmanouil Papadeas 078c212bd6 Fix some typos in the code 2023-10-04 18:25:49 +03:00
Emmanouil Papadeas fef8f02fb4 Change color spaces in gradients 2023-10-04 18:19:28 +03:00
Emmanouil Papadeas 331c46c8ee Fix undo/redo history not working when the tool changes 2023-10-02 17:20:24 +03:00
Emmanouil Papadeas e9e80e2a06 Check whether the extension being installed got copied succesfully 2023-09-09 00:03:42 +03:00
Emmanouil Papadeas 0bb6d1ddf5 Use static methods of DirAccess in some places in HandleExtensions.gd 2023-09-08 20:57:25 +03:00
Emmanouil Papadeas 07d3eb4f4b Use nearest filter in the Preview dialog 2023-09-06 03:39:59 +03:00
Emmanouil Papadeas 8fb29e050e Fix formatting 2023-09-05 02:39:01 +03:00
Emmanouil Papadeas 1901078d98 Some static typing and docstring improvements 2023-09-05 02:36:25 +03:00
Emmanouil Papadeas ea71adf308 Implement webp and jpeg exporting 2023-09-05 00:10:40 +03:00
Emmanouil Papadeas 91bfef16b3
Port to Godot 4 (#900)
* Initial conversion

* Hide some dialogs

* Update addons

* Fix errors in scripts

Temporarily commented out adding new file import types and certain Control methods that are not available in the Window class, such as get_global_mouse_position()

* Update shaders

* Fix some more errors and signals, rename "pressed" to "button_pressed"

* Even more error fixes and renaming corrections

* Fixed more errors, Pixelorama almost runs

* Update ValueSlider.gd

* Remove lock() and unlock(), more ImageTexture.create_from_image() static usage

* More static function using

* Re-add some of the dialog signals, fix window transparency

* Change instances of popup_hide to visibility_changed

* More more errors and warnings

* Fix more errors and warnings

* Get rid of errors in the output when opening Pixelorama in Godot

* Properly connect most signals without using strings

* Fix some scenes

* Don't load Main.tscn

* Emit signals directly instead of using strings

* Fix Keychain menu nodes

* Get rid of self. on most instances, as setters and getters are now always called

* Some more static typing

* Disable texture filters

* Fix zooming

* Fix int as enum warnings

* Fix tools and rename doubleclick to double_click

* Update tool scenes

* Fix tabs

* Fix create new image

* Use static typing on flood fill to speed it up

* Update static-checks.yml

* Reverts #729 for a speedup, hopefully the bug won't get re-introduced

* Fix TransparentChecker warning

* Re-add Default template

* Fix 3D cels

* Fix rotation

Project converted bug. Should be fixed by https://github.com/godotengine/godot/pull/79264

* Fix UITransparency alignment issue, thanks Variable

* Add missing OptionButton items

Hopefully that should be all of them

* Fix the appearance of CollapsibleContainer

* Change instances of world to world_3d

* Fix tool button backgrounds

* Fix Splash dialog

* Fix brush selection

* Update Main.gd

* Fix About Dialog

* Fix more zooming issues

* Fix canvas preview zooming

* Use signals for queue_redraw on project change

* Fix layer button's look

* Fix gradients

* Some gradient fixes and code cleanups, dithering is still broken

* Fix bucket

* Fix the rest of the undo_redo.add_(un)do_method() cases

* Fix guides

* Fix guide text

* Some small changes in Main

* Update Tools.gd

* Fix palette importing

* Get rid of TODOGODOT4s

* Fix the rest of the dialogs

* Update the rest of the scenes

* Fix onion skinning and frame tag dialogs

* Fix file brushes being imported twice

* Fix palette swatch crashing on double click

* Use nearest filter for some of the windows

* Remove old .tres font files

* Fix language switching

* Get rid of Keychain.action_get_first_key() on the extra shortcuts of tools

* Get rid of Keychain.MenuInputActions and directly set shortcuts to the menu items

This temporarily removes echoing support for undo and redo, this will be re-added once https://github.com/godotengine/godot/pull/36493 or https://github.com/godotengine/godot/pull/64317 is merged.

* Clean shortcut-related duplicate code in TopMenuContainer

* Remove DroidSansFallback now that system fonts can be used as fallback

* Remove 3.x settings from project.godot

* Format

* Format gdgifexporter

* Reset Keychain to its original state

* Remove textures from the dark and gray themes

* Remove all textures from the dark theme

* Better static typing in DrawingAlgos

* Use Vector2i for project size

* [Risky commit] Use Vector2i instead of Vector2 for tools

I tested it and everything seems to be working the same as before, but more testing would be appreciated.

* Format after previous commit

* Fix line angle constraint being rotated 180 degrees

This is not a regression from the previous commit(s), Godot 4 probably reversed the logic of `angle_to_point()`.

* Fix input map action not found errors when pressing Shift or Control

* Make AnimatePanel bigger, add spring interpolation

* Fix some layouts/extensions/preferences loading errors

* Fix dithering

* Update layout resources

Probably doesn't change anything at all, but I suppose it might be a good thing to do

* Small changes

* Disable filter in ResizeCanvas dialog

* Fix some preferences default button states

* Fix tile mode always having masking on

* Use integers in tile mode

* Fix checkboxes in preferences not working

* More statically typed arrays!

No need to have these # Array of X comments anymore!

* Fix "apply all" for multiple preview dialogs

* Update theme.tres

* Add HeaderSmall theme type variation

* Fix dynamics buttons

* Don't allow sub-zero zoom values

* Let zoom_out_max always remain Vector2(0.01, 0.01)

This fixes zooming on large canvases

* Bump version to v1.0-dev

* Fix ambient light not working on 3D cels

* Fix .obj loading

* Don't allow greater than max values in the zoom slider

* Set maximum zoom value to always be (500, 500)

* Set zoom slider minimum value to 1

* Some UI changes, mostly related to buttons and the timeline

* Change window titles to what they were before

* [COMPATIBILITY BROKEN WITH v0.x] Fix loading 3D cels

* Avoid changing Cel3DObject's file_path if it's the same

* Make preferences window bigger

* Fix png exporting

* Fix reference image initial size and filter setting

* Fix perspective line reverse scaling on zoom and facing 180 degrees away from cursor

* Format and some linting

* Remove most Images from the rest of the themes

* Remove all textures from all themes

* Fix drawing when the mouse gets released outside the canvas boundaries

* Format Keychain

* Implement #890

* Fix recorder

* Fix layout deletion

* Better static typing and fix empty_clicked signal-connected methods not having arguments

* Fix layout and extension directory creation if they don't already exist

* Change all instances of "HTML5" to "Web"

OS.get_name() now returns "Web" instead of "HTML5" in Godot 4

* Fix JavaScript detection

Opening files in the Web version does not yet work for some reason

* Fix formatting

* Fix lint errors

* Remove unneeded lines from rotation shaders

* Clean some rotation shader related code

* Remove ErrorManager from #891, as it's no longer needed in Godot 4

* Some docstrings

* More Vector2i and Recti replacing their float counterparts

* Remove the hardcoded shortcut from ValueSlider

Note that the brush size shortcut may not change properly because Keychain isn't updated to support Godot 4's input map properly yet.

* Fix bugs from the rebase, integer zooming is currently broken

* Format

* Fix bug where some imported images would fail to load when using smart slice

* Fix integer zooming (I think)

* Fix errors after #898

* Fix some UI issues with PreviewDialog

* Use ctrl/command instead of just ctrl in the shortcuts of the InputMap - gets rid of the need for _use_osx_shortcuts() in Main.gd

* Update Keychain and addons/README.md

* Update CI to Godot 4.1.1 (probably will not work)

* Remove XDGDataPaths.gd

* Make windows non-exclusive

* Attempt to fix macOS CI

* Attempt to fix CI

* Attempt to fix CI

* Minor fix in the dark theme, more will follow

* Silence enumerator/integer warning

* Attempt to fix macOS CI

* Another attempt to fix macOS CI

* Attempt to fix Windows & macOS CI

* fix: Recorder directory create (#903)

* Update Keychain so that the brush size shortcuts can be changed

This update generally lets users use modifier buttons (control, alt, shift, meta) with mouse buttons

* Change OSX to macOS

* Detect if multi-threading is enabled when exporting gifs

* Fix color picker not working on the top color mode

* Make some public methods private in Export.gd

* Remove Global.window_title variable

* Fix frame UI in the timeline breaking after 100 frames

* Static typing improvements for the timeline

* Better static typing for grids

* Fix typo

* Fix pixel grid not appearing

* Move preference updating code to Global using setters

This should make the code a bit more readable, as the logic for each property update can be found directly under the variable declaration, and not hidden in PreferencesDialog's preference_update() method. This also allows for changing these properties outside the preferences, if that will ever be needed. In theory it's also faster as we don't have to do all these string comparisons anymore, but I doubt this will be noticeable in practice.

* Remove RestoreDefaultButton.tscn

* Implement changing font size in the preferences

* Resize HeaderSmall font size along with the default font size

* A step towards fixing image loading in the Web version

Doesn't completely fix the issue, it requires a fix from Godot's side as well

* Implement missing input event actions for buttons

TODO: Add default shortcuts

* Do not change language and theme if they are already the defaults

Reduces the initial loading time a bit

* Remove update_hint_tooltips() as it's no longer needed, only keep it for tools

This was needed in order for hint tooltips to be successfully translated while taking the shortcuts into account. Godot 4 already it correctly for us now. Tools still need it because they contain multiple shortcut data in their tooltips.

* Change ExportDialog's PathDialog's file mode to be "open directory" and make them bigger

* Fix Vector2i + Vector2 errors in grid center snapping

* Update tooltips when the shortcut profile changes

* Fix copy-paste mistake

* Update tooltips during startup if the shortcut profile is not the default

* Fix gif warning label size in ExportDialog

* Fix BBCode in ExportDialog

* Fix some Godot 4.2 warnings

* Some CI fixes

* Static typing improvements and more inline functions

* Format

* Even more static typing, inline methods, docstrings etc

* Some more static typing improvements and inline setters

* Remove unneeded project type specifying

* Fix splash dialog error

* Fix enumerator warning

* Don't preload the font in the rules and guides

* Fix some integer division warnings

Sometimes we indeed need them to be floats

* Change some Rect2s to Rect2is

* Minor static typing improvements

* Update README, CHANGELOG, Translations

* Only load translation files when needed, reduces loading time a bit

* Update Keychain so it doesn't load languages during startup

* Lazy load all tool scenes, breaks compatibility with the extension API

Decreases initial loading time

* Format

* Very minor loading time speedups

* Remove unneeded project type specifying

* Even more static typing and docstring improvements

* Fix extension loading

* Palette docstrings

---------

Co-authored-by: ppphp <kevinniub@gmail.com>
2023-09-04 16:29:06 +03:00
Emmanouil Papadeas b2c157fa07 Release v0.11.2-stable 2023-08-31 11:38:47 +03:00
Emmanouil Papadeas 016bd67ef9 Update contributors, translators, donors 2023-08-30 15:18:00 +03:00
Emmanouil Papadeas 0cd1ef2c27 Fix snapping distance slider hint tooltip in the Preferences 2023-08-30 15:11:47 +03:00
Variable 5d1b0ccb25
Rectangular grid center snapping (#905)
* implement center snapping

* typo

* allow snap distance in center snapping

* better description of snapping distance

* Update Translations.pot
2023-08-28 14:17:05 +03:00
Emmanouil Papadeas c5970b2edb
Fix mistake caused by a previous commit when re-arranging project tabs 2023-08-26 04:52:08 +03:00
Variable 2dfab468ff
remove old (pre 0.8) .pxo loading code (#904) 2023-08-25 10:04:36 +03:00
OverloadedOrama 5afbc1a4ec Attempt to fix #901 2023-08-20 21:45:35 +03:00
TheLsbt f515dbe57e
Add a silhouette option to reference images (#898)
* Added a silhoutte system to refrence images

* Added translations

* Fixed dialogs visibility

* SilhouetteShader.tres -> Silhouette.gdshader

* Update ReferenceImage.gd

Fixed the linter issue (mabey)

* Update PreferencesDialog.tscn

Copied the code from the Pixelorama's PrefrenceDialog.tscn to my fork.

* Update ReferenceImage.gd

Created a variable at the top of the script.

---------

Co-authored-by: TheLSBT1 <theflowcorporationofficial@gmail.com>
2023-08-15 01:56:43 +03:00
Emmanouil Papadeas 3c8c72401d Release v0.11.1-stable 2023-08-12 13:35:06 +03:00
Emmanouil Papadeas 332a06fb5e Add px suffix in PreviewDialog and new string in Translations.pot 2023-08-07 15:25:33 +03:00
Emmanouil Papadeas 87acad1b0a Change hint tooltip of "merge distance" in the preview dialog 2023-08-07 15:18:03 +03:00
Emmanouil Papadeas 346a416094 [skip ci] Change hint tooltip string of integer zoom 2023-08-06 20:29:40 +03:00
Variable edc6ba5944
Fix a bug in integer zoom (#896)
* Update CameraMovement.gd

* improvement to correction in fit to frame
2023-08-06 18:54:01 +03:00
Emmanouil Papadeas 74e3ff9f0b Add strings for translation 2023-08-06 18:03:56 +03:00
Variable 63091dc90c
Added integer zoom (#894)
* Temporary prevent main.tscn (remove later)

* Added integer zoom

* formatting

* add hint

* updated label text
2023-08-06 16:19:44 +03:00
Variable 42428595c5
Spritesheet Autoslicer (#893)
* Added autoSlicer

* Fixed the remaining things (Autoslicer fully functional)

* Update RegionUnpacker.gd

* Formatting

* formatting

* formatting

* neatify

* Update RegionUnpacker.gd

* formatting

* formatting

* Update RegionUnpacker.gd

* Update README.md

* Added region unpacker class

* Optimized the region unpacker, this should now be twice as fast

addon version: f01526e50db98eea6d4d69db3c241d360887af7f

* change Smart Slicer to 5745b26a6e0b7e10bc4a46d07b5f9f0dd8f26c96

5745b26a6e

* Delete addons/SmartSlicer/Shader directory

* removed shader

* Update SmartSlicer Version

278b1c5a80b2c8b89279e405156d556732ce98d2

* Formatting (This is torture LOL)

2578b74ba84289aa109ae715b4a6c90fd5e23126

* Delete addons/SmartSlicer/addons/SmartSlicer/Classes directory

* Formatting

Version remains same

* Delete SmartSlicePreview.gd

* use _draw instead of line2d

and moved SmartSlicerPreview.gd for better organization

* Formatting

* More formatting

* Fix bugs related to import

* fix crash on attempting to open empty image

as new spritesheet tab (smart)

* removed accidental print

* fix empty image warnings
2023-08-06 14:56:39 +03:00
Emmanouil Papadeas 17fc3d0fcb Support bmp and tga image files in the Web version 2023-08-01 21:16:54 +03:00
Emmanouil Papadeas 996fb17304 Fix error caused by #891 2023-07-31 02:23:03 +03:00
Variable eec986b466
Error elaborator (#891)
* elaborate error messages

* removed accidental change

for some reason godot changes main.tscn gets changed when i open it

* Update Main.tscn

removed accidental change part 2

* formatting

* formatting

* formatting

* lint ignore
2023-07-29 19:19:17 +03:00
Emmanouil Papadeas 51268362c6 Add palette file types as filters to the Open file dialog 2023-07-19 21:01:30 +03:00
Matteo Piovanelli 8fd306b734
Compress image data that is memorized for undo/redo operations (#890)
* Compress image data that is memorized for undo/redo operations

* Fixed formatting issues
2023-07-18 20:39:36 +03:00
Emmanouil Papadeas e195e32e00 Update translators 2023-07-16 15:24:14 +03:00
Emmanouil Papadeas 19f82021b8 Fix crash on generating a palette from the current project, and non-pixel cels exist 2023-07-09 15:48:49 +03:00
Emmanouil Papadeas 6e46cf0c8d Minor code/scene changes
Renames "Centralize" to "Center", as it is a more appropriate verb.
2023-07-08 17:47:24 +03:00
Emmanouil Papadeas 8ab4d05327 Don't save the project's name inside the pxo
Instead, get it from the file's name
2023-07-08 17:28:44 +03:00
Variable fa892e1fee
[ExtensionsAPI] New SelectionAPI and more project methods (#885)
* Added more project methods

* Added selection methods

* added resize selection

* formatting

* bug-fix
2023-07-06 02:52:27 +03:00
Variable 26aa9bda38
Move Centralize Image to the frame menu (#884)
* moved centralize to frame menu

And make it effect on selected frames

* Formatting (1 of 2)

* Formatting (2 of 2)
2023-07-05 02:00:36 +03:00
Emmanouil Papadeas a099e2195d Add offset image to Keychain 2023-07-04 14:52:48 +03:00
Emmanouil Papadeas 1372d12a8f Fix ease type and interpolation not remembering their selected options 2023-07-04 13:58:20 +03:00
Emmanouil Papadeas 08064098b8 Add an offset image effect
Some functionality as the move tool, but with more precision, wrap around ability and of course animation.
2023-07-04 03:29:58 +03:00
Emmanouil Papadeas 81c0b49c59 Add animatable properties to the Gradient effect 2023-07-04 00:20:55 +03:00
Emmanouil Papadeas eac7def5b4 Add allow greater and lesser to the image effect animatable property sliders 2023-07-03 22:51:52 +03:00
Emmanouil Papadeas 6dc07d0ca2 Rename get_animated_values to get_animated_value 2023-07-03 22:45:45 +03:00
Emmanouil Papadeas 605461e968 Add image effect animatable property translation strings 2023-07-03 22:26:31 +03:00
Emmanouil Papadeas 56f7b9ccde Add a new Timeline category in the Preferences
Revert 21b4f3369f, but make that behavior toggle-able in the Preferences. Also exposes the onion skinning colors for the past and future frames, and renames "Blue-Red Mode" to "Color mode".
2023-07-02 22:18:39 +03:00
Variable ae56cae587
ImageEffect Animation 2.0 (#879)
* Better Animate System

* checkbutton to checkbox

* fixed value and saturation sliders being divided by 360 (when they should be divided by 100)

* minor code cleanup

* moved frame index code to ImageEffect.gd

* code cleanup

* more cleanup

* preview animation is now possible

* fixing things

* only hide when affect == FRAME

* formatting

* formatting

* formatting

* renamed Animate.png and a minor improvement

* removed unintentional changes
2023-07-01 00:01:14 +03:00
Hamster 3dd4806154
Set alignment of the LineEdit in Export Dialog to Left (#880) 2023-06-22 00:12:20 +03:00