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

2130 commits

Author SHA1 Message Date
Emmanouil Papadeas 8732d366bf Use Control + Wheel to change brush size - implements #776
This is not editable in the shortcut settings and it is temporary way of doing this and it will change in Godot 4.x.
2022-11-10 17:36:09 +02:00
Emmanouil Papadeas 927e4f45a6 Update the dockable_container addon to 1.1.1 2022-11-09 15:09:14 +02:00
20kdc 20bce8175c
Reference Images (#771)
* Reference Images: Part 1

* Reference Images: Proper import workflow

* Reference Images: gdformat/gdlint checks

* Reference Images: Remove random src/Main.tscn changes

* Reference Images: Switch to ValueSliders, autowraps, fix opacity going out of range
2022-11-08 20:04:41 +02:00
20kdc 82acf3f8b1
APNG Exporter (#772)
* APNG: Initial refactorings of animation exporter internals

* APNG: Make ExportDialog actually able to handle multiple file formats

* APNG: Bugfix to FPS hint and such

* APNG: Refactoring: Fix file format propagation

* APNG: Make an "APNG exporter" which creates an empty PNG container

This was the testbed of the previous integration commits.

* APNG: The actual exporter!

* APNG: Remove random src/Main.tscn changes

* APNG: Format/lint

* APNG: Format & Lint, part II
2022-10-31 00:24:24 +02:00
Emmanouil Papadeas ac3d2baf87 Image effect dialog UI changes
All of the elements now expand vertically, and the Cancel and OK buttons are now bigger, thus easier to click.
2022-10-25 02:16:36 +03:00
Emmanouil Papadeas 7768bc92dd Change OpenSave.handle_loading_file to handle a single path
OpenSave.handle_loading_files() has been renamed to OpenSave.handle_loading_file and it now takes a single string as a parameter, instead of a PoolStringArray. This was needed for Main.gd's new _handle_cmdline_arguments() method. This method does not add any new functionality for now, but it will in the future.
2022-10-23 02:22:26 +03:00
mrtripie 5478d320dc
Fixes (#770)
Co-authored-by: MrTriPie <MrTriPie>
2022-10-22 01:32:26 +03:00
mrtripie e8281bf056
Animation Timeline UI Improvements (#769)
* Fixed link cel indicator color and animation tags position

* New scrolling and min size

* fixed dockable container for the timeline min size

* Cleanup

* Tweaked minimum size

* Removed some hacks that are no longer needed

* Fixed frame scrollbar not being in the right place at startup, added ensure_control_visible

* frame scroll horziontally without shift if can't scroll vertically + min size tweaks

* Renamed the frames/layer/cel containers

* Always scroll by whole frames

* Fixed conflict

* reoranized AnimationTimeline scene's node tree to wrok as expected

* tweaks

* Fixed tag position and removed uneeded layer button theme code

* added the icon theme code back, I thought this was for the timeline XD

* Smaller LayerButtons

* Save Layer and Cel size between sessions

* Combined _on_AddLayer_pressed and _on_AddGroup_pressed into 1 add_layer method

* Rename scroll container

* formatting

Co-authored-by: MrTriPie <MrTriPie>
2022-10-21 16:04:26 +03:00
Variable 88b102d9c6
Change layer adding behavior (#767)
* Add layers on top of current layer

* Adding on group makes it the group's child
2022-10-19 18:31:57 +03:00
mrtripie eb153d11a1
Keep colors on cel link sets (#766)
* Implemented except for clone layer bug

* more asserts

* Fixed the layer cloning bug

* gdformat

* Fixed new cels linked crash

* Fixed old .pxo files

* Removed default red color from LinkedIndicator in PixelCelButton scene

Co-authored-by: MrTriPie <MrTriPie>
2022-10-18 03:02:18 +03:00
Emmanouil Papadeas 82d63bd2e8 Fix crash when importing pxos older than v0.7 2022-10-17 03:18:05 +03:00
mrtripie 0faacafb16
Fix id_map error on open_pxo_file as well as grid being wrong size (#765)
Co-authored-by: MrTriPie <MrTriPie>
2022-10-17 02:21:28 +03:00
mrtripie 637662dee4
Linked Cel Refactor and Timeline Refactor Tweaks (#764)
* Updated PixelLayerButton's LinkButton's hint_tooltip to be more accurate

* Don't automatically link the current frame's cel when enabling new_cels_linked on a layer

* Mostly added new system

* renamed link group to link set

* Enable drag and drop of linked cels on the same layer

* formatted CelButton.gd

* serialize/deserialize

* Copy frames w/ new linked cels system. Removed copy_cel from layer classes

* Removed commented out code from AnimationTimeline.copy_frames

* Removed Project.duplicate_layers

* Removed unlink_cel in favour of using null with link cel (as the first part of that method was the same)

* Disabled show_behind_parent on PixelCelButton's LinkedIndicator, as it wasn't enough to improve visibility of selection

* Moved BaseLayer.copy out of the Methods to Override section

* Added optional texture param to Cel's set_content method (needed for use when deserializing, and otherwise helpful

* set textures with set_content where needed

* open_image_as_spritesheet_layer new_cels_linked part updated

* clone layer with linked cels implemented. Removed copy_all_cels from layer classes

* weaked how copied layers names are updated

* Merge layers works with new linked cels now

* Fixed texture on cel buttons not being updated on button setup

* fixed bug where using set_content with new image texture would result in an empty texture

* Open old .pxo with new linked cels

* simplified backwards compatiblity

* removed linked_cels

* better linked cels backwards compatibility

* Removed some old TODO comments

* fixed linked_cels conversion bug when linked_cels is empty

* Added undo for linking the previous cel when creating new cels with new_cels_linked enabled

* Removed TODOs

* Cleaned up some method variable naming

* Cleaned up deserialization

* combined matching for loops

* Inlined BaseLayer.copy() where its used

* gdformat

* Fixed Translations,pot

Co-authored-by: MrTriPie <MrTriPie>
2022-10-16 17:44:01 +03:00
Emmanouil Papadeas 9230f35d89 Add ValueSliders to Rotate and HSV dialogs 2022-10-15 14:10:08 +03:00
Emmanouil Papadeas 0c954e65d8 Add ValueSliders to Bucket and SelectionTool tool options
Replace Bucket's pattern offsets and SelectionTool's position and size SpinBoxes with ValueSliders.
2022-10-15 02:03:15 +03:00
Emmanouil Papadeas ed76cc05e9 Echo support for the ValueSlider arrows
If you press and hold an arrow button, the value will keep changing until you release. Replicates SpinBox's behavior. We should be able to replace any SpinBox now without losing any functionality.
2022-10-14 17:22:05 +03:00
Emmanouil Papadeas c3d07312aa Add arrow buttons to the value slider
Their visibility is toggleable. They also currently do not support echo events, since for some reason Godot only supports them for InputEventKey(s). I suppose this feature could be replicated with a Timer. Once this is done, we can replace all SpinBox nodes.
2022-10-14 02:51:55 +03:00
Emmanouil Papadeas 32fdea638b Simplify OutlineInline shader a bit 2022-10-10 19:58:40 +03:00
Emmanouil Papadeas c899957030 [skip ci] Update CHANGELOG.md 2022-10-09 13:25:34 +03:00
Emmanouil Papadeas fbe6ea9a97 Prevent data loss if the app crashes during save - Fix #763
When saving a pxo and a file of the same name already exists, the new file gets a temporary name (.pxo1 extension), and it gets renamed to its proper name if it's saved successfully (Pixelorama doesn't crash)
2022-10-07 02:16:15 +03:00
Emmanouil Papadeas 9f443f3ab0 Replace HSliders+SpinBoxes with ValueSliders in the tool options
Still WIP, the tool options may change even more later.
2022-10-05 00:42:01 +03:00
Emmanouil Papadeas 8e6fa45e5f Update default layout 2022-10-04 14:14:44 +03:00
Martin Novák 5842ce00c6
Add reactivity to palette grid, improve scrolling and add swatch "zoom" (#761)
* Save changed color to palette file only when color dialog is closed

* Restructure palette panel to use unique names

* Make grid size reactive to palette panel size

* Add mouse wheel scroll support to palette grid

* Add palette swatch resizing

* Reorganize palette grid rendering

* Store swatch size in cache config

* Cleanup formatting
2022-10-04 13:47:31 +03:00
Emmanouil Papadeas b299ab235c Change shrink slider to ValueSlider in the Preferences 2022-10-03 19:28:47 +03:00
Emmanouil Papadeas 8abbe0a1cb Use a ValueSlider in the window opacity dialog
More ValueSlider replacements coming next.
2022-10-03 14:43:08 +03:00
Emmanouil Papadeas 4c85f5b0ff [skip ci] Update splash screen artwork licenses 2022-10-02 00:51:06 +03:00
Emmanouil Papadeas f6de836fc7 Add setters for ValueSlider's prefix and suffix
This way we ensure the display is reset if the prefix or suffix changes.
2022-10-01 02:03:30 +03:00
Emmanouil Papadeas 9adf74392a Use notifications for theme and translation changes to update ValueSlider 2022-10-01 01:51:01 +03:00
Emmanouil Papadeas 52b3eae418 Allow for mouse wheel scrolling in ValueSlider 2022-10-01 00:14:54 +03:00
Emmanouil Papadeas 5664271b27 Allow disabling ValueSlider
Maybe we should make theme changes as well when it's disabled, but it's fine for now.
2022-09-30 12:08:44 +03:00
Emmanouil Papadeas fdfcd6ca1b Make uneditable LineEdit font color more readable in the light theme 2022-09-30 11:58:59 +03:00
Emmanouil Papadeas 59bc9f022d Replace opacity sliders with the new ValueSlider 2022-09-30 01:03:38 +03:00
Emmanouil Papadeas 963f9d05a0 Make ValueSlider a tool so it can be previewed on editor 2022-09-30 00:54:44 +03:00
Emmanouil Papadeas 8148d03c1f Add a custom ValueSlider node made by @mrtripie
And bump version to v0.11-dev
2022-09-30 00:07:56 +03:00
Emmanouil Papadeas af2b1feb1f Prevent undoing/redoing while drawing
Prevents errors (and potentially unwanted behavior) if attempting to undo while in the middle of drawing with the Pencil, Eraser of Shading tools. Needs more testing in case I broke something else.
2022-09-29 01:50:12 +03:00
Emmanouil Papadeas cc332c6cbf Only activate the right tool if action is pressed
Previously it was possible to hold the right mouse button while the left was being held, then release the left and once the right button is released, the right tool would get activated. This commit ensures that the right tool gets activated only on first press of the right mouse button, if the left isn't already activated.
2022-09-29 01:35:12 +03:00
mrtripie 1fa34d7196
Basic Layer Groups and Timeline Refactor (#698)
* Fixed issues with Shading tool Saturation and Value not always being right in Hue Shading mode

* Shading tool hue shifting fixes and tweaks

* Bringing over changes from layer groups brach, without any changes to layer blending

* Some quick fixes to make it work again

* Fixed some of the places where GroupLayers cause errors. Cel Buttons are now hidden when groups are collapsed

* Layer drag highlighting (need to actually drop them correctly, also need to do cels)

* Added more layer hierarchy related functions, organized the function order in the Layer classes a bit

* Switched the layer type changing from string to int

* Moved layer type enum to Global

* Added get_layer_type_name(), currently used for the default layer name

* Renamed the layer get_children/is_a_parent_of functions

* changed get_layer_type_name() to get_default_name(number)

* New layer drag and dropping behavior

* Added read/write_image_data_from/to_pxo functions to Cel classes to handle saving/loading the binary image data for each cel type

* Fixed warning

* Added a line to child layers wich makes it easier to see where they are in the hierarchy

* Fixed debugger warning

* Fixed all cel types loading as PixelCels

* Fixed spacing issue with cels when collapsing groups

* Fixed bug when dropping a child layer to the bottom region of its parent group, where it would end up to far down (maybe disappearing)

* updated temporary todo comments

* Created a base scene for layer buttons and merged layer button script into one

* Prevent the case of parenting to itself in layer drag and drop, fixed static reference to LayerButton still being BaseLayerButton

* Use a base scene for CelButtons

* First bit of the refactoring work

* Several bits of refactoring

* Fixed moving cels

* Cleaned up Project.move_cel function

* Fixed project_layer_removed

* Updated change_frame_order on FrameButton. Some (not all) work on getting the layer UI updated when pressing buttons such as collapse/visible/lock

* Bug fixes. Updating layer button's buttons

* Fixed timeline selection issues when creating a new project. Some code cleanup

* tweaks

* Removed a bunch of commented out code

* Removing more commented out code

* Fixed bugs with timeline selectio. Fixed cels being placed in the reverse layer order when adding a frame

* Changed add/remove_frame to add/remove_frames (multiple support)

* Refactored copy_frames in animation timeline

* added copy function to cel classes

* added layer copy function

* simplifed copy_frames a tiny bit

* Updated TODO comments to categorize them and remove any that were already done

* Turned Project.add/remove_layer into Project.add/remove_layers (multiple support), not yet tested

* Seperated the layer cloning functionality in timeline's add_layer to its own function, since they're only used by one button, renamed to _on_Button_pressed naming scheme, added children support to the delete layer button

* some TODOs

* Added layer swapping

* Added priorities to refactor TODOs

* Simplified layer swapping code a little

* Fixed performance regression on changing project, updated TODOs

* Included _on_MergeDownLayer_pressed in timeline refactor

* Cleaned up _on_MergeDownLayer_pressed refactor

* If all frames are selected, prevent being able to remove all of them

* Fixed cel linking when cloning layers/frames. Moved the copy function from cel classes to layer classes, splitting into copy_cel and copy_all_cels

* Combined and rewrote the 2 project _toggle_layer_buttons_.. functions into 1 simpler _toggle_layer_buttons function

* Simplified _toggle_layer_buttons some more

* Added hierarchy support for move up/down layer buttons

* Added toggle_frame_buttons method to project (extracted from  _frame_changed). Called from main when setting up startup project. Removed _ from start of _toggle_layer_buttons name

* Fixed duplicate_layers parent references being to the original layers

* cleaned up project.move_layers method a bit

* TODOs

* moved the transform_content_confirm calls for the layer buttons in AnimationTimeline (Add/remove/clone) to the project layer modification functions

* animation first/last_frame tweaks and un-press play buttons when the first/last_frame are the same in _on_AnimationTimer_timeout in AnimationTimeline

* Cleaned up project_changed in ANimationTimeline a bit

* Cleaned up project_layer_added in AnimationTimeline

* Changed Layer classes get_default_name to set_name_to_default

* Cleaned up LayerButton.drop_data slightly

* Looked at some of my TODOs

* cleaned up copying cels

* Fixed CelButton linked_indicator not showing up right away when becoming linked

* Cleand up link/unlink cel menu option a little. Fixed situatoin where trying to call button_setup on cel_button that doesn't exist anymore due to undo/redo

* Fixed regression with copy_cel (linked) in when cloning a frame

* Minor cleanup, more detailed comments, updated TODOs

* more improved comments

* Made focus_mode on Cel/Layer/FrameButton NONE to fix bug where it looks like one is selected after pressing it and adding a new Layer/Frame (but its just in the focus state, not the pressed state

* Made AnimationTimeline.change_layer_order work a little more consistantly with LayerButton.drop_data, and fixed a minor bug in it

* Updated comments and TODOs

* cleanup

* removed some code that should no longer be needed

* updated comment

* removed Project's frames and layers setters _frames_changed and _layers_changed

* Made some 'for x in range(array.size())' just 'for x in array.size()'

* updated comments/TODOs

* Cel content changes intial

* Added 'content' methods to Cel classes

* Removed image var from PixelCelButton

* Reusing PixelCelButton.gd on GroupCelButton scene

* Renamed PixelCelButton.gd to CelButton.gd (as it will be used for all Cel Buttons) and deleted GroupCelButton.gd

* Hide the TransparentChecker on GroupCelButton.tscn until a preview texture is added for GroupCels

* TODOs, prevent memory leak when closing projects

* Link/unlink cel cleanup
:

* Added _project param to _init methods of Layer classes

* Added update_texture method to Cel classes (moving part from the update_texture and update_selected_cels_textures methods from Canvas.gd

* Removed a temporary check (which also fixed another bug)

* Clone child layers when cloning a layer

* Added temp dummy get_image method to GroupCel, and use get_image when copying or picking colors

* TODOs

* Made open_image_as_spritesheet_layer work after the timeline refactor (still doesn't work with groups yet though). TODO comment updates

* Added create_new_cel methods to Layer classes

* Updated TODOs and comments

* Renamed Layer class's create_empty_cel to new_empty_cel to match Project's new_emtpy_frame

* Renamed create_layer/cel_button to instantiate_layer/cel_button

* updated TODOs

* prioritized TODOs

* Fixed some warnings

* removed commented out code from previous commit

* Fixed export

* Made open_image_as_new_frame work after timeline refactor

* Fixed open_image_as_new_layer after timeline refactor

* Some linked cel fixes

* More linked cels fixes

* cleanup

* Optimized importing spreadsheet as new layer

* Fixed Scale Image crash with Groups

* Fixed onion skin with groups

* Removed blend_mode from BaseLayer for now

* Mostly fixed image effects

* Fixed resize canvas

* Fixed drag and drop not working with Cel Buttons on Group Layers

* updated TODOs

* Renamed Replace Frame (in open image) to Replace Cel

* Continued renaming Replace Frame to Replace Cel

* Made open_image_at_cels work after timeline refactor

* Added get_layer_path method to BaseLayer

* Replaced AtLayerSpinbox with AtLayerOption for Open Image as New Frame or Replace Cel

* Updated TODOs

* updated TODOs

* Comments for cel content methods

* fixed right clicking group cel button deselecting the button (even though cel is still selected

* frame/layer modification methods comments

* Removed unneeded size flags

* TODO updates

* Removed a loop that would never run from open_image_as_spritesheet_tab

* TODO update

* Combined BaseLayer.get_children_direct and get_children_recursive into a single get_children method with a bool for recursive. Added a get_child_count method

* Removed unneeded frame paramaters from _on_DeleteFrame_pressed and _on_CopyFrame_pressed

* TODO Updates

* Removed unneeded code from delete_frames

* Made delete_frames variable names more consistent with my other changes

* Continuation

* made variable names in copy_frames more consistent with rest of changes

* Update TODOs

* Removed TODOs for after this PR (moved to my notes)

* Fixed crash when pasting image on Group

* Fixed layer .visible check to be is_visible_in_hierarchy()

* Removed some drag highlight polish code that didn't work

* Removed code from Canvas update_texture and update_selected_cels_textures that was redundant

* gdformat

* gdformat

* gdlint fixes

* Fixed Cel button not having its linked indicator show when enabling new cels linked on a layer other than the current layer

* Fixed crop image and centralize image

* Added '# gdlint: ignore=max-public-methods' to the top of Project'

* Fixed dragging cels to layer of different type crash

* Formatted CelButton.gd

Co-authored-by: MrTriPie <MrTriPie>
2022-09-28 21:59:49 +03:00
Emmanouil Papadeas 5914471149 Release v0.10.3-stable 2022-09-26 17:40:15 +03:00
Emmanouil Papadeas a04077569a [skip ci] Add licenses to some of the splash screen artworks 2022-09-26 17:05:13 +03:00
Emmanouil Papadeas 2b3da1f591 On delete, only create a blank image if there's a selection
If there is no selection, the entire image becomes transparent, so there is no need for a blank image to use with blit_rect_mask()
2022-09-25 19:02:13 +03:00
Emmanouil Papadeas b9bab0aa5e [skip ci] Update CHANGELOG.md 2022-09-24 03:43:07 +03:00
Emmanouil Papadeas 7056072e8f Bump version to v0.10.3-rc1 2022-09-23 16:16:58 +03:00
Emmanouil Papadeas 9e4148fc54
New Crowdin updates (#751)
* New translations Translations.pot (Chinese Simplified)

* New translations Translations.pot (Romanian)

* New translations Translations.pot (Ukrainian)

* New translations Translations.pot (Portuguese, Brazilian)

* New translations Translations.pot (French)

* New translations Translations.pot (Arabic)

* New translations Translations.pot (Vietnamese)

* New translations Translations.pot (Russian)

* New translations Translations.pot (Serbian (Cyrillic))

* New translations Translations.pot (Swedish)

* New translations Translations.pot (Ukrainian)

* New translations Translations.pot (Chinese Simplified)

* New translations Translations.pot (Chinese Traditional)

* New translations Translations.pot (Portuguese, Brazilian)

* New translations Translations.pot (Polish)

* New translations Translations.pot (Indonesian)

* New translations Translations.pot (Latvian)

* New translations Translations.pot (Hindi)

* New translations Translations.pot (Esperanto)

* New translations Translations.pot (Malayalam)

* New translations Translations.pot (Sinhala)

* New translations Translations.pot (Portuguese)

* New translations Translations.pot (Dutch)

* New translations Translations.pot (Turkish)

* New translations Translations.pot (Danish)

* New translations Translations.pot (Romanian)

* New translations Translations.pot (French)

* New translations Translations.pot (Spanish)

* New translations Translations.pot (Afrikaans)

* New translations Translations.pot (Catalan)

* New translations Translations.pot (Czech)

* New translations Translations.pot (German)

* New translations Translations.pot (Korean)

* New translations Translations.pot (Greek)

* New translations Translations.pot (Finnish)

* New translations Translations.pot (Hebrew)

* New translations Translations.pot (Hungarian)

* New translations Translations.pot (Italian)

* New translations Translations.pot (Japanese)

* New translations Translations.pot (Norwegian Bokmal)

* New translations Translations.pot (Romanian)

* New translations Translations.pot (French)

* New translations Translations.pot (Russian)

* New translations Translations.pot (Turkish)

* New translations Translations.pot (Italian)

* New translations Translations.pot (Japanese)

* New translations Translations.pot (Ukrainian)

* New translations Translations.pot (German)

* New translations Translations.pot (Indonesian)

* New translations Translations.pot (Indonesian)

* New translations Translations.pot (Greek)
2022-09-23 15:30:40 +03:00
Emmanouil Papadeas 60f737f53d [skip ci] Update CHANGELOG.md 2022-09-23 00:04:57 +03:00
Emmanouil Papadeas 92e0e7e11c Clear some code in HandleLanguages.gd
Got rid of the second for loop, so maybe this is a minor speedup as well.
2022-09-22 23:22:40 +03:00
Emmanouil Papadeas 5c664b1880 [skip ci] Remove old splash screen artwork 2022-09-22 22:56:29 +03:00
Emmanouil Papadeas 64746d9f31 Create a _popup_dialog() method in TopMenuContainer.gd to reduce lines of code 2022-09-22 18:02:01 +03:00
Emmanouil Papadeas b095fae462 Don't let menu shortcuts work if there's a dialog open
Continuation of the fix for #709
2022-09-22 17:46:22 +03:00
Emmanouil Papadeas 3104e481f0 Fix #709 and allow for non-keyboard shortcut bindings for tools 2022-09-22 17:32:07 +03:00
Emmanouil Papadeas 5693a0fe0e Make ShortcutEdit a VBoxContainer again
If it's not a VBoxContainer, the Tree's scrollbar does not appear. I'm not sure why this happens.
2022-09-22 17:26:18 +03:00