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

241 commits

Author SHA1 Message Date
Emmanouil Papadeas 7001f3a28b Remove NotificationLabel.tscn, use class_name for notification labels 2023-01-15 17:08:42 +02:00
Variable e1facda618
Added Class System to ExtensionsAPI (#808)
* Added Class System to Api

* formatting

* removed extends

* update extension version

* Added Some New Fail-Safes

* fix typo

* Formatting

* Update ExtensionsAPI.gd

* Typo

* formatting

* formatting
2023-01-10 19:26:13 +02:00
Variable 449ee60d49
Folders rearrangement (#804)
* Moved Reference Images to it's Folder

* Moved the rest to their respective folders

* formatting

* Fix formatting

I removed the `PackedScene` static typing declaration to reduce the number of characters in the line to less than 100. It's not really needed anyway, as Godot should be able to figure out that it's a PackedScene, since it's a tscn file, simply by using `:=`.

* reverting some changes

* Removed some un-expected things

* Fixed TransparentChecker Code

* fix typo

* Revert it

I didn't realize it was intended

* Removed unneded changes

* removed some unexpected changes

Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2023-01-05 17:54:22 +02:00
20kdc 4658b1cfb6
APNG Loading (#797)
* APNG loader: Import addon to take over APNG handling

* APNG loader: Transition code to using the AImgIO addon

* APNG loader: Can now open APNGs.

* AImgIO: Update to fix bugs

* APNG loader: HTML5

* APNG loader: gdformat/gdlint addon

* APNG loader: OpenSave formatting fix

* APNG Loader: Add ignore line to OpenSave because it's too big

* Fix GIFAnimationExporter bug caused by the switch to the addon
2022-12-23 20:08:46 +02:00
Emmanouil Papadeas 3ef73eacea Expose GLES driver to the preferences
Users can now change from GLES2 to GLES3 and vice versa. The change requires a restart of Pixelorama to take effect. Does not have any effect if Pixelorama is being run from the Godot editor. I suppose we should add logic that detects if GLES3 is even supported in the first place in that device before allowing it as an option, but at least I enabled GLES2 fallback in the project settings, so it *should* fall back to GLES2.
2022-11-29 19:58:24 +02:00
Emmanouil Papadeas 4d113d37e5
Export dialog UX overhaul (#781)
* Remove animation tab from the export dialog, unify it with the first tab

* Tidy up the UI using GridContainers

* Make ExportDialog a ConfirmationDialog and clean some code

* Make project a parameter in export methods

This will be useful in the future for exporting multiple projects at once via terminal arguments

* Add a layers option in the export dialog

Currently only visible layers and selected layers, need to add specific layer selection and handle group blending properly.

* Align everything to the left

* Change "directory" into "folder"

* Make animation direction affect spritesheets and multiple png exporting

Besides just gifs and apngs

* Minor code re-organization

* Keep spritesheet options when changing tab

* Use the Unicode multiplication sign in the dimension label

* Specific layer exporting with group blending support

* Change file format cursor mode to pointing hand instead of forbidden

* Add a new custom CollapsibleContainer node and use it for advanced settings in the export dialog

* Change Popups node into Control so its children will automatically inherit the theme

* Add the TextureRect of the CollapsibleContainer in the UIButtons group

* Update ExportDialog.gd

* Disable "Create new folder for each frame tag" when gif/apng is selected, and hide it completely on the spritesheet tab

* Fix "Create new folder for each frame tag" being visible even if the CollapsibleContainer's button is not pressed

* Show layer path for each layer in the export dialog's "Layers" option

* Update translations

* Update strings
2022-11-28 21:22:29 +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 8148d03c1f Add a custom ValueSlider node made by @mrtripie
And bump version to v0.11-dev
2022-09-30 00:07:56 +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 7056072e8f Bump version to v0.10.3-rc1 2022-09-23 16:16:58 +03:00
Emmanouil Papadeas 266276d933 Re-arrange input events 2022-09-19 15:32:25 +03:00
Emmanouil Papadeas a64f102b9a Change paste placement behavior
Paste now places the pasted content in the middle of the canvas view, instead of its original position. A new option in the Edit menu has been added, "Paste in Place", that preserves the previous behavior. This is similar to how GIMP works.
2022-09-15 00:08:22 +03:00
Emmanouil Papadeas 7558c2c891 Add an ExtensionsAPI version
This lets us keep track of changes in the Extensions API easier.
2022-09-14 01:16:39 +03:00
Emmanouil Papadeas 1c2f4c5350 Bump version to v0.10.3-dev 2022-08-27 23:52:23 +03:00
Emmanouil Papadeas 1f828981d8 Enable hiDPI 2022-08-26 16:40:38 +03:00
Emmanouil Papadeas 70cb9b6b1b Release v0.10.2-stable 2022-08-18 15:39:50 +03:00
Emmanouil Papadeas e495f1f260 Add Danish language 2022-08-14 16:06:46 +03:00
Emmanouil Papadeas 6faf3baa20 Update version to v0.10.2-rc1 2022-08-12 18:40:23 +03:00
Emmanouil Papadeas c66cac2fd8 Add an interpolation OptionButton to GradientEdit 2022-08-09 02:02:46 +03:00
Emmanouil Papadeas 494397502a Enable low processor mode on Android
It should no longer have issues with Godot 3.5
2022-08-09 00:53:47 +03:00
Emmanouil Papadeas 41ccc704c2
Refactor the selection system to use an Image instead of a BitMap (#710)
* Use Image instead of BitMap for selection

Not complete and Pixelorama is currently broken

* Add a SelectionMap class

* Make the changes in Selection.gd

* Remove selection_bitmap

* Replace duplicate() with copy_from()

* Fix selection

Intersection and transforming are not working

* Fix wrong pixel color values

* Fix selection transforming

* Call selection_bitmap_changed() on scale

* Fix clipboard

* Remove bitmap_to_image()

* Rename selection_image to selection_map

* No errors in Magic Wand

* Rename selection_bitmap_changed() to selection_map_changed()

* Format

* Fix selection resizing

* Remove a line from image effects

* Fast selection inverting using shader

* Update SelectionMap.gd

* Format

* Convert SelectionMap back to LA8 after inverting

* Minor refactor in RectSelect.gd

* Fix intersections

* Use shader for ColorSelect and add color similarity option

* Update RotateImage.gd
2022-08-08 03:03:17 +03:00
Emmanouil Papadeas dcb963d733 [Experimental] Add a basic ExtensionsAPI autoload
This is still experimental, it is not recommended to start actually using it yet.
2022-07-02 19:24:44 +03:00
Grant Moyer aadad462b9
Add options for custom tile mode offest (#707)
* Add preferences for tile mode basis vectors

Each tile is offset according to the x and y basis. For example, a tile (1,1) would be at basis_x + basis_y

* Update tools for custom tile modes

Show the indicator in the correct position, and only draw on the nearest tile.

* Fix style issues

* Move tile functionality to own class to prevent bloating Project

* Fix error in Tiles bounding box logic

* Make tile mode offsets project settings

Since the desired tile mode offsets depends on the tile being drawn, the tile mode offsets should be a project specific setting which is persisted in the project file.

* Update TileMode object immediately after closing dialog

* Don't draw center tile by default in TileMode

* Move tile mode offsets to view menu

* Move tile mode offsets dialog out of ImageEffects
2022-06-20 12:07:20 +03:00
Emmanouil Papadeas c18cfc627c Update project.godot 2022-06-13 15:13:08 +03:00
Emmanouil Papadeas c9f0301c79 Add a Gradient Map image effect, implements the second half of #595
The gradient edit code was taken and modified from Material Maker, MIT license.
2022-06-11 16:16:37 +03:00
Emmanouil Papadeas e4607a46bc Release v0.10.1-stable 2022-06-06 15:43:51 +03:00
Emmanouil Papadeas d13814b9b9 Change version to v0.10.1-rc1 2022-06-01 16:05:50 +03:00
Emmanouil Papadeas 2ae7d638d4 Add missing menu shortcuts 2022-05-21 00:50:39 +03:00
Emmanouil Papadeas da65380169 Made left and right tool activation shortcuts configurable
Mapped to left and right mouse buttons respectively by default, as well was L1 and R1 buttons respectively in joypads. This commit should allow mouse-free drawing, since it's now possible to activate the left and right tools via joypad and keyboard buttons, thanks to the Keychain plugin.
2022-05-17 01:25:50 +03:00
Emmanouil Papadeas d028582f27 Move cursor with numpad arrow keys, joy d-pad and left stick
Similar to GraphicsGale, you can now draw without moving the mouse. Although you still need the mouse for the left and right buttons, but I'd like to make give more options to the user as well so that they can activate tools using keyboard and joypad buttons, if they like.

The numpad arrow keys did nothing previously, so nothing changes for people who are not interested in this feature. They are also configurable thanks to the Keychain plugin.
2022-05-16 21:50:19 +03:00
Emmanouil Papadeas a98424e474 Rename "confirm" and "cancel" input events
Into "transformation_confirm" and "transformation_cancel" respectively.
2022-05-16 20:01:17 +03:00
Emmanouil Papadeas f509dfb9f6
Implement the Keychain Plugin (#700)
* Start implementing the godot_better_input plugin

* Update ShortcutEdit.gd

* Load & save preset option

* Add some groups and fix action events not being deleted on load

* Add MenuInputAction class for multiple menu accelerators

* Create a proper plugin and a BetterInput autoload

* Update menu accelerators

* Move settings to BetterInput

* Move menu enums to Global, make more MenuInputActions

* Add more menu events

* Add new groups

* Optimize BetterInput _input() method

* Remove a lot of lines of code

* Change some previous events, add ignore actions and a View menu group

* Change update_item_accelerator to update_ui

* Move MenuInputAction initialization to BetterInput.gd

* Update hint tooltips when a shortcut changes

Temporarily comment out some code regarding the configurable modifiers

* Some MenuInputAction variable name changes

* Add handle_input() to InputAction

* Update the shortcuts of buttons

* Fix shortcut selector menu position

* Change plugin name into Keychain

* Fix keyboard input dialog exiting when Enter or Space is being pressed

* Add two more groups

* Make groups folded by default

* Temporarily make tool modifier shortcuts not configurable

A temporary change, they will be made configurable again, with different actions that are currently mapped to the same events, local/independent from each other.

* Add license for Keychain

* Fix issue where a key event would be added in other input types

* Fix bug where the assigned state was not updated when the dialog appeared again

* Update Main.tscn

* Add a disabled line edit in keyboard shortcut selector to grab focus

* Load presets in the Keychain autoload

This way, the input actions get updated from the start, instead of only at the ShortcutEdit scene.

WARNING, this currently causes crashes if the menu items have no shortcut binded to them.

* Move custom settings away from Keychain.gd

To keep it the same as the upstream plugin

* Change menu enum names

* Made action_get_first_key() more general

* Use arrays for menu items instead of dictionaries, fixes crash

* Move moveable panels to Window menu

* Format

* Optimize hint tooltip updating

* Add support for translations in Keychain

* Translation changes

* Made tool modifiers configurable

Needs more testing.

* Made camera arrow key movement configurable & joypad axis support

This commit removes the ability to press Shift and Control+Shift to adjust the camera arrow key movement speed. Instead, the speed depends on the zoom level.

The right joypad analog stick is configured to move the camera by default.

* Rename presets into shortcut profiles, use Resources and let users create their own

* [skip ci] Update addons README

* Update Global.gd
2022-05-16 15:07:51 +03:00
Variable 16a2abf9b4
Added shortcuts (#673)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* Added all shortcuts

* formatting

* Removed 1 shortcut from "Fullscreen"

* Assigned shortcuts to special behaviours

* formatting

* Added configurable shortcuts to special behaviour

* formatting

* Added special behaviour shortcuts and some code im

provements

* a minor fix
2022-04-27 15:03:39 +03:00
Emmanouil Papadeas 966fce3b1e Bump version to v0.10.1-dev 2022-04-24 16:10:13 +03:00
Manolis Papadeas 2152412432 Release v0.10-stable 2022-04-15 15:40:16 +03:00
Manolis Papadeas d547678ebd Bump version to v0.10-rc1 2022-03-29 20:04:39 +03:00
Manolis Papadeas a7110e4be4 Change documentation shortcut to F1
F1 is commonly used for help in most software.
2022-02-17 00:28:23 +02:00
Manolis Papadeas e2bb0b8440
New UI system using Dockable Containers (#640)
* Add dockable container plugin

Experimenting with it, also added a tabs_visible property to the DockableContainer. Removed some code about Tallscreen from Main.gd, but not all of it.

* Add a panel behind the UI, temporarily restore the dark theme

* Remove tallscreen code

* Add edit mode, toggles DockableContainer's tab visibility on and off

* Split tool options into color pickers, left and right tool options

* Remove alternate_transparent_background

* Re-order tool buttons on resize

* Clip content in timeline

* Changes to the tool panel

* Removed some old unused node variables

* Restore Zen mode

* Set tabs_visible = false by default

* Better way to set tabs_visible = false by default

* Added the license of godot-dockable-container

* Remove unneeded lines

* Update README.md

* Restore window transparency with the canvas

It makes all of the TabContainers transparent however, which may not be what we actually want.

* Change tab names of the UI elements

* Remove unneeded nodes from ColorPickers.tscn

* Update default.tres

* Let the user hide elements individually

* Add some checks in HandleThemes

* Center tool icons

* Remove unneeded custom panel in SplashDialog

* Bump version to v0.10-dev and some other minor changes

* Fix crash on Zen Mode

* Added a hacky way to fix the issue with the palette panel size
2022-01-30 00:47:25 +02:00
Manolis Papadeas 2649f0e2b8 Added Portuguese 2022-01-27 20:45:26 +02:00
Manolis Papadeas 686a49d4c5 Release v0.9.2-stable 2022-01-21 16:03:53 +02:00
Manolis Papadeas f18146a9c8 Bump version to v0.9.2-rc1 2022-01-13 18:54:11 +02:00
Manolis Papadeas 500a4827d2 Use Godot 3.4.2 and re-enable window transparency on macOS 2022-01-03 14:23:48 +02:00
Manolis Papadeas aac30d9c76 Bump version to v0.9.2-dev 2021-12-25 12:41:52 +02:00
Manolis Papadeas 50885b8769 Release v0.9.1-stable 2021-12-20 13:45:53 +02:00
Manolis Papadeas 92c252e22d Fixes #618 2021-12-15 01:39:24 +02:00
Manolis Papadeas 9966b22bc2 Bump version to v0.9.1-rc1 2021-12-12 17:21:21 +02:00
Manolis Papadeas 1278553c80 Update to Godot 3.4 2021-11-09 17:06:11 +02:00
Manolis Papadeas 15bf5c96c5 Update project.godot 2021-10-08 16:36:34 +03:00
Manolis Papadeas 721cab8765 Minor changes that make Pixelorama work with Android
Just planting the seeds of a possible Android version, probably tablet-only, at least at first. I do not know when that will happen yet.
2021-10-02 15:08:58 +03:00
Manolis Papadeas 6ebead2e6f Remove the Meta key from shortcut combinations 2021-09-27 13:40:04 +03:00
Marquis Kurt cad464eb99
(Port) Port Pixelorama to Ubuntu Touch (#517)
* Add support for creating Ubuntu Touch click packages.

The clickable directory contains the files necessary to create a
click package designed for Ubuntu Touch, a community-driven Linux
distro for mobile phones as an alternative to iOS and Android.

A new CI script has been added to create the packages, which is
copied over from one of my other projects. Please change this to
suit your needs.

A new custom feature "clickable" has been added to the project
settings to allow customizations for the Ubuntu Touch platform.

Signed-off-by: Marquis Kurt <software@marquiskurt.net>

* Make clickable CI follow more closely to desktop builds

* Remove sudo from clickable install step

* Install software-properties-common

* Comment out docker startups in click install

* Change export name for Click version

* Change name and export mode to pack only

* Change means of copying data to clickable dir

* Install sudo to docker

* Add -g to docker add user

* Remove docker user creation

* Remove other chpasswd stuff

* Split CI into two jobs

* Make build-ubports.sh runnable

* Use HiPDI GUI theme on Clickable

* Move clickable folder to Misc, add release CI targets

* Add mobile to clickable settings

* Add pixelorama_data to install data

* Create pixelorama_data subdir in click itself

* Change default save dir for clickable

* Update AppArmor policy

* Update clickable version to test AppArmor

* Revert changes and use user data dir

* Add README pertaining to Ubuntu Touch

* Remove GODOT_MAC_VERSION from UT port workflow

Co-authored-by: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2021-09-25 13:42:31 +03:00
Manolis Papadeas d584ae0839 Launch of version 0.9 - selections & shapes update 2021-09-18 18:59:15 +03:00
Manolis Papadeas 3d0d0b0335 Bump version to v0.9-rc3 2021-09-06 17:21:10 +03:00
Manolis Papadeas c52870984e Bump version to v0.9-rc2 2021-09-02 21:02:53 +03:00
Manolis Papadeas e088820c74 Bump version to v0.9-rc1 2021-08-28 20:01:05 +03:00
Manolis Papadeas 180c775b72 Disable per pixel transparency for OSX
As a temporary workaround for #491
2021-08-24 17:34:58 +03:00
Manolis Papadeas 0d64b03fbf Bump version to v0.9-beta 2021-07-05 22:49:08 +03:00
Manolis Papadeas db0799bc12 Added Ukrainian 2021-06-21 00:24:39 +03:00
Manolis Papadeas feece75935 Added Norwegian Bokmål 2021-06-11 19:38:34 +03:00
Manolis Papadeas 64e9d14a0e Use Texture resources instead of Image for tool cursor icons 2021-05-31 21:39:33 +03:00
Manolis Papadeas bd84fbbe39 Rename the Lighten/Darken tool to Shading tool 2021-05-26 02:17:49 +03:00
Manolis Papadeas a77cc05446 Made brush creation from selection a separate menu option
Also works with Ctrl+B. Copying no longer creates a project brush.
2021-05-25 22:48:37 +03:00
Manolis Papadeas 5b6f4ebe3e Added Polygon selection tool
Cursor icon is temporary. It works by clicking multiple times on the places you want to create edges, and to complete the polygon you either have to click at the first edge (if you hover the mouse, a circle appears in that position), or you can auto-fill by double clicking.
2021-05-18 01:56:55 +03:00
Manolis Papadeas b8d055fe01 Added lasso / free select tool
Temporary icon, probably. Should work without problems, but more testing would be nice.
2021-05-16 03:52:13 +03:00
Manolis Papadeas d13c5c1063 Added ellipse selection tool
Icons most likely temporary. A bit problematic when the selection is in negative coords and the preview does not work well with mirroring and mirror view. Same is true for the shape tools.
2021-05-14 03:48:33 +03:00
Manolis Papadeas 99ce07b3ab Added a new line tool
One of the most requested tools has finally been added!
2021-05-12 04:35:20 +03:00
Manolis Papadeas 0a35615c24 Added a displace origin option to Rectangle, Ellipse and Rectangle Selection tools
Works with Mouse Click + Alt. Needs to be documented in the tooltips.
2021-05-03 03:11:12 +03:00
Manolis Papadeas 4a1fcc4ca7 Add position and size as selection tool options
This allows the user to easily move and resize selections
2021-05-01 03:10:23 +03:00
Manolis Papadeas 320c538bc3 Add enter and escape as input actions 2021-04-23 23:47:42 +03:00
Manolis Papadeas ae48907660 Bump version to v0.9-dev and use Godot 3.3 in GitHub Actions 2021-04-23 18:31:12 +03:00
Darshan Phaldesai dca76afe17
Shader based invert, desaturate and HSV dialogs (#475)
* Shader based invert, desaturate and HSV dialogs

* Bug fixes
2021-04-21 05:31:33 -07:00
Manolis Papadeas d70c6a22c4 New tool: Magic Wand (temporary icon) 2021-04-20 15:53:16 +03:00
Manolis Papadeas fccd37360a New tool: Select by Color (temporary icon)
When the user clicks on a pixel, all pixels of the same color are being selected. Shift adds to the selection, Ctrl subtracts. The icon and the hint tooltip are temporary.
2021-04-19 18:50:43 +03:00
Manolis Papadeas 27cb0d2d2f
New selection system (#474)
* Basic move tool

* Added marching ants effect on the selection borders

* Rename SelectionRectangle to SelectionShape, make it have non-rectangular shape and multiple SelectionShapes can exist

- Create multiple selection rectangles
- Merge them together if they intersect
- Move the selections (without contents as of right now)
- Gizmos are being drawn but they are not functional yet

Code is very ugly.

* Sort vectors counter-clockwise to be used as polygon borders

I did this, no idea if it works properly, probably won't be used but I thought I'd keep it saved somewhere

* More experiments I may or may not need

Trying to generate a polygon from the individual selected pixels

* Change default rectangle select behavior and ability to clip polygons using Control

* Fix rectangle selection clipping

* Split polygon into two with selection subtracting

* Move selection with contents with the move tool

Code is still a mess, don't bother looking.

* Move some methods from SelectionShape.gd to Selection.gd

The purpose of this is to generalize some selection code, so that it applies to all polygons, the entire selection. More will follow.

* UndoRedo for border moving

Nothing else in the selections system works properly in UndoRedo right now. Needs:

- UR support for creating selections
- UR support for modifying selections (merging and cutting selections together)
- UR support for removing selection
- UR support for moving content

& for all the rest of the remaining features

* Moving all of the selection shape logic to Selection.gd

Handle all of the polygons there instead of having them as individual nodes. Should be easier to handle undo/redo this way. This commit probably breaks move tool + selection tool and undo/redo. Code is still a mess. For your sanity, I hope you are not reading this. I promise I will clean up.

* Move tool works again

Buggy and messy, of course.

* Remove unneeded code and restore selection move undoredo logic

* Made Selection.gd have one big preview_image for when moving content, instead of each polygon having its own image

Could be further optimized for some specific cases. We could also remove selected_pixels from SelectionPolygon.

* UndoRedo support for creating, deleting, merging and clipping selections

UndoRedo support for moving content not added in this commit. Should work but needs more testing. This PR also removes selected_pixels from the SelectionPolygon class.

* Confirm & cancel selection movement, should support undoredo properly too

Press Enter or do any editing to confirm movement, Escape to cancel. I will most likely add UI buttons for confirm and cancel too.

* Mirror View affects selection

* Restore Cut, Copy, Paste and Clear Selection

Pasting now no longer requires a pre-existing selection and instead copies the selections themselves too.

* Created a new Select menu, which has Select All and Clear Selection as options

Clear Selection now also confirms content moving. TopMenuContainer code has changed to no longer rely on Global for the menu buttons.

* Draw gizmos as rectangles

No functionality yet. They may need to be turned to nodes, so that they can easily resize based on zoom level and check for mouse enter/exit events.

* Made gizmos get drawn in the sides and corners of the big bounding rectangle instead of individual selection parts

Still no functionality yet.

* Restore label text

* Minor optimization when clipping selections

This will execute the for loop less times

* Made a Gizmo class, cursor change on hover, has_focus = false on mouse click

Now I should actually make them resize when dragged, aye?

* Very basic gizmo resizing, still a WIP, does not work properly yet

* Start replacing the array of selected pixels with a BitMap

This should optimize the selection making a lot, and it also allows for easy border drawing without having to deal with polygons, thanks to the MarchingAntsOutline.shader

Still commit is still a WIP, image effects and brushes may not work properly yet.

Because the BitMap has a fixed size, the size of the project, moving the selection outside of canvas boundaries has proven to be a bit tricky. I did implement a hacky way of handling it, but it may be buggy and problematic. I'm still unsure whether this is the best way to handle the situation.

* Selection works with mirror view

* Draw a black rectangle when the user is making a rectangular selection

After they release the mouse, the black rectangle becomes the selection

* Make Selection.gd update when undoing/redoing

* Fix brushes not working properly with non-rectangular selections

* Added invert selection

* Cache has_selection as a variable for a speedup

* Fix conflict issues with the shape tools

* Made the bitmap image squared so the marching ants effect will be the same on both dimensions

There may be a better way to fix the issue, perhaps inside the shader itself.

* Some optimizations to call selection_bitmap_changed() less times

* Restored almost all of the image effects

Left to do:
- Change gradient's behavior. Unsure of how it will work with non-rectangular selections yet, but it should not generate pixels outside of the selection.
- Restore rotation
- Resize bitmap on image resize
- Remove the `pixels` array from the ImageEffect

* Fix Selection.gd not updating when changing project

* Resize the selection bitmap along with image resize

* Restored rotation's old behavior and finally got rid of the selected_pixels array

The rotation does not yet work properly with selections, but at least it now "works".

* Resize selection too when using gizmos

Left to do for gizmos:
- Proper cancel transformation
- Begin transformation
(currently named move_content_start but it should be renamed to something more general) when resizing gizmos
- Keep the original image and selection in memory and resize them. Meaning, gizmos should not resize the already resized data, but only resize the original. This is less destructive as there is no danger of data loss.
- Always resize on InputEventMouseMotion. This is going to be worse for performance, but it will look better for the user.

* Image and bitmap resizing now uses the original data and begin transformation on gizmo click

No matter how many times the user resizes on the current transformation, the original data will not be lost until they either confirm or cancel, so there is no data loss before confirmation/cancel.

* Cancel transformation now works properly when the selection has been resized

* Made gizmos resize on mouse motion, fix issues with negative bounding rectangle and when combined with the move tool

* Resizing can now get out of positive bounds, clearing and inverting now gets limited to the canvas bounds

Resizing currently does not work properly with negative (left & up) canvas boundaries

* Flip image when resizing and the bounding rectangle gets flipped

* Call move_content_confirm() when inverting selection

* Attempt to implement selection resizing that goes outside of the canvas boundaries (not working properly yet)

* Flip selection when resizing to negative bounding rectangle sizes

And fix preview_image vertical flipping

* Fix rotation so that it works (almost) properly with selections

Rotation algorithms now accept and only work with a given image, and the pivot has been added as a parameter

* Experimental gizmo rotation - does not work properly yet

Transforming the selection outside of the canvas is still broken.

* Fix some issues with moving selection out of canvas bounds

* Fix more issues with selection getting resized outside of canvas bounds

* Update marching ants effect properly when switching between projects

And make sure the frequency of the marching ants effect always looks roughly the same on all project sizes

* Made the rotation gizmo part of the gizmos array and resize them based on camera zoom

* Remove unneeded parameter from move_bitmap_values()

* Remove more unneeded parameters

* Move the selection only if the cursor is above it and neither shift nor control are currently pressed

* Gradient generation now works on non-rectangular selections

Although this behavior might not be the intended one

* Copy/paste marching ants effect offset

Useful for when the selection is in negative coords

* Fix issue with clear selection & UndoRedo

* Restore the ability to move selection when it's in negative coords

* Made the marching ants offset a Project variable

This fixes the issue of project switching and keeping the previous project's offset. Again, this is only relevant for when the selection is in negative coords.

* Made the "from current selection" palette preset work with the new selection system

* Fix out of bounds error when using the rectangular select tool on negative coords

* Some code cleanup

* Comment out the rotation gizmo for now, since it does not work properly

* Update marching ants shader params and gizmo sizes when the bitmap changes

* Move some methods around in Selection.gd
2021-04-17 11:30:12 -07:00
Martin Novák 42696e7b37
Replace old palette system with a new one (#447)
* Replace old palette system with a new one

* Replace default json palettes with new resource versions

* Add missing translation strings

* Fix Erevoid's issues 2, 3 and 4

* Rewrite palette grid to improve performance
Add middle click scrolling

* Fix index conversion functions

* Fix palettes editing by copying them to XDG user write path

* Add Windows specific fixes

* Add import support for old json palette format

* Add create/edit palette settings check.
Hide add/delete color buttons when no palette is displayed.
2021-04-16 11:09:03 -07:00
DragonOfWar 943a69c0e3
Add Rectangle and Ellipse tools (#456)
* Add Shapes Tool (WIP)

* Add Alt button + Fill shape + Other stuff

* Add blue theme button textures

* Fix tool not previewing on right button

* Add config functions

* Fix ellipse bug

* Correctly added thickness

* Keep preview with CTRL

* Fix weird PoolVector behaviour

* Make preview follow mouse when pressing CTRL

* Moved shapes class to a separate script

* Update tooltip

* Enable mirrors

* Separate tools + jittery preview fix + more

* Add missing translation

* Add missing icons and keybindings

* Changed shape draw function buttons

Co-authored-by: DragonOfWar <47753585+KawanWeege@users.noreply.github.com>
2021-03-30 10:07:13 -07:00
gamesplease 59862171e9
Add keyboard shortcut for Clear Selection (#457) 2021-02-17 09:53:01 -08:00
Manolis Papadeas d5f8d8e899 Disable Window Transparency in the Web version, update CHANGELOG & Translations 2021-02-02 19:17:56 +02:00
Manolis Papadeas ce7320ad4f Renamed "Base" to "BaseTool" and made it a class 2021-02-02 17:48:17 +02:00
Variable dc469dd4b5
Var transparent mode (#444)
* allowed and enabled per_pixel_transparency

* Added a Transparency menu

* Added an Alternate screen for transparency

* Added transparency methods

Added the transparency methods plus modified fullscreen such that it resets transparency on toggling hence, Removing the issue of blackness

* Modified the shader to allow transparency

* Added a material to ViewportContainer

Fixed the bug that darkens image when decreasing opacity

* Update Global.gd

* Update Main.gd

* Update TopMenuContainer.gd
2021-02-02 07:29:19 -08:00
Manolis Papadeas 93bbfabb99 Refactored CreateNewImage dialog and added portrait & landscape buttons from #402
The lock aspect ratio button has been changed from a checkbox to a texture button and the template code has been refactored to use a Template class instead of enums. Only dark icons have been added for now.
2021-01-25 22:07:02 +02:00
kleonc db9980a883
Draw Grid only over Canvas. Added PixelGrid. (#427)
* Draw grid only over the Canvas (when in tiling mode)

* Replace some magic numbers with enums.

It's too easy to break something when adding something new in here. Should be a little harder now.

* Added Pixel Grid.

- Pixel grid is shown only when it's enabled and camera is zoomed close enough.
- Settings: pixel_grid_show_at_zoom (as a percentage because that's what's shown in the settings panel), pixel_grid_color. Default values might need changing.
- To distinguish between grid and pixel grid default settings for grid width, grid height are changed.
- Now both grid and pixel grid are drawn above (after) tile mode. Grid is drawn above (after) pixel grid.
2021-01-16 10:24:46 -08:00
Laurenz Reinthaler 2a7e668976
Add Pan Tool (#399) 2020-12-23 10:41:42 -08:00
Manolis Papadeas fe0fb7d21f v0.8.2-stable 2020-12-12 16:55:13 +02:00
Manolis Papadeas 359f0d473c Added Japanese translation 2020-12-12 15:05:03 +02:00
Manolis Papadeas 4ca4cbcc01 Added Turkish translation 2020-12-10 20:39:29 +02:00
Manolis Papadeas 5c200bf290 v0.8.2 - Release Candidate 1 2020-12-04 00:05:05 +02:00
Manolis Papadeas d7008362b5 Added a "Mirror View" option in the View menu
Which is used to flip the canvas horizontally and non-destructively. Closes #227
2020-11-23 18:53:21 +02:00
AbhinavKDev de4634e22d
Improved the tiling feature (#378)
* Improved tiling feature

* Removed some unwanted code

* Fixed the bug mentioned by overloaded

* Added the requests by overload

* changed the y value which was given x value before
2020-11-13 10:12:20 -08:00
OverloadedOrama e94bcf50e0 Made pxo saving a bit safer
It now first attempts to serialize the project data and turn them to JSON, and then opens the file. This is a lto safer because, if a crash happens in the serialization, the file is not already open, and therefore it does not get corrupt. Earlier, if a crash happened, the file would be empty. This meant that if that file existed previously, all of the data would be lost.
2020-10-20 03:27:38 +03:00
OverloadedOrama 320f1a4da2 Update v0.8.1 2020-10-14 16:15:30 +03:00
PinyaColada 64eb4f27ce
Cut option (#345)
* I Made the cut function, his respective shortcut <c-x> and the appearence of the function in the top
bar in edit.

* Update Main.tscn
2020-10-08 18:05:33 +03:00
OverloadedOrama 10b082434b Removed brush_button.png - May solve #339 2020-09-27 20:35:46 +03:00
OverloadedOrama 1fc7cc151d v0.8 - The multiple project & Web update! 2020-09-23 16:51:08 +03:00
OverloadedOrama d59ad5937d Enter v0.8 Release Candidate stage 2020-09-05 13:39:32 +03:00
OverloadedOrama 2af677016e Created an ImageEffect class
This will be the parent of all (or most) image effect dialog nodes. Currently only parent on FlipImageDialog, will change to be parent of the rest of the effects.
2020-08-25 19:07:12 +03:00
OverloadedOrama a65fc0e00c Added Romanian and Korean 2020-08-25 17:17:43 +03:00