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

1890 commits

Author SHA1 Message Date
Emmanouil Papadeas acf376865f Fix crash when there is no pixel layer in the timeline, only a group layer 2023-03-24 17:37:40 +02:00
Emmanouil Papadeas acb32844a1 Replace the Locked Aspect Ratio mode in the crop tool with a lock button next to the size sliders 2023-03-24 01:17:30 +02:00
Variable 2ad1391ca1
Spritesheet Animation Canvas Preview (#835)
* spritesheet preview

* formatting
2023-03-23 15:25:33 +02:00
Emmanouil Papadeas 4e7d5d34cf Keep aspect ratio when resizing a selection with gizmos, if the button is pressed next to the ValueSliders
Also fixes a bug with the inconsistent behavior caused by resizing a selection with gizmos without pressing Shift, while the keep ratio button was pressed.
2023-03-21 16:36:25 +02:00
Emmanouil Papadeas 99b014ef7f Fix segmentation fault when resizing canvas to a large size
For some reason, cel_texture.texture.get_data() seemed to cause a segmentation fault, and then a crash, when the image size was large. Also added some extra static typing to the drag and drop methods, but they are unrelated to the crash.
2023-03-21 02:06:57 +02:00
Emmanouil Papadeas d4ebf9c585 Use Vector2s for min and max values in ValueSliderV2
This lets us have different min/max values for x and y.
2023-03-21 01:45:09 +02:00
Emmanouil Papadeas a5496daa5b Add a ValueSliderV2 to the Pencil's spacing options 2023-03-20 20:28:01 +02:00
Emmanouil Papadeas 05fa436b12 Disable ValueSliderV2's ratio button when set to not editable
And use a NinePatchRect for the ratio guides, for proper scaling.
2023-03-20 01:59:15 +02:00
Emmanouil Papadeas e174f6e942 Add a new custom node, ValueSliderV2
ValueSliderV2 is a container for two ValueSliders and an optional lock ratio button, that helps with handling Vector2 values in the UI.
2023-03-20 00:56:43 +02:00
Emmanouil Papadeas 5ed91c6d8a Fix ValueSlider's text color from staying grayed out even if the slider is editable 2023-03-19 00:36:37 +02:00
Emmanouil Papadeas df00e43b84 Do not allow the ValueSlider's global shortcut to affect it if it's hidden 2023-03-18 14:29:11 +02:00
Emmanouil Papadeas b5388093ef Add a minimum size to CanvasPreviewContainer
Fixed issues with the UI system, when changing the tab to Reference Images and then back to Canvas Preview
2023-03-17 01:24:20 +02:00
Emmanouil Papadeas c43f28b323 Manage layout dialog UI changes 2023-03-17 01:20:17 +02:00
Emmanouil Papadeas e3a163b8c7 Update Default layout 2023-03-17 00:55:34 +02:00
Emmanouil Papadeas 1a769293fc Dim cel buttons based on whether the cel is transparent/empty or not
Should replace #817, but in a more optimized way, as it does not rely on _input().
2023-03-17 00:02:01 +02:00
Variable ad3a0155b6
Set tilemask automatically (#833)
* AutoCreate Tile Masks

* removed a print()

* Disable masking by default

* changed visibility

* Remove Godot's needless changes in Main.tscn

Godot pls

---------

Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2023-03-16 20:07:03 +02:00
mrtripie 0ad86816e5
Crop Tool (#830)
* Added intial crop tool

* [skip ci] Removed unneeeded LINE_WIDTH constant from CropRect

* Added DimensionsLabel

* Cleaned up CropRect._draw

* Hide the CropRect after switching to a different tool

* Sets the crop values to the entire canvas size on setup

* [skip ci] Added crop tool tooltip

* Made Crop tools synced with eachother by placing the crop settings on CropRect

* Added new modes, refactored, added rule of thirds lines and darkened background

* [skip ci] reset optimization

* Renames

* [skip ci] Tweaked the darkened background

* Fixed bug with top/bottom/left/right sliders after rect refactor

* Changing width/height on locked aspect ratio bug

* Aspect ratio sliders rounding/setting a min of 1 px height/width

* Fixed bugs with drawing the crop rect, especially with locked aspect ratio

* Save the mode to config_cache

* Added size lock and renamed mode

* Added tooltip for size lock. Not sure if I did the translation file right

* removed signal that wasn't used

* Formatting

* Removed old TODO comment from one of my previous PRs that isn't true anymore

* Fixed definition order for linter

* Changed locked size modes moving to offset by @Variable-ind, reordered methods

---------

Co-authored-by: MrTriPie <MrTriPie>
2023-03-16 19:50:45 +02:00
Variable e008c39286
Added color Averaging (#822) 2023-03-15 15:05:18 +02:00
Emmanouil Papadeas ad61ddc2c0 Fix crash when opening the rotate image dialog for the second time for large canvases 2023-03-14 15:34:06 +02:00
Emmanouil Papadeas 4bf7829b0a Fix swatch getting transparent on double click 2023-03-14 15:24:15 +02:00
Emmanouil Papadeas 30d279c494 Fix image brushes being drawn outside the selection 2023-03-14 14:59:22 +02:00
Variable 0cb0f9c1bd Added recent sizes to new project (#819)
* Added recen sizes to new project

* Formatting

* Limit list size to 10
2023-03-14 13:58:40 +02:00
Emmanouil Papadeas de7ef580f9 Fix dynamics hint tooltip and add some missing dynamic-related translation strings 2023-03-09 15:22:29 +02:00
Variable d9efe97bfa
Recorder extension to core (#823)
* Add files via upload

* add fps counter

* formatting

* Update Recorder.gd

* Some improvements

* typo

* another typo

* formatting
2023-03-07 16:21:03 +02:00
Variable e88ba2cb73
Further improvements to Dynamics (#828)
* Image bruch now obeys dynamics as well

* Added a signal that resets dynamics

* formatting

* change uncheck.png

* added preview for pressure

* Added the requested changes
2023-02-28 17:07:48 +02:00
Variable f2f2f11661
Some improvements to the dynamics (#826)
* fix  dynamics

* removed empty line

* Added icon

* added check/uncheck icons

* make thresholds ui simpler

* Rename dynamics.png to lowercase and add MaxMinEdit class to project.godot

---------

Co-authored-by: Emmanouil Papadeas <manoschool@yahoo.gr>
2023-02-20 21:51:26 +02:00
Variable 0da30c015c
Move perspective lines with mouse (plus code improvements) (#821)
* Code Improvements to Perspective editor

* formatting

* fixed a bug

* Some drastic changes

* Delete src/UI/Tools directory

* Delete src/UI/UI/PerspectiveEditor directory

* Some drastic changes

* i messed up so here's the fix

* Added easy movement and rotation

* formatting

* useless script

* fix some things and add tracker disabler

* formatting

* fix incorrect length on redo

* remove useless code
2023-02-18 02:33:46 +02:00
Emmanouil Papadeas c60675b4e7 [WIP] Added dynamics, such as pen pressure (finally!) and mouse velocity affecting alpha and brush size
Alpha currently produces ugly results when drawing on top of opaque colors. See the comment in Draw.gd like 445 for more details.
2023-02-17 15:29:55 +02:00
Emmanouil Papadeas fdb24c008e Fix guide snapping segment detection
The previous method was not working for perspective guides rotated at 315 degrees, due to the test line being parallel to it. Thanks to Variable for the solution.
2023-02-13 01:21:29 +02:00
Emmanouil Papadeas 12fbeca724 Improve grid snapping
Thanks to Variable
2023-02-13 00:51:09 +02:00
Emmanouil Papadeas 83a0d93837 Update get_spacing_position() to make it more effective
Thanks to Variable
2023-02-13 00:17:55 +02:00
Emmanouil Papadeas 6f6ff98923 Implement perspective guide snapping 2023-02-12 21:32:35 +02:00
Variable 7f026aa371
Implement a spacing option for the pencil tool (#813)
* Added Code for cursor snapping

* Added the Snap option

* typo

* Fix snapvector not updating properly

* formatting

* better snapping system

This makes the stroke snapping more accurate by preferring the snap point nearest to the cursor

* changed Snap mode to spacing

* Code Improvements

* more changes

* Update Pencil.gd

* formatting

* fix max line length

---------

Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2023-02-12 17:46:47 +02:00
Variable 7307743f83
Added the Perspective editor (#806)
* Added Perspective Editor

* removed unintended changes

* Removed unintended changes

* removed un-intended changes

* Delete Axes.tscn

* Delete Axis.gd

* Removed MouseGuides from editor

I will add them separately

* Added MouseGuides

* Some changes

* Fixed some things

* added mouse guide

* make MouseGuides remember last setting

* don't move if dialog is open

* Dont move tracker guides if dialog is open

* UI improvement to editor

* Update VanishingPoint.gd

* UI Improvement

* Minor Color Improvements

* fixed a bug

This was causing a crash

* Some UI Changes

* Improve UI some more

* fix typo

* Added Undo/Redo and improved UI

* Formatting

* formatting

* formatting

* formatting

* Fix Definition out of order

* Fix Definition out of order

* formatting

* formatting

* fix Duplicate error

* Fix some things

* Some UI Changes

* Some code refinement

* Removed un-needed lines

* Some code refinement

* Some more UI Changes

* Changes, Changes and Changes

* Delete LineButton.gd

* Delete LineButton.tscn

* Delete PerspectiveEditor.gd

* Delete PerspectiveEditor.tscn

* Delete PointCollapseContainer.gd

* Delete PerspectiveLine.tscn

* Delete PerspectiveLine.gd

* Changed boundary separators to ColorRects

* make the guide update more frequently

* make default color have full alpha

* Dim the boundaries based on luminance

* typo

* Formatting

* Formatting

* formatting i forgot to do

* Delete VanishingPoint.gd

* Delete VanishingPoint.tscn

* Fixed rouge collapsible container

---------

Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2023-02-12 15:20:53 +02:00
Emmanouil Papadeas c6d6c6184c Do not automatically set the UI scale to 0.75
It seems that people who had their UI automatically scaled to 0.75 did not like this and wanted to find a way to resize the UI.
2023-02-09 01:40:51 +02:00
Emmanouil Papadeas ea746538cf Workaround to make the Dithering shader work in WebGL 1.0
Not the best way to do this, but it works.
2023-02-06 14:29:27 +02:00
Emmanouil Papadeas 6ae8d9afed Make the GradientEditor node expand horizontally 2023-02-03 02:02:13 +02:00
Emmanouil Papadeas a18c7082fa [skip ci] Add SNAP_TO in the ViewMenu enum 2023-02-02 03:45:36 +02:00
Emmanouil Papadeas 8a38eef30d [skip ci] Fix various typos 2023-02-02 03:06:23 +02:00
Emmanouil Papadeas a381e8a7de Fix ValueSlider's tint_progress not being reset after text has been confirmed 2023-02-01 02:12:09 +02:00
Emmanouil Papadeas a66a0d4954 Remove unused pressure sensitivity options in the preferences 2023-01-31 01:11:23 +02:00
Emmanouil Papadeas 53dea9c8d0 Fix dithered gradients having wrong colors
Pass a nx1 image instead of the GradientTexture, that contains all of the gradient's selected colors, where n is the number of colors.
2023-01-29 01:02:40 +02:00
Emmanouil Papadeas f26484f854 Add repeat options to the gradients, unify their code into two shaders
Have only two shaders, one for simple gradient and the other for dithered gradient generation. The gradient shape gets passed as a uniform to the shader. Gradients can now get repeated, and the size option for linear gradients is back.
2023-01-28 18:45:49 +02:00
Emmanouil Papadeas 201992fa72 Add multi-color support for gradients, remove step gradients
Gradients are no longer limited to two colors, but can now instead have as many as we want, with each color having its own offset. Step gradients have now been removed; to generate the same effect, you can now generate a linear gradient with constant interpolation. Cubic interpolation in gradients is now also possible.

The dithering shaders were by far the biggest challenge and they had to be re-written in order for them to support multiple colors, with each one having a difference offset. I have noticed that some colors may disappear when Constant interpolation is used, though, so it can be buggy sometimes. Thanks to https://godotshaders.com/shader/dither-gradient-shader/ for the reference.

ValueSliders are now also used in the gradient window.
2023-01-27 04:23:48 +02:00
Emmanouil Papadeas 42d6f12530 Implement rectangular grid and guide snapping
Snap to the rectangular grid and guides (excluding symmetry guides). Can be toggled from the View menu. Currently affects the following tools: Pencil, Eraser, Shading, Line, all shape tool and all selection tools. Although maybe this should not affect the Magic Wand and Select By Color? The snapping distance is currently unaffected by the zoom (should change), and it will be exposed as a parameter in the preferences at a later commit.
2023-01-25 04:37:03 +02:00
Emmanouil Papadeas f2a4af9c1f Fix issue where you could move selection gizmos when an overlay window is opened 2023-01-23 19:06:10 +02:00
Emmanouil Papadeas a9692ca859 Fix bug where the tool changes while having an image brush selected
The indicator appeared as a white square until the mouse moved, and errors appeared in the debugger.
2023-01-23 19:05:36 +02:00
Emmanouil Papadeas 640282f00c Minor guide code cleanup
This commit removes the unnecessary point_in_rectangle() method, as Rect2.has_point() can be used instead. I was not aware that this built-in method existed back then.
2023-01-23 01:16:50 +02:00
Emmanouil Papadeas 7143e6ca8e [skip ci] Change the focus mode of the Window menu 2023-01-22 02:03:09 +02:00
Variable 043a4de373
Upgrade the look of the brushes popup (#815)
* Upgrade the brushes popup

* upgrade brushes popup

* Formatting

* fix name of 1st brush not written

* use grid container instead of vbox

and added categories

* Some UI Changes

* typo

* Fix autowrap

* fix node paths

* formatting

* more formatting

* more formatting

And hopefully the final commit

* sigh... more formatting
2023-01-21 17:01:07 +02:00
Variable ef6ae86c8d
Make the color picker pick any visible color on the canvas, regardless of layer (#816)
* Pick top color by default

* revert accidental commit

* Pick top color by default

* formatting

* formatting
2023-01-20 16:09:49 +02:00
Emmanouil Papadeas 0a615298f5 Fix issue with selection resizing from the tool options + minor code cleaning
Removed the temp_bitmap variable completely, as it's not really needed.
2023-01-19 02:13:22 +02:00
Emmanouil Papadeas 5cb0eddae5 Transformation preview should now work for all selected cels
Prior to this commit, the transformation (moving/scaling content with selections) of only one of the selected cels would appear, and the rest would only have a visible effect on transformation confirm.
2023-01-18 04:44:37 +02:00
Emmanouil Papadeas 403539bb47 Fix issue with content being pasted in sub-pixel positions 2023-01-17 04:06:06 +02:00
Emmanouil Papadeas 5e749db0d5 Remove selection resizing code from SelectionTool and minor code cleanup 2023-01-17 03:22:55 +02:00
Emmanouil Papadeas 09ff22707b Use enums to check the rotation algorithm instead of strings in RotateImage.gd 2023-01-16 22:05:24 +02:00
Emmanouil Papadeas 7001f3a28b Remove NotificationLabel.tscn, use class_name for notification labels 2023-01-15 17:08:42 +02:00
Variable facabc1143
Fix previews (#811)
* Fix move tool preview (without selection)

* typo

* Dont snap if transformation hasn't started

* Added a can_layer_get_drawn() check

* Formatting

* remove useless line

* Formatting (Again cause i am DUMB)

* Formatting (Again cause i am DUMB)

* Better Code
2023-01-14 18:09:46 +02:00
Emmanouil Papadeas 7dc0af21e7 Create ValueSlider and CollapsibleContainer child nodes through code
This lets us create ValueSlider and CollapsibleContainer nodes properly via the add node button, instead of instancing their scenes. They have also become more a bit more themeable. Eventually, ValueSlider.tscn and CollapsibleContainer.tscn will be deleted.
2023-01-13 05:19:35 +02:00
Emmanouil Papadeas 20db211c13 Minor cleanEdge rotation optimization 2023-01-12 18:25:43 +02:00
Emmanouil Papadeas cd12b1b1b3 Animate the collapsible container arrow when the button is clicked 2023-01-11 19:37:52 +02:00
Emmanouil Papadeas 08e00d3c31 [GLES 3 only] Add OmniScale for scaling and rotation 2023-01-11 17:54:33 +02:00
Emmanouil Papadeas 8423ce7d42 Fix typo in NearestNeighbour's file name 2023-01-11 16:41:08 +02:00
Emmanouil Papadeas 01fc5cd9bd Fix wrong variable name in ExtensionsAPI 2023-01-10 21:10:05 +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 512c85ac64
Added supported_api_versions parameter (#807)
* Added supported_api_versions parameter

* formatting

* changed a line
2023-01-08 19:17:42 +02:00
Emmanouil Papadeas 2d9bc7e660 Fix crash when attempting to draw on a GroupCel when the animation is playing 2023-01-07 20:32:02 +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
Variable d7e33f4431
Api Improvements (#802)
* Api Improvements

Proper Removal of Tools
A new `get_current_cel_info()` method

* a new show_error() method

usefull for displaying messages like "Incompatible API" etc...

* typo

* formatting

* added an improvement
2023-01-04 06:21:15 -08:00
Emmanouil Papadeas ee8d321902 Make cel_changed a Global signal instead
Otherwise we would have to connect the signal for every opened project. If a feature/extension requires it, we could add a reference to the project as a parameter for the cel_changed signal, but since that can get retrieved with Global.current_project, it's probably not needed.
2023-01-03 00:52:23 +02:00
Emmanouil Papadeas 824860a2b5 Add a change_cel() method to Project, instead of using a signal
Using a signal to change the cel was not a good idea, because it was not being emitted with the undo/redo system. The signal should also fire *after* the cel changes, and this is what happens in this commit. Should be useful for future features and extensions to check whether a cel has been changed.
2023-01-02 22:09:47 +02:00
Emmanouil Papadeas 40ab13da35 Add a cel_changed signal in Project to replace _frame_changed and _layer_changed
A small refactor. A very minor performance boost when selecting cels, but also a minor performance decrease when selecting frame buttons. Selecting layer buttons should be pretty much the same. I think the code should be a bit more readable now, plus we got rid of that yield() in Project.gd so that's a bonus.
2023-01-02 18:59:23 +02:00
Emmanouil Papadeas 36355eabdf Change the current frame label's default text 2023-01-02 16:41:49 +02:00
Emmanouil Papadeas 47ef98ec76 Add a get_current_cel() method in Project 2023-01-02 15:30:45 +02:00
Emmanouil Papadeas 3c4b9ad5b4 Use signals for zoom_changed and rotation_changed in CameraMovement 2023-01-02 14:40:48 +02:00
Variable 5113963f64
Allow floating point for Horizontal and Vertical Rulers (#800)
* Allow floating point for HRuler

* Allow floating point for VRuler

* Formatting

* Format again

Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2023-01-01 20:04:15 +02:00
Variable cbeef73fac
Selection modes (#798)
* Fix a typo

this is required because this is "Paint" Selection
(so it's not supposed to cancel selection if we click outside the canvas)

* Added Selction Modes

Default, Add, Subtract, Intersect

* removed whitespace

* better options

* Removed Separators from headers

* formatting

* more formatting that i didnt notice

* Solved Shortcut conflict

* remove whitespace
2022-12-31 20:13:27 +02:00
Emmanouil Papadeas 222e7a1ea8
Implement cleanEdge rotation and scaling (#794)
* Implement clear4x rotation

* Don't use pixelated uvs on the final result, only on the preview, and fix pivot positioning

* Update to cleanEdge algorithm

* Add cleanEdge scaling
2022-12-25 01:11:34 +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 7e15fc9d15 Remove duplicate project-specific variables from Export
Removed `directory_path`, `file_name`, `file_format` and `was_exported` from Export.gd. These variables already exist on Project.gd, no need to have them twice.
2022-12-18 03:33:53 +02:00
Emmanouil Papadeas c50239ff18 Disable the recent files option of the File menu on the Web version 2022-12-18 02:21:30 +02:00
Emmanouil Papadeas 9377ce00b0 Use ValueSliders for ShaderEffect and add a transparency background 2022-12-17 02:37:18 +02:00
Emmanouil Papadeas ab35d324fd Silence editor errors coming from ValueSlider
The errors came as a result of 9828c483.
2022-12-17 00:45:54 +02:00
Emmanouil Papadeas 9828c4838e Change ValueSlider's text color
And use the previous color only when they're disabled.
2022-12-16 21:34:58 +02:00
Emmanouil Papadeas bf7844b149 Make the notifications always appear on the bottom left of the main canvas 2022-12-16 19:44:40 +02:00
Variable 1df003b2df
Paint selection brush (#792)
* Added the PaintSelect tool

The shortcut keys are not configured

* Some Optimization attempts

* remove typo

* Re-Designed Tool Icon
2022-12-14 18:34:13 +02:00
Emmanouil Papadeas 6148791069 Update AboutDialog.gd 2022-12-09 18:33:36 +02:00
Variable 4f7486defb
Reference UI improvements (#789)
* Added the filter parameter

* Improved the reference image panel UI

* Disable Os open path for HTML

* fix typo

* Aviod crash on image not found
2022-12-08 02:20:54 +02:00
Variable 2bf290faa4
Decorative changes to reference and tool headers (#788)
* Added a header to reference pannel

Also fixed it's anchor

* Added decorative lines to the tools header

* Fixed the Label path
2022-12-07 18:22:09 +02:00
Variable 1499e7f704
Added a preview to layouts (#787)
* Added a preview to layouts

* removed some empty lines
2022-12-07 15:43:49 +02:00
Emmanouil Papadeas f46c376056 Make reference images work on the Web version*
* Pxos saved with the Web version will have reference images, since their paths will not be stored.
2022-12-07 15:38:44 +02:00
Emmanouil Papadeas 5e90b740e7 Only popup a single files dialog for multiple files - implements #585
This replaces the previous behavior, which used to popup multiple dialogs for each existing file, making the users click "OK" for each exported image.
2022-12-02 02:11:23 +02:00
Emmanouil Papadeas 4989e3e33a Fix Global not being able to find the Reference Images panel 2022-12-02 01:15:49 +02:00
Emmanouil Papadeas a6a1b4da99 Move making GLES2 the default driver in override.cfg outside of Global_init()
This way, override.cfg will not get automatically created when the app opens, unless the user explicitly changes the renderer, or the tablet driver.
2022-12-01 20:17:03 +02:00
Emmanouil Papadeas 251b240857 Update translations and add hint tooltips to the driver preferences 2022-12-01 02:00:45 +02:00
Arron Washington c4059beddf
Tool shortcuts should ignore macOS Command modifier. (#784)
* Tool shortcuts should ignore macOS Command modifier.

This prevents common shortcuts like CMD+S (Save), CMD+C (Copy), etc, from activating a tool.

* Fix formatting

Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2022-11-30 17:06:03 +02:00
Manolis Papadeas fc5497861a Fix tablet driver not reflecting the currently chosen driver
If winink was chosen, the preferences still showed wintab.
2022-11-30 02:09:06 +02:00
Emmanouil Papadeas e115aa284b Place the Reference Images panel next to the canvas preview
And rename "References" to "Reference Images"
2022-11-30 01:00:41 +02:00
Emmanouil Papadeas 60e58952a5 Use Control + Wheel to change shape thickness 2022-11-30 00:29:44 +02:00
Emmanouil Papadeas 0db574c769 Expose tablet driver to the preferences [Windows only] 2022-11-29 21:10:49 +02:00
Emmanouil Papadeas 78f9cb57bb Set GLES2 as the default video driver in override.cfg
Should fix the renderer not being able to get set to GLES3
2022-11-29 20:48:36 +02:00
Emmanouil Papadeas 8f14f7482e Remove unneeded duplicate methods in PreferencesDialog.gd 2022-11-29 20:17:39 +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
Emmanouil Papadeas 0837f68e8b Update contributors in AboutDialog.gd 2022-11-20 19:17:27 +02:00
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
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 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
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 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 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 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 c2e90f77b0 Fix PreferencesDialog becoming smaller if the display scale changes 2022-09-22 17:04:20 +03:00
Emmanouil Papadeas 37eee319b5 Fix "Close" button in the Preferences not being translated from a non-English language
Before this commit, if Pixelorama started in a language other than English and then the user switched languages, the Close button's string would remain translated in the previous language
2022-09-22 16:40:53 +03:00
Emmanouil Papadeas 5a9a3ba495 Update AboutDialog.gd 2022-09-21 03:28:46 +03:00
Variable 56a113d36d
fix recent projects (#755) 2022-09-20 21:14:42 +03:00
Emmanouil Papadeas 950a6d77af Move pencil's brush slider above "Overwrite color" again 2022-09-20 20:46:53 +03:00
Variable 03813b41c5
Remember last choice in import options (#754)
* Remember last choice in import options

Implements 2nd point of  "Minor UX improvements #735"

* formatting
2022-09-20 20:28:35 +03:00
Emmanouil Papadeas 028a4c9f8a Remove minimum size from PreferencesDialog 2022-09-20 20:01:32 +03:00
Emmanouil Papadeas 8b78877f0c Make themes have consistent alignment and add header for the shortcuts in Preferences 2022-09-20 19:39:15 +03:00
Emmanouil Papadeas 1f55ac92fd Add tool button color & tool name header on each of the tool options 2022-09-20 00:58:39 +03:00
Emmanouil Papadeas 4fc44a71c6 Polish the preferences dialog and add a "Header" theme type variation for Labels 2022-09-20 00:16:01 +03:00
Emmanouil Papadeas af7f1f83b1 Disable "New Brush" instead of "Delete" in the Edit menu
Issue caused when "Paste in Place" was added.
2022-09-18 21:58:37 +03:00
Emmanouil Papadeas 63bc2332db Make bucket fill "Whole Selection" option work with patterns
Also fix issue with similar area and color fill where if the selected color is the same as the pixel's color in mouse position, the operation stops even if there are other cels selected.
2022-09-18 19:22:06 +03:00
Emmanouil Papadeas cac9b67335 Revert back to an OptionButton in the Bucket tool options and add "Whole Selection" option in the fill area
Still WIP, "Whole selection" isn't working with patterns yet.
2022-09-18 18:43:50 +03:00
Emmanouil Papadeas eda848ff63 Change "continuously" to "contiguously" 2022-09-18 17:23:42 +03:00
Emmanouil Papadeas 94789a57c8 Replace the fill area OptionButton with a Checkbox in the bucket tool options 2022-09-18 16:36:03 +03:00
Emmanouil Papadeas 698c7c4a08 Fix invalid image error when using the bucket tool to replace colors 2022-09-18 15:56:36 +03:00
Emmanouil Papadeas d69d98dc3b Auto-scale the UI based on dpi and resolution - Closes #643
Code is taken from Godot's editor, so I assume it should work well.
2022-09-18 01:17:35 +03:00
Emmanouil Papadeas c8efa7c09a Allow for down to 0.5 UI scale
Might be useful for small loDPI displays.
2022-09-17 03:03:17 +03:00
Emmanouil Papadeas 56748da971 Update GradientEdit hint tooltip string 2022-09-17 00:25:43 +03:00
Emmanouil Papadeas c2f2473d77 Add a "Divide into equal parts" button in GradientEdit
This is meant for easy gradient bisecting, which is helpful for converting Linear/Cubic interpolated gradients into Constant.
2022-09-17 00:19:08 +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 2e795e8db5 Fix onion skinning not working with mirror view
Addresses the 3rd issue in #717.
2022-09-13 00:49:22 +03:00
Variable 4b4b0773ff
Highlight color in palette if it's selected in color slots (#730)
* select pallete color (if present)

* find and select color

* [skip ci] Update CHANGELOG.md

Co-authored-by: Emmanouil Papadeas <manoschool@yahoo.gr>
Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2022-09-12 02:03:14 +03:00
Emmanouil Papadeas 66857f5e62 Make background around canvas configurable - implements #586 2022-09-10 02:58:13 +03:00
Emmanouil Papadeas d34e69579f Make circle brushes scale properly, with support for even-numebered diameters
Also reverts commit 488cf0cc93
2022-09-09 00:10:34 +03:00
Emmanouil Papadeas dee49b61bf Move get_ellipse_points() to DrawingAlgos
The same ellipse algorithm will be used for the circular brushes, as I can't seem to make the current circle algorithm work with even-numbered diameters.
2022-09-08 17:35:00 +03:00
Emmanouil Papadeas cd0c7ccdb0 Remove duplicate circle code from Draw.gd 2022-09-08 14:02:33 +03:00
Emmanouil Papadeas e7678ef5cc Move _fill_bitmap_with_points() to BaseTool.gd 2022-09-08 13:42:03 +03:00
Emmanouil Papadeas ffd6c8c88d Remove unused methods in Draw.gd 2022-09-08 13:32:03 +03:00
Emmanouil Papadeas edbbec1d55 Copy, cut & delete now affect the entire cel if there is no selection
Also fixed issue with delete deleting content from locked/invisible layers.
2022-09-08 01:10:23 +03:00
Emmanouil Papadeas c22633901d [skip ci] Fix typo 2022-09-05 18:17:20 +03:00
Manolis Papadeas d564139f98 Some more static typing
Apologies for the pointless-ish commits but I'm on vacation and time is limited :(
2022-09-03 00:58:29 +03:00
Manolis Papadeas 3bfbf07d58 Don't move selection if there's a dialog open 2022-09-01 00:21:18 +03:00
Manolis Papadeas eef722946c Change into forbidden cursor in the canvas if the layer is unavailable
Unavailable means either locked or invisible, or both.
2022-08-31 00:36:41 +03:00
Manolis Papadeas 488cf0cc93 Pixel perfect only affects the square brush 2022-08-30 20:11:01 +03:00
Manolis Papadeas 47ba050ad4 Some formatting changes 2022-08-29 22:15:43 +03:00
Manolis Papadeas 01f8273e4b Add some missing static typing 2022-08-29 21:11:43 +03:00
Emmanouil Papadeas 500fc5ac47 Change SplashDialog from WindowDialog to AcceptDialog
This eliminates the need of the dialog having a rect_min_size, which lets users resize it to make it even smaller. The OK button is being hidden at the start, so visually it should look almost the same.
2022-08-26 03:25:22 +03:00
Emmanouil Papadeas 7bfcabc466 Close project tabs with middle mouse click 2022-08-25 01:47:05 +03:00
Emmanouil Papadeas b9f0f0a647 Move left and right cursor sprite nodes to Main.gd 2022-08-24 14:22:40 +03:00
Emmanouil Papadeas 615491052a Minor code cleanup to reduce lines of code 2022-08-21 00:18:33 +03:00
Emmanouil Papadeas 27a23f5e37 Update contributors, translators and changelog URL 2022-08-18 02:04:08 +03:00
Emmanouil Papadeas e495f1f260 Add Danish language 2022-08-14 16:06:46 +03:00
Emmanouil Papadeas 92fcf8faca Update translations, rename "New tab" to "New project"
Addresses the first half of #735.
2022-08-11 01:44:45 +03:00
Emmanouil Papadeas 469f9bf4d3 Use theme type variations for RulerButtons and TopMenuContainer 2022-08-09 04:18:11 +03:00
Emmanouil Papadeas 8a8e6929b9 Replace Tweens with SceneTreeTweens
Futureproofing for easier porting to Godot 4.0, and reducing lines of code in the process ;)
2022-08-09 03:57:14 +03:00
Emmanouil Papadeas c66cac2fd8 Add an interpolation OptionButton to GradientEdit 2022-08-09 02:02:46 +03:00
Emmanouil Papadeas 8b70b56a5e Fix current frame button not being pressed when changing project 2022-08-08 21:37:00 +03:00
Emmanouil Papadeas c7ee96591c Some theme changes made automatically by Godot 3.5 2022-08-08 21:33:38 +03:00
Emmanouil Papadeas a9e624e319 Greatly optimize selection content deletion
New speeds with this commit (approximately)
64x64: 0-1ms
1024x1024: 27ms
2048x2048: 73ms
4096x4096: 261ms

Old speeds before this commit (approximately)
64x64: 42ms
1024x1024: 5204ms
2048x2048: 20988ms
4096x4096: 83973ms
2022-08-08 19:07:17 +03:00
Variable 8a6e393d69
New theme-related methods to ExtensionsAPI (#733)
* hide accidentally visible dialog

* added new theme methods

* Wait for themes to add from api

* remove `find_theme`

* revert last commit

* Formatting

* Some code changes

* update to godot 3.5
2022-08-08 16:20:42 +03:00
Emmanouil Papadeas afe5a90722 Use a HFlowContainer for the Tools
This commit requires Godot 3.5 and Pixelorama will no longer run in older Godot versions
2022-08-08 04:17:34 +03:00
Variable ef0adf55b1
Make changing window transparency only affect the main canvas' transparency (#734)
* Only change opacity of TabContainer of MainCanvas

* fix typo
2022-08-08 03:21:08 +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 7165f352b0 Make GradientEdit's color picker popup not get in the way of the preview 2022-08-04 17:14:43 +03:00
Variable 57387f3530
Change tilemask loading (#731)
* Load tilemask from current frame...

...instead of selecting from FileDialog

* Delete the FileDialog

* Added the reset button

every good loader needs a reset button, Cheers!!!
2022-08-03 00:42:54 +03:00
Variable 8803acd105
Tile mode fixes (Heavy testing required) (#723)
* Hide/Show options based on current tile option

* Changed a condition for tile mode

* Simplified tile detection code

* Priortize main tile as nearest if mouse is in it

* make tile mode draw behind canvas

* Changed a condition

* Tiles on top gets detected first...

...in case of overlap

* Only display relavant options

according to current mode

* Update preview according to..

..current mode

* removed print()

* Added tile masking

* Added tile masking

* Compare mask with project size

only masks with same size as project are accepted

* Formatting

* Added the suggestions

* Some minor modifications

* detect if a mask is loaded or not

* Added tile_mask to project

* Cosmetics

* added path detection

* added option to emit signal instead of loading...

... image directly through OpenSave

* Added a way to load mask for HTML5

* formatting

* formatting

* Formatting

* set proper way for saving tile_mask

* Formatting

* removed whitespace
2022-08-02 18:57:06 +03:00
Emmanouil Papadeas b7e6a183a6 Add dockable container methods to ExtensionsAPI 2022-07-31 16:06:26 +03:00
Emmanouil Papadeas 273f7f2569 Update AboutDialog.gd 2022-07-30 22:11:29 +03:00
Emmanouil Papadeas c5e2e1ce4c Change badly named variable in ExtensionsAPI 2022-07-29 20:51:45 +03:00
Emmanouil Papadeas acebbdf031 Update ExtensionsAPI.gd 2022-07-29 20:41:39 +03:00
Emmanouil Papadeas c9e5c97214 Fix wrong order of undoredo properties in open_image_as_spritesheet_layer 2022-07-29 19:23:32 +03:00
Emmanouil Papadeas dcebf894bf Fix crash when importing a spritesheet as a new layer, undoing and then exporting
Thanks to @Variable-ind for the fix.
2022-07-29 17:41:38 +03:00
Variable 937e895aef
Fix (slightly) wrong color being drawn when selected from palette (#729)
* fixed the bug for simle and pixel perfect

* fix wrong color drawn for bucket tool

* fixed an accidental change
2022-07-29 15:31:06 +03:00
Variable 9d71c7e6bc
removed initial angle quick rotation buttons (#728) 2022-07-29 12:38:25 +03:00
Emmanouil Papadeas 1350720a8f Fix Rotxel with Smear producing wrong alpha values for pixels outside the selection 2022-07-28 12:18:49 +03:00
Emmanouil Papadeas 559da5414b Implement @azagaya's rotation with smear shader 2022-07-28 01:04:24 +03:00
Emmanouil Papadeas 68ad07572a Some more minor changes in rotate image dialog and script 2022-07-25 17:47:01 +03:00
Emmanouil Papadeas 42942d2c0a Fix pivot drag not working in the Web version 2022-07-25 14:58:17 +03:00
Emmanouil Papadeas dfc8499d06 Changes in the Rotate image dialog and script 2022-07-25 14:39:23 +03:00
Variable 7381311e71
Pivot remembering and algorithm re-arrangement (#724)
* Make pivot remember it's last position

* formatting

* Re-arranged algorithms

According to their speed

* Accidentally left popup visible
2022-07-25 03:01:23 +03:00
Variable cca36b52e4
Upgrade current_cel to selected_cel for Preview Display (#722)
* 1 of 3

* 2 of 3

* 3 of 3
2022-07-24 02:20:58 +03:00
Variable 43a8a04704
Expose pivot Option (#720)
* Added the pivot system

* Some re-arrangement

* a bug-fix

* fixed a conversion scale bug

The problem was the conversion from rect to pixel scale was not properly done, i changed it so that it sets conversion factor of shorter side according to the longer side

* Fix to allow manual pivoting

* remove an update()

i may have added it my self but i think its not needed now

* made shader pivot consistent with gd script

by doing `pivot + Vector2(0.5, 0.5)` for "Nearest neighbour (Shader)"

* Cosmetics

* Formatting

* more formatting

* an optimization
2022-07-23 23:31:39 +03:00
Emmanouil Papadeas 388c121520 Make the canvas preview play button respect frame tags 2022-07-21 22:26:01 +03:00
Variable d7065ad6ae
Handle extension improvements (#715)
* Added crash protection

* removed an empty line

* Formatting

* more Formatting
2022-07-20 15:22:43 +03:00
Emmanouil Papadeas 69f25d398e Update Main.gd 2022-07-18 22:12:17 +03:00
Emmanouil Papadeas 0b1ea0d680 Made Guide.gd a bit easier to read 2022-07-15 21:13:46 +03:00
Emmanouil Papadeas 95cf6afb47 Added a get_global() method in ExtensionsAPI
In case an extension needs to use properties that can only be found in Global, such as a setting in the Preferences.
2022-07-14 18:22:19 +03:00
Emmanouil Papadeas 28d178c8d6 Change ifs to elifs in PreferencesDialog.gd's preference_update method 2022-07-10 02:55:18 +03:00
Emmanouil Papadeas a3c9dc8976 Load and save metadata from pxo files
Useful for certain extensions that want to save data in pxo files
2022-07-09 01:08:27 +03:00
Emmanouil Papadeas 29d590f2c2 Let users change left and right tool colors 2022-07-08 03:25:17 +03:00
Emmanouil Papadeas a705f848c9 Change the background left & right colors of tool buttons in code 2022-07-08 02:54:31 +03:00
Emmanouil Papadeas cb4c54617a Make the right tool indicator enabled by default and orange, closes #691 2022-07-08 02:49:40 +03:00
Emmanouil Papadeas 7bcae8e743 Remove duplicated lines from TopMenuContainer.gd
And add another idle_frame yield to _save_project_file_as()
2022-07-08 02:22:06 +03:00
Emmanouil Papadeas 5d65e82070 Fix issue with save file dialog taking the name of the first file it sees
Instead of using the project's name. This could've caused issues if the user accidentally replaced the previous file.
2022-07-07 17:39:16 +03:00
Emmanouil Papadeas a368ea500a Add more methods to ExtensionsAPI 2022-07-07 01:37:04 +03:00
Emmanouil Papadeas b5d268e7e1 Reload extension if the user is trying to add it and it already exists
Restarting Pixelorama to reload an extension should no longer be required
2022-07-06 00:12:38 +03:00
Emmanouil Papadeas 694c6c7509 [skip ci] Fix typos 2022-07-05 00:31:57 +03:00
Emmanouil Papadeas f432defd1f Fix symmetry points being wrong on project initialization
The symmetry points were wrong if the "Show Guides" option in the View menu is toggled off, and mirroring was enabled.
2022-07-04 21:36:19 +03:00
Emmanouil Papadeas 23f591a862 Support even-numbered rectangle and ellipse sizes in the shape tools
Needs testing.
2022-07-04 20:44:23 +03:00
Emmanouil Papadeas 55935bcfd2 Fix wrong color picker shortcut in shape tools and remove unneeded method 2022-07-04 03:09:43 +03:00
Variable feb68a21a5
Fixed move offsets (#713)
* Fixed move offsets

* Formatting

* More formatting

* Some more Formatting
2022-07-04 02:41:26 +03:00
Emmanouil Papadeas 8a922a255c Fix move tool grid offset snapping, follow-up to #712
Also re-formatted SelectionTool's draw_move()
2022-07-03 00:04:01 +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
Variable 9805af36b0
offset corrections (#712)
* offset corrections

* formatting
2022-07-02 16:26:53 +03:00
Variable b95d884dcc
Onion icon change (#711)
* aspect changes for changed icon

* New "expandable" icon
2022-07-01 14:48:10 +03:00
Emmanouil Papadeas 90d2473f52 Fix macOS crash 2022-06-29 23:41:53 +03:00
Emmanouil Papadeas 30f9a3875d Import multiple images at once from File > Open 2022-06-27 14:51:26 +03:00
Emmanouil Papadeas 31b56500c2 Make Pixelorama work on Godot 3.5-rc4
For some reason it crashes without this fix, while it did not crash in RC3.
2022-06-26 01:39:25 +03:00
Variable c3eaddd9ca
Implemented text clipboard system instead of the old one (#693)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* added error calculation

* revert last commit

* Implemented OS.clipboard (using var2str())

* some sanity checks

* formatting

* use text system instead of os clibboard
2022-06-23 20:14:03 +03:00
Grant Moyer 8cfdcb5ebc
Add reset button to tile mode offsets dialog (#708)
I forgot to implement this requested feature in #707
2022-06-21 18:10:59 +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 c508b554d0 On quit, make "Save & Exit" the focused button by default 2022-06-16 00:15:54 +03:00
Emmanouil Papadeas 7b067de20e Image effect refactors 2022-06-12 00:27:59 +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
Matteo Piovanelli 872ac62722
Reworked draw_tool (#705)
* Refactored `draw_tool`

In draw.gd, efactored the `draw_tool(position)` function to memorize a
few preliminary steps that may be skipped on every pixel.

* Reformat

* Reformat

* Improved _set_pixel

Memorized a few results per-stroke rather than recomputing them on each
pixel.

* Refactor

* Improved draw_tool_circle

Memorized the shape of the circle as a vector of displacements from
the center to avoid recomputing the whole circle at every position.

* Refactor

* Reworked drat tool methods

I changed the implementations to use private functions that return the
array of points that would be affected by the tool. This way, when we
are drawing a stroke of a tool, we can get all points affected by the
stroke, filter out duplicates, and only set pixels once.

* refactor
2022-06-10 16:30:08 +03:00
Emmanouil Papadeas e4607a46bc Release v0.10.1-stable 2022-06-06 15:43:51 +03:00
Emmanouil Papadeas 0020029871 Update AboutDialog.gd 2022-06-05 17:51:59 +03:00
Emmanouil Papadeas 7683af09df Change 1f to 1.0 in shaders
This makes them work on Godot 3.5
2022-06-02 00:04:08 +03:00
Matteo Piovanelli 06d591c7ad
Only update brush size config if size changed (#704)
This is the fix I proposed in #703 after noticing that the code in `update_config()` was being executed twice when changing the size of brushes.
2022-06-01 14:43:52 +03:00
Emmanouil Papadeas 081ce90a08 Internal changes in SelectionTool regarding snap to grid transformation
These changes allow users to set the left (or right) mouse buttons as mapped shortcuts to the transform snap grid action, in order to automatically snap to grid while moving a selection.
2022-05-29 14:10:18 +03:00
Emmanouil Papadeas c3d56ee547 Add a warning label to window opacity if fullscreen is enabled 2022-05-28 18:23:52 +03:00
Emmanouil Papadeas 2d404dd9ab Fix window opacity not working after entering fullscreen 2022-05-28 17:29:38 +03:00
Emmanouil Papadeas 5e5925b8c6 Update OpenSave.gd 2022-05-22 00:01:17 +03:00
Emmanouil Papadeas 2ae7d638d4 Add missing menu shortcuts 2022-05-21 00:50:39 +03:00
Emmanouil Papadeas b8ed7b382e Remember grid, pixel grid, guides and rulers view menu settings
The next time Pixelorama opens, it will remember your settings.
2022-05-20 18:50:06 +03:00
Emmanouil Papadeas d7cfa87ffa Optimize Magic Wand tool based on #667 and #672 2022-05-20 17:47:19 +03:00
Emmanouil Papadeas c3c337280e Update tile mode on project switch 2022-05-20 14:08:01 +03:00
Emmanouil Papadeas 6b5a835322 Change quick color picker shortcut name 2022-05-20 10:59:25 +03:00
Emmanouil Papadeas b66ea70a92 Fix scale image aspect ratio not updating correctly when the dialog is about to appear 2022-05-19 15:16:28 +03:00
Emmanouil Papadeas 0ad3d16b57 Update translations 2022-05-18 21:46:48 +03:00
Emmanouil Papadeas e2550bba47 In the backup confirmation dialog, change "Delete" to "Discard all" and add Cancel button
Cancel and X button keep the backups in memory, discard deletes them.
2022-05-18 15:51:17 +03:00
Emmanouil Papadeas a478dee88e Treat X as delete in the backup confirmation dialog 2022-05-18 14:42:36 +03:00
Emmanouil Papadeas f327eccaa1 Delete content in all selected cels, and not when a layer is locked/invisible 2022-05-17 19:48:06 +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 4a16700b80 Show correct tool modifier shortcuts in the tool button tooltips 2022-05-16 19:46:26 +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
Emmanouil Papadeas 1e0eb19c15 Don't fill color when creating a new empty frame if the color is transparent 2022-05-15 22:05:35 +03:00
Variable c1759c74eb
Draw UI improvements (#671)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* Some improvements

1) A Smarter Placement of "brushes_popup"
2) A Different Convention for image brushes (100 % instead of 1px)

* Formatting

* some more formatting
2022-05-11 15:46:29 +03:00
AlphinAlbukhari 55b5cc3932
Fix drop shadow (#690)
* Fix drop shadow

* Connect signal

AffectOptionButton didn't work
2022-05-04 01:02:20 +03:00
Variable 0232f95c84
Shader Rotation fix (#687)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* added error calculation

* revert last commit

* fixed rotation bug caused on some transparency

* fix for a bug

when selection was present

* added a comment

* added a fix when selection was enabled

* formating

* fixed another bug

* Added quick buttons for rotation
2022-05-03 19:38:29 +03:00
Emmanouil Papadeas 9e7dd1210b Fix flood fill bug mentioned in https://github.com/Orama-Interactive/Pixelorama/pull/672#issuecomment-1114762474 2022-05-03 00:58:14 +03:00
Emmanouil Papadeas 9a43d4bd34 Change "Step" and "Dithering" gradients to "Linear Step" and "Linear Dithering" 2022-05-02 16:53:13 +03:00
Emmanouil Papadeas cf926942ac
Shader-based gradients (#677)
* Add 6 shader-based gradient types

* Shaders now respect selection

* Fix step gradient

* Remove comments

* Disable step and dithering shaders in Web version

* Fixed a weird bug with dithering shaders, selection and GLES2

Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit.

* Format & lint

* Removed old gradient code

* Change how centers work on radial step and dithering

* Made angle, center and radius option a bit more clear

* Rename bayer-matrices directory to dither-matrices

* Use DitherMatrix class

* Create dithering types programmatically

* Remove unneeded code in shaders

* Rewrite the step shader without a for loop

More optimized and works on the Web version with GLES2

* Rewrite radial step and dithering shaders without for loop

Now all shaders work on the Web version and have been optimized.

* Fix Linear & Radial size range and remove some unneeded lines

* Added size uniform to Radial Step and Radial Dither

* Swap colors in the Linear gradient

* Make size a percentage

* Make the preview look the same as the result

Didn't change the dithering shaders because they seemed to give different results.

* Remove ratio uniform and divide uvs by the radius instead

This makes more sense because the smaller the number, the smaller the radius.

* Fix linear gradient

* Change Position to percentage and "Size" to "Transition size"

* Mix gradients with original color, if the gradient colors have transparency
2022-05-02 16:12:00 +03:00
Emmanouil Papadeas 539ccb2e58 Fix issue with the bucket tool's "same color pixels" method not working in all selected cels 2022-05-01 03:28:45 +03:00
Variable 5475643079
View Export dimensions (#686)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* added error calculation

* revert last commit

* The Export file dimensions

* formating

* formatting
2022-04-30 19:32:55 +03:00
AlphinAlbukhari 74ae37eb6e
Shader based rotation (#683)
* Add Shader based rotation

* Selection, aspect ratio and edge border

* Change Shader option to Nearest neighbour (Shader)

* Resolve Conflict

* Remove Whitespaces
2022-04-29 18:54:50 +03:00
Matteo Piovanelli c44feb50a7
Refactored bucket.gd (#681)
* Refactored bucket.gd
Separated out the larger functions to ease readability and possible
future improvements.

* Removed debug comment
2022-04-29 00:56:55 +03:00
Emmanouil Papadeas 1f28672eea Fix last end of the last tag being cut off 2022-04-28 19:17:58 +03:00
Emmanouil Papadeas 09a2d70ed0 Update PreferencesDialog.tscn 2022-04-28 18:26:37 +03:00
Variable 12c9d02f12
Better timeline scrolls (#682)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* added error calculation

* revert last commit

* Updated Scrollbar behaviour

* formatting

* removed some bugs

* Update AnimationTimeline.gd

* formatting

* some more formatting +

Removed unwanted function

* formatting

* removed print()
2022-04-28 18:06:41 +03:00
Variable 252e93cc9c
Transparency improvements (#680)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* added error calculation

* revert last commit

* Error calculations

* Update UITransparency.gdshader

* Update UITransparency.gdshader

* Update UITransparency.gdshader

* used "screen_uv" instead of "UV"
2022-04-28 00:03:56 +03:00
Variable b9a841a360
Rotation improvements (#676)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* Pivot correction in case of even size

* fix the Scale3x

it should not remove the edges now

* formatting

* more formatting
2022-04-27 16:27:33 +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
AlphinAlbukhari 7b721ca66d
Add Drop Shadow (#674) 2022-04-27 14:48:31 +03:00
Emmanouil Papadeas 63759d3607 Remove affect_selection and has_selection checks from Shaders 2022-04-23 14:39:17 +03:00
Emmanouil Papadeas 2da5b1e944 Outline generation with shaders
This results in both better and faster results. Unfortunately, the shader does not work in the Web version, so we have to rely on the old method for that platform.
2022-04-22 21:11:02 +03:00
Emmanouil Papadeas 7215f3e0a7 Fix formatting
No linter erros fixed yet
2022-04-22 15:42:36 +03:00
Emmanouil Papadeas 19512e4516 Change "Flip" window title to "Mirror Image"
Also made Horizontal enabled by default
2022-04-22 15:38:08 +03:00
Matteo Piovanelli 1a19c3a297
Further speed up of bucket fill (#672)
* Removed some calls to can_pixel_get_drawn by
managing has_selection condition differently

* Refactored `_set_pixel` to shortcircuit.
This allowed shortcircuiting away some tests to speed up common code
paths.

* Further refactor of `_set_pixel`
Removed unused functions. Made conditions for pattern-fills clearer.

* Refactor.

* Refactor.

* Removed dev timers.
2022-04-21 04:57:39 +03:00
Emmanouil Papadeas 7c6cdadb86 Optimize shader-based image effects when there is no selection 2022-04-20 03:06:58 +03:00
Emmanouil Papadeas 1e73ce5aa6 Fix export bug where the path is being changed if there's a folder with the same name as the file 2022-04-20 02:49:48 +03:00
Variable 77513b6ba3
Export conflict (#669)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* added more info about export conflict

* more info about export conflict

* Update Export.gd

* Update ExportDialog.tscn

* fixed a small mistake
2022-04-19 19:29:21 +03:00
Manolis Papadeas bdd32a8239 Make marching ants shader ratio-independent 2022-04-18 15:32:14 +03:00
Matteo Piovanelli 6a7ee3407c
Upgrade/floodfill (#667)
* Implemented floodfill routine by Shawn Hargreaves

* Removed performance timers used for testing

* Reformatting file after setting "Trim Trailing
Whitespace On Save".

* Refactoring to respect code guidelines.

* More reformatting

* More refactoring

* Refactor: added # gdlint: ignore=max-line-length
to line the parser has me set to longer than 100 chars

* Manage selected areas
2022-04-16 12:22:51 +03:00
Manolis Papadeas f42f75aa28 Update TopMenuContainer.gd 2022-04-14 18:33:42 +03:00
Manolis Papadeas fc482831a8 Update tags to 0.10 2022-04-14 18:32:39 +03:00
Manolis Papadeas 93c122f07b Update Uch and Kalpar's social media links 2022-04-14 17:29:32 +03:00
Manolis Papadeas bc11dcfd4b Update the splash screen artworks 2022-04-14 01:13:42 +03:00
Manolis Papadeas 87c4d4c310 Update AboutDialog.gd 2022-04-11 00:43:44 +03:00
Manolis Papadeas b0e4636c66 Properly center the splash screen on application start 2022-04-10 15:41:07 +03:00
Manolis Papadeas d8830d7f06 bool support for shaders
Feature not exposed to the end user yet
2022-04-10 00:04:45 +03:00
Manolis Papadeas c7f9f1d23b vec2 support for shaders
Feature not exposed to the end user yet
2022-04-09 23:28:57 +03:00
Manolis Papadeas d579118bb1 Load textures for sampler2D uniforms in the experimental shader feature
Feature not exposed to the end user yet
2022-04-09 03:42:34 +03:00
Manolis Papadeas 41d9add6a7 Change shader color in the experimental shader feature
Feature not exposed to the end user yet
2022-04-08 02:57:58 +03:00
Manolis Papadeas 8e9243b8c1 Update Main.gd 2022-04-06 00:30:34 +03:00
Manolis Papadeas 980b39d21b Update AboutDialog.gd 2022-04-02 17:10:16 +03:00
Manolis Papadeas 44e5fcfb87 Change global tool option textures 2022-04-01 13:45:24 +03:00
Manolis Papadeas d01d0a287a Make cut not work on locked/invisible layers 2022-03-31 17:30:25 +03:00
Manolis Papadeas 11b6af07f1 Update Translations 2022-03-31 02:29:23 +03:00
Manolis Papadeas a79f368f41 Fix aspect ratio in scale image to work as it does in create image 2022-03-30 16:12:19 +03:00
Manolis Papadeas 8a5cc6860f Move layer and frame initial creation code to Main.gd
From Global.gd
2022-03-29 03:14:41 +03:00
Manolis Papadeas 66ad745c52 Minor code changes 2022-03-29 02:35:32 +03:00
Manolis Papadeas 4cdd20a2fe Fix issue with export preview not working when importing an image 2022-03-27 04:19:47 +03:00
Manolis Papadeas e901fc774a Replace "Export" with "Overwrite" when importing a png
When exporting an imported image, the export will happen immediately, without having the export dialog appear, unless "Export as..." is selected. For .png imported images, the menu option will display "Overwrite" instead of "Export". This makes it clear that if Control + E is pressed on an imported png, that file will be overwritten.
2022-03-25 02:00:40 +02:00
Manolis Papadeas bd6f850ab5 Rename "Flip" into "Mirror Image" 2022-03-24 20:01:31 +02:00
Manolis Papadeas 3727caf9c4 Revert "Use L8 format for selection texture"
This reverts commit 8a3414f83a.
2022-03-23 03:56:47 +02:00
Manolis Papadeas 8a3414f83a Use L8 format for selection texture
Instead of LA8. This should result in slightly less memory usage and is more on par with Godot's BitMap "convert_to_image" method, which will be exposed in Godot 3.5.
2022-03-23 01:48:58 +02:00
Manolis Papadeas 8624ed6da8 Fix macOS shortcuts 2022-03-22 01:48:14 +02:00
Manolis Papadeas 9648b48a96 Remove empty project when importing an image
This should no longer keep empty canvases when importing images
2022-03-21 23:33:45 +02:00
Manolis Papadeas 4cf9c57e84 Don't reset export status when a pxo is saved 2022-03-21 23:07:57 +02:00
Manolis Papadeas 57729ef4e9 Move Moveable Panels to the Panels submenu 2022-03-21 18:04:26 +02:00
Manolis Papadeas bf98dd18e6 Remove the "Palettes" label from the Palettes panel 2022-03-21 16:24:03 +02:00
Manolis Papadeas 1c3103e06b Scale custom cursor with UI size - closes #642 2022-03-21 02:24:13 +02:00
Manolis Papadeas 0e79138d87 Another canvas texture optimization + bug fix with resizing 2022-03-20 18:52:48 +02:00
ArthyChaux 9e5db16994
Optimize canvas texture updates (#661)
In this line, a new texture is generated each time the canvas is updated it seems :
But it is mentionned in the documentation to use `void set_data(image: Image)` instead for slightly faster results, which updates the texture instead of creating a new one.

I hope that it is relevant !

Also, if it is approved, this change should be applied to everywhere it is used (except when initializing the texture)
2022-03-19 19:21:07 +02:00
Manolis Papadeas 9411f37a47 Add a confirmation dialog when deleting a layout 2022-03-18 04:21:38 +02:00
Manolis Papadeas 9128b455e6 Transparent canvas now works properly with scaled UI 2022-03-18 01:08:00 +02:00
Manolis Papadeas 4059cb018b In ResizeCanvas, always set the spinbox values to the current project size 2022-03-18 00:07:40 +02:00
Manolis Papadeas 790cd8533a Changes to ManageLayouts dialog 2022-03-18 00:03:53 +02:00
Manolis Papadeas 21b4f3369f Select layer when clicking a layer button (visible, lock, etc) 2022-03-17 00:12:00 +02:00
Manolis Papadeas bffc36a018 Change Layout menu and rename Edit Mode to Moveable Panels 2022-03-16 00:30:24 +02:00
Manolis Papadeas 5d3963d495 Make panel tabs always visible if there are 2 or more tabs in a single panel 2022-03-12 20:46:17 +02:00
Manolis Papadeas 6d641259d5 Make it possible for extensions to add menu items
With metadata
2022-03-11 01:59:12 +02:00
Manolis Papadeas f2a24aaffd Set grayscale vision node properties instead of in code 2022-03-11 01:48:50 +02:00
Manolis Papadeas 5995788ef7 Update donors & translators 2022-03-11 00:45:48 +02:00
Manolis Papadeas c00aac944e Translate the panel tab names 2022-03-10 19:17:28 +02:00
Manolis Papadeas 294738e48a Disable "From Current Palette" preset option when creating a new palette, if there is no current palette
Fixes #659
2022-03-07 19:33:23 +02:00
Manolis Papadeas 07473bea95 Update UI.gd 2022-03-06 00:15:25 +02:00
Variable 57ea4d25f1
Draw optimizer (#657)
* draw optimizer

* improvements

* some memory improvements

don't think this one's needed but doing it just in case...

* formatting

* add limit change with brush

* fixed a small bug

cache was being kept when frames were changed

* formatting

* change `_cache_limit` on changing `_brush_size`
2022-03-03 14:54:27 +02:00
Manolis Papadeas ce026395df Remember layout on app exit 2022-03-02 00:41:22 +02:00
Manolis Papadeas 2f9de65805 Zen mode no longer makes invisible elements visible again 2022-03-02 00:01:28 +02:00
Manolis Papadeas 175eb0b250 Set minimum size in tools, tool options and timeline 2022-03-01 21:39:07 +02:00
Manolis Papadeas da34f0ae7b Center the global tool options 2022-03-01 02:16:53 +02:00
Manolis Papadeas 092ddc0a7a Fix crash when we change a non-existant texture in a TextureRect
This should never happen, but just in case.
2022-02-28 20:40:13 +02:00
Manolis Papadeas 68414f5bd9 Made pixel perfect into a global tool option
More global tool options will most likely be added soon, most notably tablet pen pressure sensitivity options.
2022-02-28 19:24:14 +02:00
Manolis Papadeas b316cadfb8 Separate global tool options from the color pickers 2022-02-28 18:59:30 +02:00
Variable bec30112f6
improvements to copy\delete methods and (some) tag workflow (#648)
* improvements to copy and delete methods

To allow cloning/deleting an array of frames

* formatting

* adapt to the new copy/delete methods

* Update AnimationTimeline.gd

* removed some bugs

* changed old tag behaviour

tags ahead get further by 1 frame on add_frame()

* modified tag behaviour

* formatting

* removed tag interaction
2022-02-28 03:31:17 +02:00
Manolis Papadeas e05ee53839 Fix mirror button textures having the opposite file name 2022-02-26 19:50:43 +02:00
Variable de2d7b7748
A simple id for extensions (#653)
* A simple id for extensions

A simple id system for extensions using the benefit of groups

* formatting
2022-02-26 16:14:13 +02:00
Variable 906123bab1
Sync import options (#624)
* sync import options (1/2)

* sync import options (2/2)

* resolve format check

* a minor improvement +

some code formatting

* some more formatting

* Some  more formatting

...the checks becoming a pain...

* again you guessed it!

CODE FORMATTING

* used checkbutton instead of simple button

* formatting
2022-02-25 16:08:11 +02:00
Manolis Papadeas 8e126c3bab Load shaders by dragging and dropping and support hint_range values
This is for the experimental shader feature, which isn't exposed to the user yet.
2022-02-24 03:38:13 +02:00
Manolis Papadeas d4373a680b Use preload on the tool scenes again
This makes the initial app load time fast again, as it used to be before the tool logic changes. The code is uglier to read now but it's worth it.

Also optimize update_tool_cursors()
2022-02-23 00:10:16 +02:00
Manolis Papadeas 63a9f2485c Support tools that don't have shortcuts
Might be useful for Extensions that add tools and for the future where we allow users more freedom with shortcut binding, including unbinding shortcuts.
2022-02-22 23:38:47 +02:00
Manolis Papadeas 77f598d969 Added remove_tool() method in Tools
May be useful for extensions that add new tools
2022-02-22 02:58:52 +02:00
Manolis Papadeas 4d3cb86800 Change the look of the mirror buttons 2022-02-21 20:04:39 +02:00
Manolis Papadeas 200d1c73a1 Add a clear_color property to the themes 2022-02-21 18:44:46 +02:00
Manolis Papadeas add9ba926e Remove pre-set tool button nodes, tool setup now being done only in the Tools singleton
Now when making a new tool we only have to set it up in Tools.gd, along with its button and cursor textures and its tool options scene. Previously, we also had to put it in ToolButtons.gd and manually create a button in Tools.tscn
2022-02-21 18:02:02 +02:00
Manolis Papadeas 5bf9da243f Add the Extensions parent node to Main.tscn 2022-02-21 15:46:08 +02:00
Manolis Papadeas 8d0418fe21 Don't do anything if the user adds an already existing extension
The .pck file gets replaced but changes will only be visible on app restart, as there's no way (I think) to unload and then reload the .pck file.
2022-02-21 03:33:05 +02:00
Manolis Papadeas 375f3d4cb6 Implement a basic extension system
Importing .pck or .zip Godot resource pack files into Pixelorama is now possible. This needs to be documented properly, but here's the basic idea, for now at least. This is super early work and I haven't tested it with a proper extension yet, so all of this could be a subject of change. I tested it with a custom theme extension though and it seems to be working perfectly.

Importing resource pack files, either by dragging and dropping them into the app window or by going to Edit>Preferences>Extensions>Add Extension, copies the files into user://extensions/. Extensions can be enabled/disabled and uninstalled. Uninstalling them deletes the resource pack files from user://extensions/.

The extension project source files need to be in a folder inside src/Extensions/ with the same name as the .pck or .zip file. **This is required for now, otherwise it will not work.** Inside that folder there also needs to be an extension.json file, with a structure similar to this:

{
	"name": "ExtensionName",
	"display_name": "Extension Name",
	"description": "A Pixelorama extension",
	"author": "Orama Interactive",
	"version": "0.1",
	"license": "MIT",
	"nodes": [
		"ExtensionExample.tscn"
	]
}

The `nodes` array leads to the packed scene files with the nodes that are to be instantiated. **The root nodes of these scenes need to have the same name as the .tscn files they belong to.** The scripts of these nodes should have _enter_tree() and _exit_tree() methods to handle the extension enabling/disabling (or even uninstalling) logic. Note that .json files need to be included in the export options while exporting the extension from Godot.

Enabling an extension means that the scenes found in the extension.json's "nodes" array get instantiated, and disabling gets rid of these nodes from Pixelorama's SceneTree.
2022-02-19 03:21:08 +02:00
Manolis Papadeas bafcb2620a Tidy up preferences code
Use a Preference class instead of a nested array. Lines of code reduced from 461 to 330. Also fixed a minor bug in the Web version where, when the user changed language, "Interface" was being selected instead.
2022-02-18 01:47:05 +02:00
Manolis Papadeas d37d3c5d3d Even more theme code tidying 2022-02-17 20:57:54 +02:00
Manolis Papadeas 71dcb9807d Theme code cleaning and tidying 2022-02-17 20:36:10 +02:00
Manolis Papadeas 290e8cdb18 Remove mirror nodes from the tool scenes 2022-02-17 16:12:07 +02:00
Manolis Papadeas 93622d5761 Mirroring buttons now affect both left & right tools 2022-02-17 16:07:03 +02:00
Manolis Papadeas 9e7748d2ec Fix rare issue where the splash screen never appears and the program is unresponsive 2022-02-17 15:22:34 +02:00
Manolis Papadeas 8b53773d2d Split View menu into View and Window menus 2022-02-17 00:54:09 +02:00
Manolis Papadeas e0d2393eb2 Fix crash when importing .tres files that are not palettes 2022-02-16 18:23:32 +02:00
Variable 008683a33a
Novhack fill shader (#649)
* Get same color pixels shader (#2)

* Replace same color pixels bucket code with a shader

* Add pattern fill

Co-authored-by: novhack <42614907+novhack@users.noreply.github.com>

* formatting

* some minor changes and fixed a bug

* added similarity feature

* formatting

* Update Bucket.gd

* added similarity feature in shader

Co-authored-by: novhack <42614907+novhack@users.noreply.github.com>
2022-02-16 00:15:53 +02:00
Manolis Papadeas 196c5c2d5d Make the second canvas a separate panel and have it hidden by default 2022-02-15 01:48:49 +02:00
Manolis Papadeas a29aadd519 Use deferred mode for gradient color pickers - Closes #645 2022-02-14 15:37:18 +02:00
Manolis Papadeas 88578fe260 Set the min size of the tools to be a bit smaller 2022-02-13 00:12:47 +02:00
Manolis Papadeas d26d1e294b Fix cursor always being a cross on the canvas even if it's toggled off 2022-02-12 04:25:08 +02:00
Variable f7e866e9cb
Shader vision - Grayscale view (#646)
* ShaderVision Funcionality

* reference to ShaderVision

* Greyscale shader

* A minor code improvement

* decided on a checkbox

* decided on a checkbox

i foresaw the earlier implementation isn't required so i decided on a checkbox

* removed unneeded code

* reverted a mistake commit

* Update TopMenuContainer.gd

* Precieved Brightness
2022-02-12 00:47:26 +02:00
Variable 25fd6026be
Move Guides without moving mouse outside canvas (#647)
* guide movement enhancement

* Gave more access to pan tool

* Update Guide.gd

* Update Guide.gd

* Update Tools.gd
2022-02-11 03:16:33 +02:00
Manolis Papadeas 74df57ed70 Add extra cursor options to the Preferences
Changes "Indicators" to "Cursors" and adds options that let the user use the native mouse cursors of the OS and toggle the cross cursor on or off for the canvas
2022-02-10 22:32:55 +02:00
Manolis Papadeas 1285fa89c5 Added a Scrollcontainer in the timeline
This fixes the issue with the timeline UI nodes affecting the rest of the panels if the timeline becomes too small. Kind of an ugly fix because there can now be two scrollbars visible if there are many frames, eventually we may need to redesign the timeline.
2022-02-10 19:15:57 +02:00
Manolis Papadeas a3e933cf4f Fix a bug where the selection got stuck to the canvas boundaries when they were 1px away from them 2022-02-09 16:14:16 +02:00
Manolis Papadeas a331d697ed Move some variables in AnimationTimeline
No functional changes
2022-02-07 18:10:29 +02:00
Manolis Papadeas 4fe65fabf7 Rename "Dockers" to "Panels" and update Translations.pot 2022-02-07 01:18:19 +02:00
Manolis Papadeas 8394f252f7 Implemented a system that lets the user make and delete their own UI layouts
Layouts are being saved as .tres files in user://layouts
2022-02-06 01:49:54 +02:00
Manolis Papadeas 26d5b8de40 Added MysteryStudio to the splash screen 2022-02-05 23:50:02 +02:00
Manolis Papadeas 1dd7d23682 Minor timeline UI fix 2022-02-04 17:03:57 +02:00
Manolis Papadeas ad9d8cfdbc Properly fix the palette panel initialization issue
And remove the hacky way. The issue is that the swatches were being created and then queue_freed at the end of the frame and not immediately.
2022-02-03 19:57:53 +02:00
Manolis Papadeas f96879012d Fix orphan node 2022-02-03 02:41:14 +02:00
Manolis Papadeas 0893a5b481 Added frame duration appear in the frame button tooltips
Code provided by @Variable-ind
2022-02-02 18:14:16 +02:00
Manolis Papadeas 13229031ed Turn zen mode off when switching between layouts 2022-02-02 02:51:43 +02:00
Variable 4369869e1f
Some Popup changes and added Self Awareness ;) (#644)
* Some Popup changes and added self awareness

start/end is automatically determined by selected cels boundary

* Update FrameTagDialog.gd

* some more code formatting
2022-02-02 00:40:37 +02:00
Manolis Papadeas 12b64316da Added layout selection
Users can currently select between Default and Tallscreen
2022-02-01 02:31:13 +02:00
Manolis Papadeas cbae8bdc77 Put a ScrollContainer in the tool bar 2022-02-01 00:54:33 +02:00
Manolis Papadeas c7649bc061 Save toolbar as a separate scene 2022-01-31 19:01:55 +02:00
Manolis Papadeas 7e9d9a6a73 Make layer button container change color based on theme
Also removed unneeded node from AnimationTimeline
2022-01-31 18:25:52 +02:00
Variable 748a172b7b
Transparency fixes (#641)
* added a node path

* removed a line that's not needed

* added shader transparency "illusion"

before it "Alternate transparent background" was used.

* code formatting

* shader for ui transparency

* some more formatting

* more formatting...
2022-01-31 02:18:04 +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 ec54754159 Remove unneeded line in TransparentChecker.gd 2022-01-26 18:33:53 +02:00
Manolis Papadeas 35b10a1cc4 Rewrite the translators code 2022-01-24 20:11:39 +02:00
Manolis Papadeas 686a49d4c5 Release v0.9.2-stable 2022-01-21 16:03:53 +02:00
Manolis Papadeas 2f9960e15e Update AboutDialog.gd 2022-01-11 03:40:46 +02:00
Manolis Papadeas f7a6ed0289 Don't draw in unavailable layers if multiple cels are selected 2022-01-09 00:53:42 +02:00
Manolis Papadeas 9fb9d06c38 Clear mask in Draw tools if it's not needed and it already exists 2022-01-08 17:44:15 +02:00
Manolis Papadeas db8ded9d66 Fix Pencil bug with transparent colors immediately blending when Overwrite is setto false 2022-01-08 17:18:59 +02:00
Manolis Papadeas 0da52326a3 Quitting now detects if changes have been made in other projects too other than the current 2022-01-07 03:36:16 +02:00
mrtripie f0fbca8b5b
Bugfix: Duplicate Shader in ShaderImageEffect before modifiying its code (#630)
* Fixed issues with Shading tool Saturation and Value not always being right in Hue Shading mode

* Shading tool hue shifting fixes and tweaks

* Duplicate shader resource before modifying its code

* added line before comment

Co-authored-by: MrTriPie <MrTriPie>
2022-01-07 01:49:22 +02:00
Manolis Papadeas c242cd546d Add a checkbox in Preferences for quit confirmation
This has no effect if the project has unsaved changes.
2022-01-05 02:34:45 +02:00
Manolis Papadeas 0fa6879bdf Made guides a little easier to select and drag 2022-01-04 21:00:03 +02:00
Manolis Papadeas 8f701dfee0 Fix #626 2022-01-03 14:05:41 +02:00
Manolis Papadeas 04dda09df5 Do not delete cel content if the layer is locked/invisible 2022-01-01 04:12:49 +02:00
Manolis Papadeas 605e7ab3fd Copy frame duration when cloning a frame 2021-12-31 04:05:04 +02:00
Darshan Phaldesai 51288148ee
Shader Fix Hack (#625) 2021-12-30 18:05:28 +02:00
Manolis Papadeas 95ae81eef1 Fix undo error when the user draws on a locked/invisible layer 2021-12-29 21:48:33 +02:00
Variable bbc56e253e
Spritesheet layer improvements (#623)
* Drastically changed an old func()

"open_image_as_spritesheet_layer" (Hope i didn't break anything...)

* removed whitespace

* some minor changes

spritesheet "Start frame" no longer restricted to existing frames number
and a minor UI change

* solved some format errors
2021-12-28 23:45:46 +02:00
Manolis Papadeas 311f4dd70b Add missing line to Desaturate and InvertColors, and made some changes to ShaderImageEffect 2021-12-27 00:08:06 +02:00
Manolis Papadeas 93268fef43 Fix another bug with Undo/Redo where the app became unresponsive if the user drew outside the canvas 2021-12-25 19:21:09 +02:00
Manolis Papadeas b40c2f5b75 Minor UI changes 2021-12-24 03:12:44 +02:00
Manolis Papadeas 48326900d9 Fix a memory leak coming from the Layer class
Removed the "frame_container" property from Layer.gd, which used to hold a reference to a node, leading to orphan nodes being created and never freed. Memory management seems to be working okay now. Previously, every time the user made a change, memory kept going up and never coming down. Now, data that can never be recovered, like undo data that have been rewritten in history, are also removed from memory.
2021-12-23 19:58:07 +02:00
Manolis Papadeas 6a78351704 Fix undoredo not working if the users draws on a locked/invisible layer 2021-12-21 01:26:58 +02:00
Manolis Papadeas 50885b8769 Release v0.9.1-stable 2021-12-20 13:45:53 +02:00
Manolis Papadeas 30f2873ed1 Remove unneeded method from HTML5FileExchange 2021-12-18 02:31:10 +02:00
Manolis Papadeas 92c252e22d Fixes #618 2021-12-15 01:39:24 +02:00
Manolis Papadeas 28341a18d2 The autosave timer no longer starts after the backup confirmation dialog gets hidden, if the autosave option is turned off in the Preferences 2021-12-14 21:51:52 +02:00
Manolis Papadeas 7b7c572f13 Fix issue where the timeline would be unresponsive if zen mode was toggled off and on 2021-12-12 17:11:25 +02:00
Manolis Papadeas 750fae4713 Project data no longer remain in memory after the user has removed their tab 2021-12-11 21:29:32 +02:00
Manolis Papadeas 057318f659 Pause the app when it loses focus instead of limiting its FPS 2021-12-11 20:02:51 +02:00
Manolis Papadeas 47943703ec Update CHANGELOG & AboutDialog 2021-12-07 02:20:12 +02:00
Manolis Papadeas 02a74d498c Fix shape tool previews not being updated when modifier keys are being pressed 2021-12-06 19:11:50 +02:00
JumpJetAvocado fa27d7fbad
Fix drawing bug reported in issue-555 (#603)
* Fix drawing bug reported in issue-555

* Remove unused parameter from commit_undo() in Draw.gd
2021-12-06 18:38:54 +02:00
Manolis Papadeas af86856dc6 Added a clipboard pattern button
It starts empty and gets updated every time the user copies something.
2021-12-05 18:37:15 +02:00
Manolis Papadeas 086c6c5b9c Remove unneeded font changing code
Welp, I just found out that Godot's font resources have fallback options. Better late than never, I guess.
2021-12-03 02:39:10 +02:00
Manolis Papadeas 563aab3137 Update AboutDialog.gd 2021-12-03 01:45:57 +02:00
Manolis Papadeas 59ee60151e Change "Rectangle Select" undoredo action to "Select" 2021-12-02 13:25:20 +02:00
Manolis Papadeas 67ec887ad1 Just one method for undo/redo in Global.gd 2021-12-02 02:22:32 +02:00
Manolis Papadeas f70efe3076 Move new_empty_frame() to Project.gd from Canvas.gd
This commit also changes the behavior of the fill color. The new cels now only get filled with the Project.fill_color if they are on the bottom layer.
2021-12-01 20:50:50 +02:00
Manolis Papadeas 4c60ef144f Fixed project not having the correct size if the default image size has been changed in the Preferences
Ideally, the new_empty_frame() method should be removed from Canvas and should probably go to Frame or Project.
2021-12-01 20:02:39 +02:00
Manolis Papadeas f7ef4a4283 Remove handle_undo() and handle_redo() from Canvas.gd
Getting rid of some old, unneeded code.
2021-12-01 17:49:22 +02:00
Manolis Papadeas f3d696ef81 Clear code from ShaderEffect.gd
Now inherits from ImageEffect and uses a ShaderImageEffect to generate the image. We get to clear duplicate code that was shared between ShaderEffect.gd and ShaderImageEffect.gd this way, and it also uses the undo/redo logic from ImageEffect instead of Canvas.gd.
2021-12-01 03:41:20 +02:00
Manolis Papadeas 2cab2af561 Preload image effect shaders 2021-12-01 03:04:40 +02:00
Manolis Papadeas 72aef23cce UI changes to the onion skinning settings
Also changed the ignore text to the "_io" suffix instead of "ignore_onion", because this is quicker to type.
2021-12-01 02:28:12 +02:00
Manolis Papadeas 15d987ebae Changed behavior of flip image to make it work as expected with selections
The selection itself also gets flipped, if there is any
2021-11-30 02:42:35 +02:00
Manolis Papadeas 3835a3f0da Fix all of linter errors 2021-11-29 18:58:40 +02:00
Manolis Papadeas e2a68c4ba4 Add an underscore to private method's names
As a way to differentiate between public and private methods, as per the official GDScript naming convention. Haven't changed all of the codebase yet, just some scripts that had a lot of public methods. This fixed 4 of the 7 errors of the linter.
2021-11-29 17:12:30 +02:00
Manolis Papadeas 540a61ae4d Merge onion skinning past and future into one script 2021-11-26 03:38:00 +02:00
Variable 159a821dd2
Better Onion Skinning (#600)
* better onion part (1/3)

changed code and added scripts

* better onion part (2/3)

added some onion variables

* better onion part (3/3)

Added to onion dialog

* removed whitespace that gave static error
2021-11-26 02:55:08 +02:00
Manolis Papadeas 246f6f9be1 Minor code changes 2021-11-25 19:10:04 +02:00
Manolis Papadeas 8c9545e183 Preload tool scenes
The app now opens just a bit faster
2021-11-25 17:42:35 +02:00
Manolis Papadeas 7489ae3777 Optimize update_hint_tooltips() calls
Now gets called once at the beginning instead of multiple times for every shortcut.
2021-11-25 15:16:56 +02:00
Manolis Papadeas c6b9a1fb82
Format code and add static checks (#599)
* gdformat .

* Lint code - Part 1

* Format code - Part 2

* Lint code - Part 2

Trying to fix the max allowed line length errors

* Add normal_map_invert_y to the image .import files

Because of Godot 3.4

* Do not call private methods outside of the script's scope

Lint code - Part 3

* Format code - Part 3

* Fixed more line length exceeded errors - Lint code Part 3

* Export array of licenses - Lint code part 4

* Clean hint_tooltip code from Global

Removes a lot of lines of code

* Create static-checks.yml

* Fix FreeType's license
2021-11-25 14:48:30 +02:00
Manolis Papadeas 41b5db4622 Don't change the cursor tool icon texture _input() call
Seems like my past self has made some pretty embarassing optimization mistakes...
2021-11-23 02:52:21 +02:00
Manolis Papadeas 536250f517 Moved some variables away from Global 2021-11-23 02:36:22 +02:00
Manolis Papadeas c921344b04 Fix splash screen not appearing in the Web version 2021-11-22 21:38:17 +02:00
Manolis Papadeas 79ff0a8d45 Optimize _input() methods 2021-11-22 21:32:39 +02:00
Manolis Papadeas 4931e50213 Move cursot tool icon visibility to ViewportContainer
I have no idea what I was thinking when I put that code inside Canvas' _input()
2021-11-22 18:43:06 +02:00
Manolis Papadeas 36680795ee Move even more code away from Global
The idea is to make the project less dependant on Global. Global should strictly be used for reusable code in multiple places, not as a second Main. I just hope I'm not breaking anything during this process.
2021-11-22 17:37:06 +02:00
Manolis Papadeas 19c062fa07 Move some PopupMenu code away from Global's _ready() 2021-11-22 16:15:36 +02:00
Manolis Papadeas 88365301fb Change window opacity settings to a dedicated dialog with a slider and a spinbox
Changed from a popupmenu with fixed settings. This should give more freedom to the user while improving UX.
2021-11-22 04:47:41 +02:00
Manolis Papadeas f4c903771d Remove some unneeded yield() calls
And minor changes to make the code a tiny bit more clean. I tested this PR, but it still might be a bit risky.
2021-11-17 19:59:14 +02:00
mrtripie 0081aa365a
Guide Color Improvements (#561)
* Symmetry guide color work

* Changed to semi-transparent guides from red, blend slight blue into symmetry guides for variation

Co-authored-by: MrTriPie <MrTriPie>
2021-11-17 01:48:21 +02:00
Variable 3e88efc118
Improvements to Animation Tags (#560)
* Animation tag fix (a)

fixed tag behavior in "Project.gd"

* Animation tag fix (b)

fixed tag behavior in "AnimationTimeline.gd"

* Animation tag fix (c)

fix top part of line not visible

* Animation tag fix (d)

a fix i forgot about earlier

* added a randomizer...

... to auto select colors of new tags

* Fix Tag scrolling without cels when scrolled on it

* removed randomize() cause it's not needed
2021-11-17 00:21:29 +02:00
mrtripie 969aed8070
Cache Save/Open Sprite Dialog's directory, and keep dialogs synced (#559)
* Open/Save Sprite Dialogs now have their directory cached so when reopening Pixelorama they will be set to that directory. Load last project and load recent project also syncs with the open/save dialogs and caches that directory

* Sets a projects default file path to the cached file directory (not sure about) and if the export directory is blank, use the cached file directory

* Changed 'file_dialog_dir' to 'current_dir'

Co-authored-by: MrTriPie <MrTriPie>
2021-11-17 00:17:02 +02:00
Manolis Papadeas 752703878d Use onready vars for nodes in Global.gd
I have no idea why I didn't do that sooner. This cleared over 80 lines of code.
2021-11-16 00:04:50 +02:00
Manolis Papadeas 1fa0b1e1b7 Hide the "Brush colors from" option from the Eraser tool 2021-11-15 02:03:05 +02:00
Manolis Papadeas 9cfa8c82b1 Make the eraser tool's transparency settings work with brushes 2021-11-14 16:19:38 +02:00
Manolis Papadeas 4f02ea1b97 Alt to pick colors with draw tools - Closes #125 2021-11-14 03:30:00 +02:00
mrtripie a9039cccd5
Canvas Rotation (#558)
* Implemented canvas rotation

Co-authored-by: MrTriPie <MrTriPie>
2021-11-13 20:43:37 +02:00
Jeremy Behreandt 429b37f6fc
Use Luminance In Desaturate Shader (#557)
Updated desaturate shader to use perceptual luminance instead of HSV.
2021-11-12 21:46:29 +02:00
Manolis Papadeas 24d25d49ea Implement #429 2021-11-11 03:21:34 +02:00
Manolis Papadeas 0c1fcdea89 Use JavaScript.download_buffer() for file downloading in the Web version
This commit makes Pixelorama unable to run in Godot versions prior to 3.4.

I wonder if there are plans for an upload_buffer() method as well...
2021-11-10 20:16:25 +02:00
Manolis Papadeas 6e5c4fc99f Do not keep decreasing opacity with the Eraser without releasing the mouse first
Only relevant if the opacity strength is less than 255 in the tool options
2021-11-08 19:26:00 +02:00
Manolis Papadeas 056cb76a46 Minor code cleanups 2021-11-06 17:23:54 +02:00
Manolis Papadeas 87261e93c6 Disable "New Brush" in the Edit menu if there is no selection 2021-11-06 17:19:20 +02:00
Manolis Papadeas f6b15cb562 Fixes #552 2021-11-04 02:46:12 +02:00
Manolis Papadeas 77996c769e Implement #540 and a part of #429 for the zoom tool 2021-11-03 02:33:45 +02:00
Manolis Papadeas 11f8402d57 Change the UI scale slider step to 0.25 from 0.1 2021-11-01 18:23:09 +02:00
Manolis Papadeas 93a8e75bcb Change the backup dialog message 2021-10-26 03:34:14 +03:00
Silent Orb 520e31cd7e
Persist palette selection (#549) 2021-10-17 16:20:11 +03:00
Variable 087387a700
Minor adjs to eraser (#548) 2021-10-15 16:31:24 +03:00
Manolis Papadeas c7f238ff19 Don't show the brush color from option in the Shading tool 2021-10-15 15:49:23 +03:00
Manolis Papadeas cdb7ff1004 Add an opacity option for the Eraser's tool options
This lets the user change the strength of the tool. When it has an opacity of 255, the eraser will completely delete the underlying pixels. If it has less than 255, it will simply subtruct that value from the underlying pixel's alpha.
2021-10-12 23:12:05 +03:00
Manolis Papadeas a5e3afa7e2 Start the autosave timer if the user presses X on the backup confirmation dialog 2021-10-11 20:40:26 +03:00
Manolis Papadeas 4b552a1fdd Enable autowrap for the Backup confirmation dialog 2021-10-11 19:55:25 +03:00
Manolis Papadeas 18ed5b2a05 Update CHANGELOG & AboutDialog 2021-10-07 16:57:26 +03:00
Manolis Papadeas b7e598c438 Fix issue with copying and pasting to a different project that has a smaller canvas
Fixes a bug caused by 86e66495b1
2021-10-06 02:02:56 +03:00
Manolis Papadeas 845bf2bab7 Fixes critical bug that is caused by removing a project tab that is to the left of the currently active tab 2021-10-06 01:51:39 +03:00
Variable da070db27e
Log Option (#546)
* Added Log button option
2021-10-05 23:37:16 +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
Laurenz Reinthaler 502c7d9409
Add idle fps setting and fix bug when moving the mouse outside of the application (#543) 2021-09-29 18:03:45 +03:00
Manolis Papadeas 61fa13cde3 Fix notifications not appearing properly when the UI is scaled 2021-09-27 02:41:45 +03:00
Manolis Papadeas 3b7ac1eddf Fix guides not working properly when the UI is scaled 2021-09-27 01:30:53 +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 86e66495b1 Fix issue with copying and pasting to a different project that has a bigger canvas 2021-09-24 19:23:59 +03:00
Manolis Papadeas f948c24430 Fix Changelog URL 2021-09-24 17:39:02 +03:00
Variable 41d88c1839
Boost HSV and Rotation sliders (#531)
* Added a timer to filter out useless values

This timer will determine if you actually want to view these changes or just want to skip ahead

* a live preview checkbox

* Some dialog improvements

* Minor changes/adjustments
2021-09-23 21:25:35 +03:00
Manolis Papadeas 8f115a726e Fix #541 2021-09-22 21:54:16 +03:00
Laurenz Reinthaler ad37c67690
Add buttons for looking at different splash-screen artworks (#538)
Fix overlooked line of code
2021-09-22 16:06:30 +03:00
Manolis Papadeas d584ae0839 Launch of version 0.9 - selections & shapes update 2021-09-18 18:59:15 +03:00
Manolis Papadeas dc413eb724 Update the splash screen with 3 new artworks for v0.9
Art by Wishdream, Roroto and Kamilayza
2021-09-17 16:37:16 +03:00
Manolis Papadeas f3ea6b57cd Fix opening pre-v0.8 pxo files 2021-09-07 20:31:32 +03:00
Manolis Papadeas 7bbc01d978 Keep the tallscreen hsplit container invisible if we're changing panel layout mode in Zen mode 2021-09-06 17:55:26 +03:00
Manolis Papadeas 3d0d0b0335 Bump version to v0.9-rc3 2021-09-06 17:21:10 +03:00
Manolis Papadeas cae4f39a4b Hide the splash dialog when dragging and dropping a file 2021-09-06 15:36:28 +03:00
Manolis Papadeas da8bc0d057 Added a "Licenses" tab in the About menu, which displays Pixelorama's license as well as the software it depends on, such as Godot 2021-09-05 01:07:12 +03:00
Manolis Papadeas 37916b63ca Update the minimum value of the zoom level spinbox on project change 2021-09-04 16:59:23 +03:00
Manolis Papadeas 47b20ff5c3 Fix the canvas preview having incorrect zoom when switching between projects 2021-09-04 15:32:44 +03:00
Manolis Papadeas e4ba665c2a Always display the close button in tabs and let users close projects other than the current 2021-09-01 18:07:36 +03:00
Variable fb93143906
Dialog improvements (#530)
* Dialog Improvements

Preview now scales with resizing Dialog
2021-08-31 05:38:11 -07:00
Variable 32dc69fee6
Guide corrections (#528)
* Fixed guide size
2021-08-30 15:00:04 -07:00
Variable 75059b5b12
Selection fixes (#527)
* Fix for multiple cel selection issue

Now it will only apply selection to the selected cels that are **visible and unlocked**

* Fix for loss of selection data

This will hopefully fix the selection data loss on toggling layer buttons
2021-08-30 03:24:48 -07:00
Jeremy Behreandt c29254c2e8
DrawingAlgos Explicit Project DataType (#526)
I needed to add the data type to project for the scripts to compile.
2021-08-29 15:59:05 -07:00
Manolis Papadeas 680ab481f3 Don't transform content if layer is locked or invisible 2021-08-30 01:22:13 +03:00
Variable ab18e8bdb6
Transparency updates (#525)
* Update with theme instead of only value change

instantly updates with theme (old version updated on value change only)

* shortened some paths
2021-08-29 10:19:08 -07:00
Manolis Papadeas 3482314971 Fix project's selection bitmap having incorrect size when importing a pxo 2021-08-29 16:26:01 +03:00
Manolis Papadeas e088820c74 Bump version to v0.9-rc1 2021-08-28 20:01:05 +03:00
Manolis Papadeas 79e1ab5e61 Remove unneeded Global.update_hint_tooltips() call 2021-08-27 00:49:01 +03:00
Variable ddc69b8282
Editable zoom (#523)
* editable zoom change 1

* editable zoom change 2

* editable zoom change 3

* editable zoom change 4

* editable zoom change 4 part b

added upper limit automation for zoom
2021-08-26 14:23:51 -07:00
Manolis Papadeas 4e51b7211e Made the palette comments TextEdit a big taller 2021-08-26 05:00:05 +03:00
Manolis Papadeas 2518f72319 Fix Select by Color not working properly on non-square canvases 2021-08-25 16:43:04 +03:00
Manolis Papadeas a3f8c960ab Change the FPS value in the spinbox when loading a project in an empty project 2021-08-25 16:37:09 +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
mrtripie de28a9d68e
Shading Tool Hue Shift Fixes + Tweaks (#522)
* Fixed issues with Shading tool Saturation and Value not always being right in Hue Shading mode

* Shading tool hue shifting fixes and tweaks

Co-authored-by: MrTriPie <MrTriPie>
2021-08-23 07:04:52 -07:00
Manolis Papadeas ed45c86649 Remove unused variables from Shading.gd 2021-08-21 17:00:37 +03:00
mrtripie c196a32ebc
Fixed issues with Shading tool Saturation and Value not always being right in Hue Shading mode (#519)
Co-authored-by: MrTriPie <MrTriPie>
2021-08-19 06:49:14 -07:00
Manolis Papadeas 58b1da41a1 Fix hue shifting brightening and darkening on colors between yellow and purple
By yellow and purple I mean hue 60 and hue 270 respectively
2021-08-18 21:53:42 +03:00
Manolis Papadeas e7f8417d0d Subtle toolbar UI changes 2021-08-18 20:13:56 +03:00
Manolis Papadeas 147a08f28b Use outlines textures for tool cursor icons
Instead of using the AutoInvertColors shader
2021-08-18 15:06:10 +03:00
Manolis Papadeas 3dfd597de4 Fix shading tool not working properly with multiple selected cels 2021-08-18 14:42:26 +03:00
Martin Novák 9ef7818c77
Tweak UI to use less empty space (#514)
* Tweak right side panels to use less empty space

* Add fake grabber to tools panel. Add a bottom margin. Fix a few issues with resizing.

* Fix tallscreen mode. Set a bit smaller animation timeline min height.

* Change Preferences visibility settings

* Update Main.tscn

* Fix crash when changing to tallscreen and then switching themes

Co-authored-by: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2021-08-16 16:56:19 -07:00
Martin Novák b95496c57d
Fix dialog sizes (#512) 2021-07-30 16:05:50 -07:00
Manolis Papadeas 4292fcc51f Change behavior of selection quick-copy (Ctrl+Alt+mouse movement)
It should now keep the same image data until the transformation gets confirmed
2021-07-31 02:03:51 +03:00
Manolis Papadeas 06bd56866d Change selection shortcuts: Alt is now used to only move selection and Ctrl+Alt makes a quick copy of the selected content 2021-07-29 16:15:02 +03:00
Manolis Papadeas 1d20295f7d Keep images unlocked after editing them - Should close #331
Not sure if this actually solves the issue or just makes it more rare, but I haven't been able to reproduce any PoolVector locking issues so far. The problem was that images were remained locked essentially all the time, which seemed to cause issues. Maybe other PoolVectors could not get locked?
2021-07-25 21:49:37 +03:00
Manolis Papadeas 68cbf4cfb3 Remove unused method in Draw.gd
Global search for "restore_image" doesn't return anything, so I assume it's unused
2021-07-24 18:42:07 +03:00
Manolis Papadeas ef133f4f71 Fix issue where Cel's image setter was not being called 2021-07-24 18:17:44 +03:00
Manolis Papadeas 65051f0910 Bring back the image_changed setter of the Cel class
Caused issues when importing files
2021-07-22 16:33:20 +03:00
Manolis Papadeas c6a056bba6 Made cloning frames create linked cels if the linked cel button is toggled on - suggestion of #402 2021-07-22 03:10:00 +03:00
Manolis Papadeas 57bb7929df Fixed issue with linked cels where, if you had linked cels in one layer and then linked more cels of the same frame in another layer, their previews did not update automatically
Cel's image_texture was being reset due to the creation of new Cel instances in CelButton.gd (line 113)
2021-07-22 02:25:00 +03:00
Manolis Papadeas 9bec8f1b09 Preload more resources
Had to remove references to Brushes and Patterns classes from BrushesButton.gd and PatternButton.gd due to GDScript's cyclic reference bug
2021-07-21 18:29:52 +03:00
Manolis Papadeas 763a063de7 Made brushes work with the shading tool 2021-07-21 02:19:46 +03:00
Manolis Papadeas 0d5e9ce48a Fix crop image crashes on Windows and maybe also fixed buggy behavior?
Cropping images seem to be working fine now, or at least I haven't encountered any bugs so far
2021-07-21 01:24:39 +03:00
Manolis Papadeas 353702ebc4 Make top bar shape-related text disappear after shape has been drawn with the shape tools 2021-07-21 00:45:57 +03:00
Manolis Papadeas 28b8e000f9 Rewrite the crop image method
Should be a bit faster, but I still get weird bugs at random
2021-07-20 22:06:18 +03:00
Manolis Papadeas d0433bed6f Preload layer and cel button nodes in Project.gd
Just a minor optimization to avoid unnecessary loading
2021-07-20 21:03:15 +03:00
Manolis Papadeas 2c90991482 Closes #509 2021-07-18 14:28:33 +03:00
Manolis Papadeas 6de6c4b800 Closes #506 2021-07-14 18:06:07 +03:00
Manolis Papadeas a40203e5cc Bucket flood fill no longer affects separated selected parts of the canvas 2021-07-11 20:20:37 +03:00
Manolis Papadeas ad4b377bc8 Only click the layer button with the left mouse button 2021-07-10 05:19:09 +03:00
Manolis Papadeas 983d14c0d1 Fix deleting content not working with undo 2021-07-09 12:59:01 +03:00
Manolis Papadeas 55c5688f16 Fix changing cel opacity calling project.frames_changed()
It shouldn't happen
2021-07-09 03:38:06 +03:00
Manolis Papadeas 240e582070 Shape tool blue indicators now reflect their proper shape 2021-07-08 22:26:32 +03:00
Manolis Papadeas 873e2b8e9e The indicator's size of the shape tools should now change depending on the tool's thickness 2021-07-08 21:48:47 +03:00
Manolis Papadeas 2760049cfd Fix content transformation not getting confirmed when changes were done to frames and layers
Also fixes issue where frame/layer copying does not copy the transformed data
2021-07-08 20:46:56 +03:00
Manolis Papadeas 7b343cc30f Fix width and height fields in the create palette dialog that used to remain disabled when the dialog appeared again 2021-07-07 18:32:37 +03:00
Manolis Papadeas a46f21265e Update CHANGELOG & AboutDialog 2021-07-06 14:03:41 +03:00
Manolis Papadeas 0bcb65db62 Update AboutDialog.gd 2021-07-05 19:32:12 +03:00
Manolis Papadeas 4b191139f6 Fix timeline's resize grabber not responding immediatly
It seems that the Canvas-Timeline SplitContainer's split offset had a hardcoded value
2021-07-04 16:09:21 +03:00
Manolis Papadeas cd811d7e78 Fixed issue where "Layer 0" would be renamed when it changed position 2021-07-04 15:29:44 +03:00
Manolis Papadeas 9234005d1a Minor drawing optimization 2021-07-01 18:14:49 +03:00
Manolis Papadeas 43bd054df6 Update translations
Hopefully the final translations for 0.9?
2021-06-30 00:01:39 +03:00
Manolis Papadeas c71d371c8c Change shortcuts of the new tools 2021-06-28 21:52:45 +03:00
Manolis Papadeas 21e2cd6bd0 Dragging and dropping frames to re-arrange them no longer makes selected_cels empty 2021-06-27 18:15:06 +03:00
Manolis Papadeas 98d41fca14 Remove Global.find_node_by_name()
Use the built-in find_node() method instead.
2021-06-26 14:01:07 +03:00
Manolis Papadeas e4aff633bb Change "Current cel" strings to "Selected cels"
Because now we have the ability to select multiple cels
2021-06-25 17:58:41 +03:00
Manolis Papadeas 02278e5fee Fix crash when importing a new project on an empty project 2021-06-24 20:32:30 +03:00
Manolis Papadeas f5d07e660d Do not clear content from selection in selected cels when moving if Alt has been pressed beforehand
This is about Alt + mouse click when moving a selection. See https://github.com/Orama-Interactive/Pixelorama/issues/129#issuecomment-756799706 for more info
2021-06-23 20:38:17 +03:00
Manolis Papadeas 5b74a4292d Fix pasting not working properly on multiple selected cels 2021-06-22 01:46:52 +03:00
Manolis Papadeas db0799bc12 Added Ukrainian 2021-06-21 00:24:39 +03:00
Manolis Papadeas ac631e3e3d Transform selected content of multiple selected cels
Does not work with rotation. It might be a good idea to replace this whole system with one that uses a transformation matrix, to handle rotation and skewing more easily in the future. I'm not a huge fan of this current code.
2021-06-19 19:29:32 +03:00
Laurenz Reinthaler a899d2591d
Use CMD+Shift+H for showing the pixel grid on OSX (#494)
Co-authored-by: Laurenz Reinthaler <reinthalerlaurenz@gmail.com>
2021-06-15 13:03:19 -07:00
Manolis Papadeas 18592ed7c0 Minor UI changes 2021-06-15 01:03:46 +03:00
Manolis Papadeas 79b37a95b3 Fix palette importing not including all colors if they have more than 64 colors 2021-06-14 20:38:46 +03:00
Manolis Papadeas 791e966a71 Update Previews on all mouse events 2021-06-14 19:21:58 +03:00
Manolis Papadeas bdd06d42ce Added tool button size option in the Preferences 2021-06-14 02:14:31 +03:00
Manolis Papadeas 20f5a063fd Get palette colors from all selected cels 2021-06-13 18:27:48 +03:00
Manolis Papadeas de850ce8a1 Ability to select multiple cels and edit them all at once
A rather significant change, so, while I have tested it, it might still be buggy. Implements a part of #306.
2021-06-12 01:06:13 +03:00
Manolis Papadeas 73cce5b740 Set frame delay's min value at 0.01, does not let it become 0 2021-06-11 22:56:38 +03:00
Manolis Papadeas feece75935 Added Norwegian Bokmål 2021-06-11 19:38:34 +03:00
Manolis Papadeas 88e95ce35f Very minor code cleanup in 4 tools 2021-06-09 17:31:58 +03:00
Manolis Papadeas f1ea8e30b2 Fix animation tag spacing 2021-06-09 17:17:53 +03:00
Manolis Papadeas fd8b6b7385 Don't call Project.frame_changed() twice at the beginning 2021-06-07 20:05:50 +03:00
Manolis Papadeas e9bf310934 Implement layer and frame dragging and dropping to re-arrange them in the timeline
Part of #306
2021-06-06 02:19:34 +03:00
Manolis Papadeas 1a87321437 Added a Delete option in cel's right click menu
Delete doesn't actually delete a cel, it just clears its contents. Maybe renaming it to something else would be a good idea.
2021-06-05 13:38:32 +03:00
Manolis Papadeas e7a5b45536 Clicking on a layer button now selects the layer. Double clicking it allows renaming 2021-06-05 03:06:07 +03:00
Manolis Papadeas ecd08ce132 Add a right click popup menu on the frame buttons and move most of the frame related options there
These options used to be on the right click popup menu of the cel buttons. Now, cel options only contain Link/Unlink Cel, for now.
2021-06-05 02:37:33 +03:00
Manolis Papadeas 39b0baca84 Frame numbers in the timeline above the cels are now clickable buttons 2021-06-05 02:11:22 +03:00
Manolis Papadeas a4c9e0e8dd Use AutoInvertColors shader for the cursor tool icons 2021-06-05 02:01:04 +03:00
Manolis Papadeas a67855a7f2 Fix RestoreDefaultButton having an alpha value of 0.5 2021-06-04 22:13:48 +03:00
Manolis Papadeas ec1b29eb5e Let the user change icon colors regardless of theme 2021-06-04 21:44:05 +03:00
Manolis Papadeas 12ce12a292 Replace button icons with single-color textures that change color automatically depending on the theme
There is no longer any need for having specific graphics for each theme, as white colored textures can change their modulation to any color.
2021-06-03 22:42:08 +03:00
Manolis Papadeas fd45344e6b Escape cancels polygon selection making 2021-06-02 03:33:19 +03:00
Manolis Papadeas 489749e305 Fix division by zero crash 2021-06-01 18:43:23 +03:00
Manolis Papadeas 5e1c9dc73b Fix bug where you couldn't resize the selection after pasting 2021-06-01 18:19:16 +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 ed229565ad Resize selection with gizmo from center by holding Control after clicking 2021-05-31 03:04:10 +03:00
Manolis Papadeas 2a9420700b Fix image effect preview background not keeping its aspect ratio 2021-05-30 19:20:56 +03:00
Manolis Papadeas 207b3a5630 Update ShaderEffect.gd 2021-05-30 17:42:50 +03:00
Manolis Papadeas 43e733fe65 Fix Move tool's snap to grid movement and take grid offset into account 2021-05-28 17:43:50 +03:00
Manolis Papadeas 6d2f02b782 Let the user change border color and toggle the marching ants effect in the preferences 2021-05-28 03:46:16 +03:00
Manolis Papadeas 5a93af7477 Fix palette highlight not being shown over the selected swatch 2021-05-27 03:14:19 +03:00
Manolis Papadeas 1e6460e439 Keep colors of a palette if the width gets bigger and the height gets smaller 2021-05-26 15:48:26 +03:00
Manolis Papadeas bd84fbbe39 Rename the Lighten/Darken tool to Shading tool 2021-05-26 02:17:49 +03:00
Manolis Papadeas bd085786d5 Fixed issue when pasting and the clipboard image is empty 2021-05-25 22:50:35 +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 950f075269 Fix resizing palette issue
Having one dimension less than 8 and one higher than 8 caused issues. This should now be fixed.
2021-05-25 14:24:30 +03:00
Manolis Papadeas 4e8acdf002 Updated Translations.pot and some tool hint tooltips 2021-05-25 02:51:10 +03:00
Variable 0257adb97b
Set project name (#490)
* Set project name. Also fixed a bug

Added ability to set project name also fixed a bug that "if the aspect ratio button is pressed and a template of different width and height were selected, then the button also applied on them e.g a template of (but it shouldn't)"
Example: write 1 in width, 2 in height, enable aspect ratio, and then try to change template... a template of 256x240 will give 120x240

* Add files via upload

* Adjust save name to project name

* Add files via upload
2021-05-24 07:03:56 -07:00
Variable 62dc608eea
"Fill inside" option in pencil tool (#489)
I modified some code from  "EIRTeam/Pixelorama" and merged it with pencil tool.
2021-05-23 14:58:19 -07:00
Manolis Papadeas 1b286a95ab Optimize AutoInvertColors shader
Not sure if that single if statement counts as branching code, but it's generally a good idea to avoid if statements in shader code, so I used step instead.
2021-05-22 16:08:11 +03:00
Igor Santarek c5d1e3b52b
Fix for #341. :) (#488) 2021-05-21 15:55:06 -07: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 de649c2057 Simplified AutoInvertColors shader 2021-05-17 03:08:25 +03:00
Manolis Papadeas 6499c0d3d5 Auto invert preview colors based on the screen color
Basically, when the background color of the screen at certain points is dark, the preview at that spot is white, and when it is bright, the preview is white at that spot. This helps to keep the previews always distinguishable, regardless of the background color.
2021-05-17 02:24:49 +03:00
Manolis Papadeas 61e7633365 Optimize Lasso tool's draw_preview()
Do not have it run when we're not creating a selection
2021-05-16 18:55:34 +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 909f9480cc Correct rectangular and elliptical selection mirroring 2021-05-16 03:19:49 +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 6b9f860618 Fix brushes being drawn flipped horizontally
My bad!
2021-05-13 21:50:55 +03:00
Manolis Papadeas b28e89e5c4 Users can now resize the left tool bar
Useful since the number of tools has started to grow a lot, and some monitors may not have enough vertical space for all of them.
2021-05-13 01:15:11 +03:00
Manolis Papadeas 336594272c Fix selection resizing issue after having moved the content first 2021-05-12 16:27:35 +03:00
Manolis Papadeas 1827381439 Remove unnecessary image.lock() lines 2021-05-12 15:51:31 +03:00
Manolis Papadeas e8b36bbc61 Fix symmetry guide crash when opening pxo files
Related to the PoolVectorArray locking issue (#331). This still doesn't fix the issue itself, but at least Pixelorama does not crash anymore. It is still possible, though, to fail to load a guide when opening a project. Opening it again may solve the issue.
2021-05-12 15:35:20 +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 36652c6b56 Update a palette string 2021-05-11 21:03:11 +03:00
Manolis Papadeas 9e7de0022e Change strings of the select menu 2021-05-11 19:48:16 +03:00
Manolis Papadeas 0b9eb2bbed Change the project's name before saving the pxo file 2021-05-11 14:51:14 +03:00
Manolis Papadeas 1b80100588 Stop movement if content transformation has been confirmed while content is being moved 2021-05-11 04:41:30 +03:00
Manolis Papadeas 969b096efc Alt + mouse click when resizing with gizmos now works as intended when there is an active transformation occurring 2021-05-11 04:15:42 +03:00
Manolis Papadeas 47e83d7163 Added UndoRedo support for selection transformations for tool options and fixed resize content behavior 2021-05-11 00:27:57 +03:00
Manolis Papadeas c859834f7c Fix crash when deleting a frame or layer and there is a transformation occurring 2021-05-10 22:34:40 +03:00
Manolis Papadeas 24da4bd703 Fix selection resizing not keeping the original bitmap after gizmo release 2021-05-10 19:59:55 +03:00
Manolis Papadeas e86dde2fb5 Do not require confirmation when transforming a selection with invisible contents 2021-05-10 18:44:12 +03:00
Variable 729c3ae1af
Tall wide screen corrections (#478)
* a minor visibility change.

made the nodes that were not needed in wide-screen "Invicible"
the visibility will now be controlled procedurally

* Added some lines of code in "change_ui_layout()"

The added lines will control node visibility changes to adjust to current screen mode

* added a line to fix tall-screen "zen-mode"
2021-05-10 08:05:15 -07:00
Manolis Papadeas 70d5fad9fd Make selection tool options not editable when there is no selection 2021-05-09 00:56:23 +03:00
Manolis Papadeas 6adb01aac1 Cursor shape no longer changes when a gizmo is being dragged and the mouse cursor goes above another gizmo 2021-05-08 16:06:02 +03:00
Manolis Papadeas 9b54f8a387 Resize selection without contents if Alt is pressed before clicking on a gizmo 2021-05-08 03:54:32 +03:00
Manolis Papadeas 3876c97674 Resizing gizmos with Shift keeps the aspect ratio of the selection
This was harder to implement than I thought. It may need some more testing.
2021-05-08 03:40:28 +03:00
Manolis Papadeas 356ddc0038 Implement moving selections with arrow keys
Moves selection with contents by default.
Control + arrow keys = Moves & snaps selection to grid.
Alt + arrow keys = Moves the selection itself without the contents.
2021-05-07 04:33:28 +03:00
Manolis Papadeas e75b6e7d67 Made Rectangle Selection and Magic Wand tools work with symmetry 2021-05-04 21:26:04 +03:00
Manolis Papadeas ea8bfcd25d Remove drawn_rect from Selection.gd and use draw_preview() in RectSelect.gd instead 2021-05-04 19:26:06 +03:00
Manolis Papadeas 5f84629144 Update AboutDialog.gd 2021-05-04 13:57:40 +03:00
Manolis Papadeas 3db2673309 Prepare for v0.8.3-stable 2021-05-04 13:44:06 +03:00
Manolis Papadeas 6203b3a71c Minor UI changes in the tool options of shape tools 2021-05-04 13:26:07 +03:00
Manolis Papadeas 0ba940c886 Implement snap to grid while moving selections and using the Move tool
Mouse click + Ctrl to snap to grid while moving.
2021-05-04 02:45:14 +03:00
Manolis Papadeas 7cbbf4399d Implement Alt + mouse movement to quickly copy & move selection contents without cutting them from their original position 2021-05-03 21:10:49 +03:00
Manolis Papadeas 20275fc465 Snap movement to axis by holding Shift after mouse clicking
Works with the Move tool and with the Selection tools.
2021-05-03 18:33:51 +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 8f846fe04a Fix out of bounds errors with selection intersection 2021-05-03 03:09:32 +03:00
Manolis Papadeas 3ad3697c84 Fix issue with gizmos not working if the user has moved the selection with contents first 2021-05-03 02:08:53 +03:00
Manolis Papadeas 8f1c6bb3d3 Move selection with contents by default with all selection tools
Now, if you want to move the selection itself without its contents, you have to do Ctrl + Alt + Mouse click. Works the same with all selection tools.
2021-05-03 02:00:07 +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 0b3424be80 Make selection tool scenes inherit from SelectionTool.tscn
Useful for them to be able to share common tool options
2021-04-28 04:00:40 +03:00
Manolis Papadeas 708a1ddc20 Organize the selection tool files in a new folder 2021-04-28 03:06:03 +03:00
Manolis Papadeas b3d581bad4 Create a parent SelectTool script where all selection tools extend from 2021-04-28 02:57:48 +03:00
Manolis Papadeas a7cec3424a Restore project brush creation when copying 2021-04-24 14:50:36 +03:00
Manolis Papadeas 320c538bc3 Add enter and escape as input actions 2021-04-23 23:47:42 +03:00
Manolis Papadeas afd7cc43c9 Rename move_content methods to transform_content 2021-04-23 23:37:07 +03:00
Manolis Papadeas 83d9800fc1 Fix selection being moved by one pixel when being resized & temp_rect has negative size 2021-04-23 19:18:41 +03:00
Manolis Papadeas 4412671a08 Add selection intersection with Ctrl + Shift + Mouse click 2021-04-22 18:12:45 +03:00
Manolis Papadeas ecdf689afd Add 1:1 rectangle tool creation and expanding from click position as its center
Works similar to the rectangle & ellipse drawing tools. Shift for 1:1, Ctrl for expanding from center.

Shift + mouse click = add to selection
Ctrl + mouse click = subtract from selection
Mouse click + Shift = Create a 1:1 (square) selection
Mouse click + Ctrl = Create a selection that expands from center
Mouse click + Shift + Ctrl = Create a 1:1 (square) selection that expands from center

A combination like Shift + Mouse Click + Shift will add to selection while also making a 1:1 selection
2021-04-22 16:45:26 +03:00
Manolis Papadeas 58ef2420c9 Fix issue when resizing selection after moving it 2021-04-22 03:50:16 +03:00
Manolis Papadeas 687f2619a1 Change the order of the top menus 2021-04-22 03:34:04 +03:00
Manolis Papadeas 28cfe9bf77 Got rid of the deprecated enabled_focus_mode
Godot 3.3 has arrived!
2021-04-22 02:11:35 +03:00
Manolis Papadeas dbda57396b Fix selection_offset not being reset to 0 when the bitmap's position is back to positive coordinates 2021-04-21 18:22:43 +03:00
Manolis Papadeas 515e75f3dd Gizmos resizing no longer re-flips the image when temp_rect is negative 2021-04-21 18:16:42 +03:00
Manolis Papadeas b420bebb3e Fix gizmos being able to get edited when there is no selection 2021-04-21 17:35:37 +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 a712f822d7 Fixed bug when copying while moving content 2021-04-21 15:25:17 +03:00
Manolis Papadeas 3852b419dd Image effects will not longer get applied to locked and/or hidden layers. 2021-04-21 00:48:36 +03:00
Manolis Papadeas ea606a072a Make layers uneditable when they're invisible 2021-04-21 00:12:05 +03:00
Manolis Papadeas d70c6a22c4 New tool: Magic Wand (temporary icon) 2021-04-20 15:53:16 +03:00
Manolis Papadeas f1b98f662e Call move_content_confirm() when layers and frames change 2021-04-19 19:55:29 +03:00
Manolis Papadeas 1d5b44fad2 Fix Copy & Delete to work on the currently selected parts of the image
This also fixed a crash when deleting while content is being moved/resized
2021-04-19 19:05:05 +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 dd2bec4c19 Pasting does not directly paste on the canvas, it is now confirmable instead
This lets the user easily cancel the pasting and move just the pasted area around.
2021-04-19 14:39:58 +03:00
Manolis Papadeas baba43d274 Change the way of how tool icon blue-orange backgrounds work
Instead of having a gazillion icons for each tool and its blue-orange variations, which led us to create 4 different textures for each tool, now we only need one texture for each tool and each theme. The blue-orange background has been made into a different TextureRect for each button.

This makes it easier for people to create new tools. Now, each new tool requires 3 textures (to cover every theme), instead of 12(!). I'm hoping to bring the number down to 1 in a future commit, by automating the theme color converting process.
2021-04-18 15:36:08 +03:00
Manolis Papadeas b735bc760f Optimize Project.get_selection_rectangle
It doesn't call bitmap_to_image() anymore.
2021-04-18 15:26:15 +03:00
Manolis Papadeas 38711d2ccf Fix HTML5 shader issue
The MarchingAntsOutline was failing to compile on the Web platform due to the for loop not having constant expressions inside the shader. "Loop index cannot be initialized with non-constant expression"
2021-04-17 22:33:13 +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
Manolis Papadeas 0c54470209 Update CHANGELOG & AboutDialog 2021-04-16 22:07:38 +03:00
Manolis Papadeas bcc0d359dc Restored LightenDarken's previous behavior
Fixes a minor issue from 6cce27a360
2021-04-16 21:47:03 +03:00
Manolis Papadeas f321b6d101 Remove paths from Main.tscn from the palette PR 2021-04-16 21:17:23 +03: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
kevinms 05eda55bc7
Fix hue and saturation getting reset when draging value slider to zero (#473) 2021-04-01 16:13:54 -07:00
Manolis Papadeas 6cce27a360 Do not run update_mask() method if there is no pressure sensitivity option
Major speedup for large images. update_mask() is meant for pen pressure only, so there is no reason to calculate it if we don't have pressure sensitivity enabled
2021-04-01 03:40:35 +03: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
Manolis Papadeas a9045e317d Apply mirror view to all tools 2021-03-29 23:00:09 +03:00
Manolis Papadeas cffba7edde Added an option in the Preferences for interface dimming on dialog popup 2021-03-17 19:28:01 +02:00
Manolis Papadeas 82b1535c14 Update CHANGELOG 2021-03-17 18:15:43 +02:00
Manolis Papadeas 810affb1bc Update CHANGELOG & Translations, clear whitespaces 2021-03-15 03:41:02 +02:00
ballerburg9005 de164ea9de
full support for auto tallscreen/widescreen panel layout (#458)
* full support for auto tallscreen/widescreen panel layout

* Update Main.tscn

* Update CanvasPreviewContainer.tscn

* Update UI.tscn

* tallscreen support - better display scale

* tallscreen support - better display scale

* Update UI.tscn

* Update Main.gd

* tallscreen support - better display scale

* tallscreen support - better display scale

* tallscreen support - alternate panel placement comment-784228607

* tallscreen support - code cleanup

* tallscreen support - color picker swap: comment-785032683

* prettier border

* tallscreen support - color picker

* tallscreen support - pullrequestreview-601156079

* tallscreen support - bugfix & review

Co-authored-by: ballerburg9005 <mathias.steiger@gmail.com>
2021-03-06 05:59:26 -08:00
Manolis Papadeas 35f97ebe6f
Fix issue where the window regains focus and draws immediatly
The issue occurred when the cursor exited the application window very fast while still on the canvas, thus Global.has_focus was still true, then lost focus. When Pixelorama regained focus, it would draw the tool even if the user clicked outside of the drawing canvas.
2021-02-25 07:00:50 -08:00
gamesplease 59862171e9
Add keyboard shortcut for Clear Selection (#457) 2021-02-17 09:53:01 -08:00
Variable f9c275d0a4
"SpriteSheet as layer" and "Replace Frame" import options (#453)
* fixed some more bugs

* Removed some more bugs

* Added "Replace Frame" option

It was originally made to use primarily in "Spritesheet (new layer)" but it thought it could also be useful to put it there as an import option

* Update PreviewDialog.tscn

* Update PreviewDialog.gd

* Update OpenSave.gd

* added import option for SpriteSheet and Frame

Now we can add SpriteSheets in current project and Replace frames in current project

* added functions for SpriteSheet and Frames

I added functions that would allow me to add SpriteSheet as new Layer. I also added an option for "Replace frame" (the function "open_image_at_frame()" is originally being used in "open_image_as_spritesheet_layer()" method but i decided to use it as an import option as well)

* Changed contribution name

* Changed contribution name

* Fixed some lines

* fixed sprite lines not updating
2021-02-07 06:43:44 -08:00
THWLF 45be4ee6b7
Added more standart devices from 8/16Bit era (#450) 2021-02-05 03:05:08 -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 40f6a24fdc Made Zoom tool work on the second viewport too 2021-02-01 21:07:09 +02:00
Manolis Papadeas 097367ac45 Added a missing comma on a string 2021-02-01 17:48:28 +02:00
Manolis Papadeas c54b74f829 Having no active selection no longer treats all the pixels of the canvas as selected
A performance boost for when opening large images. Also fixed an issue with pixels being selected outside of the canvas boundaries, when the selection rectangle was outside the canvas and its size got reduced.
2021-01-31 15:09:54 +02:00
Manolis Papadeas 7f1594e1bc You can now resize cels in the timeline by holding Control and scrolling with the mouse wheel.
Addresses part of #306
2021-01-30 23:57:33 +02:00
Manolis Papadeas 77185b5263 Update tile mode rects when importing a project 2021-01-30 20:43:10 +02:00
Manolis Papadeas 5b3b91b247 Fix #445 by NOT replacing empty backups 2021-01-30 20:33:00 +02:00
kleonc 499251f44a
Fix potential index out of bounds error (#446) 2021-01-30 09:30:02 -08:00
Manolis Papadeas 27852b2694 Dragging and dropping individual cels in the timeline to change their position is now possible.
Addresses a part of #306
2021-01-29 22:00:48 +02:00
kleonc 4001a32f2b
Cache tile mode rects (#443)
* Cache tile mode rects

* Make TransparentChecker don't calculate tile mode rect on its own

* Minor fixes

- typo
- formatting
- moved unlock() call to the method where matching lock() was called
2021-01-28 11:21:48 -08:00
Manolis Papadeas 4db21dae95 ScaleImage dialog improvements
It now automatically sets the size to the current project's size, has a button to lock aspect ratio, and resizing based on percentage. Some UI changes to CreateNewImage too.
2021-01-27 00:45:12 +02:00
Manolis Papadeas 6edfbad663 Fixed a bug with the Zoom tool, removed Godot's version check from Tools.gd and updated AboutDialog, CHANGELOG and Translations 2021-01-26 16:34:25 +02:00
Variable eff0adbf21
Var pix centralize (#441)
* Added Centralize Image

* Add files via upload

* Added Centralize Image (fixd some lines)

* Added Centralize Image (fixes some lines)

* Fixed and removed some lines

* Fixed and removed some lines

* Removed unnecessary parameters

* Removed unnecessary parameters

* Update DrawingAlgos.gd
2021-01-26 06:03:38 -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
Manolis Papadeas 6cb525ad92 Update changelog & AboutDialog 2021-01-23 00:27:28 +02:00
Manolis Papadeas f03dcfe230 Made Pan tool's shortcut change-able, and added missing translations 2021-01-21 01:58:15 +02:00
kleonc 85b0611ca0
Speedup Draw.update_mask() (#439) 2021-01-20 13:29:40 -08:00
kleonc 63838964b3
Renamed enums to follow recommended naming convention (#437) 2021-01-20 06:59:42 -08:00
kleonc eeb97f71e4
One shared offset for rectangular and isometric grids, added "Draw Grid over Tile Mode" toggle (#434)
* One shared offset for rectangular and isometric grids

* One draw call per grid

* Added "Draw Grid over Tile Mode" toggle
2021-01-19 16:17:33 -08:00
kleonc 9c520a65e9
Refactored isometric grid (#430)
* Move get_tile_mode_rect() method to the Project class

* Refactored isometric grid

Now it should be drawn properly in the target rect.
Settings (in pixels):
- cell's AABB size,
- offset from the canvas origin.
2021-01-18 12:59:26 -08: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
Manolis Papadeas 4da4f4ebb8 If it's trying to load a theme that doesn't exist, default to the first theme
Useful for cases where a user uses a version with a theme, and goes to a previous version where that theme does not exist
2021-01-10 18:20:17 +02:00
kleonc b1c0344d0b
Remove unneeded location variables (#425)
Co-authored-by: kleonc <kleonc@users.noreply.github.com>
2021-01-06 07:11:50 -08:00
kleonc 1b8520c1a9
Select new layer after adding it (#424)
Co-authored-by: kleonc <kleonc@users.noreply.github.com>
2021-01-06 06:18:41 -08:00
Manolis Papadeas 8daacbac5e Added "Performance" tab in Preferences that exposes options related to the application's FPS to the user
This also makes the behavior added in #394 toggle-able.
2021-01-05 20:01:50 +02:00
kleonc c18c705748
Update GUI for Cel.opacity on frame changed instead of on layer change (#420)
It's Cel's property and thus it changes when frame_changed is called (also layer_changed calls frame_changed on its own).

Co-authored-by: kleonc <kleonc@users.noreply.github.com>
2021-01-04 17:12:02 -08:00
kleonc 92a22fe9bc
Fix tiling opacity by drawing currently visible frame to a separate Viewport (#417)
- Now the current frame is drawn to a separate Viewport (with transparent background) taking into account only per layer opacity,
- Tiling is drawn by drawing current frame's ViewportTexture with tile mode opacity applied (using premultiply alpha blending).

Co-authored-by: kleonc <kleonc@users.noreply.github.com>
2021-01-04 09:30:15 -08:00
Manolis Papadeas 5f56cb523f Update copyright statements to present
Happy new year, everyone!
2021-01-03 21:03:20 +02:00
kleonc 9edc0c9bb9
TileMode opacity fix (#414)
Now opacity is multiplicative.

Co-authored-by: kleonc <kleonc@users.noreply.github.com>
2020-12-30 09:56:28 -08:00
Laurenz Reinthaler 2eeadf35a2
Allow greater values than 100 for SpinBoxes in FrameTagDialog.tscn (#408) 2020-12-27 13:05:35 -08:00
Laurenz Reinthaler b9c94e1b12
Resolve conflict with remapping shortcuts (#407) 2020-12-26 11:02:08 -08:00
Laurenz Reinthaler 2a7e668976
Add Pan Tool (#399) 2020-12-23 10:41:42 -08:00
Laurenz Reinthaler 425b11d4b2
Implement undo and redo while holding (#405) 2020-12-22 07:45:17 -08:00
Manolis Papadeas ab583a7354 Fixes #404
Issue #404 not found
2020-12-18 17:22:45 +02:00
Manolis Papadeas 16d2c336e9 Fixed FPS not being updated when Pixelorama first runs 2020-12-17 02:52:13 +02:00
Manolis Papadeas 031efc0cdb Make FPS project-specific and store it in the pxo files 2020-12-17 02:20:47 +02:00
Manolis Papadeas 05c9ef70d4 Put frame duration as a member of the Frame class
Instead of having a frame_duration[] array in the Project class. This makes the code much more readable and understandable, using less lines of code and, by avoiding an extra array, we also avoid potential out-of-bound array crashes.

The functionality for the user has not changed, and by testing so far I didn't find any issues.
2020-12-16 22:54:08 +02:00
Laurenz Reinthaler 329f4edc5c
Improve Cpu Usage while in Idle (#394)
Use focus insted of mouse
2020-12-15 07:30:47 -08:00
Manolis Papadeas 35eeaf4e90 Fixed an issue where Pixelorama crashed when a user coming from a new version to an old one and had selected a tool that doesn't exist in an older version 2020-12-13 21:42:45 +02: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 15994fb818 Fixed crash when importing spritesheets 2020-12-09 18:18:00 +02:00
Manolis Papadeas de6f78b058 Fix crash when importing an image file as a new frame 2020-12-09 18:07:12 +02:00
Laurenz Reinthaler da214efc53
Change shortcut key from CTRL to CMD on OSX (#393) 2020-12-05 16:10:40 -08:00
Laurenz Reinthaler e0b010867a
Allow moving the canvas through panning and zooming through a zooming gesture (#391) 2020-12-04 17:41:16 -08:00
Manolis Papadeas e9de204736 Update AboutDialog.gd
Clean code by putting `create_item` lines of code into their own methods and update missing translators
2020-12-03 23:40:09 +02:00
Manolis Papadeas 46939bd74d Check the correct tile mode button in View > Tile Mode when changing between projects
Also changed the buttons to radiobuttons
2020-12-03 03:49:53 +02:00
Manolis Papadeas b1e8bf98d2 Made TransparentChecker shader material unique for the main two viewports
Fixes #377. The issue was that the shader material was being shared with the background of the cel buttons, and when the cel button transparent background was resized, the canvas transparent background was also affected.
2020-11-26 02:05:05 +02:00
Manolis Papadeas 512507e2c7 Fix "It's not a reference to a valid Image object" error when resizing canvas for the first time 2020-11-26 01:22:11 +02:00
Manolis Papadeas 4d85cf1a10 Symmetry guides now adjust their position when the image is being resized
Fixes #379
2020-11-25 21:59:18 +02:00
Manolis Papadeas 54c6c86099 When opening a .pxo project which has guides, they will no longer be added to the project at the first tab too 2020-11-25 18:25:56 +02:00
Manolis Papadeas 37ee4856ff Fixed an issue with brushes 2020-11-25 01:21:28 +02:00
AbhinavKDev 96454a2d57
Handiling tile modes in each project (#388)
* Handiling tile modes in each project

Co-authored-by: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2020-11-24 08:53:18 -08: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
Manolis Papadeas bcd86bd655 Update AboutDialog.gd 2020-11-20 04:23:46 +02:00
Manolis Papadeas 257b8d4aa6 Onion skinned previous and next frames are now being drawn on top of the current frame 2020-11-19 02:01:43 +02:00
Manolis Papadeas c39bfe992b Remove wront hint_tooltips from the Preferences 2020-11-18 19:11:48 +02:00
Manolis Papadeas 22f4796251 Fix LightenDarken's Hue Shifting colors
- All colors move towards yellow when lighting, and purple when darkening. The logic has become more complex, so it doesn't just increase (or decrease) the hue when lighting (or darkening). This solves issues with green and blue.

- Added limits to the hue when lighting and darkening, limits to the value when darkening, and to the saturation when lighting.

This behavior should eventually be documented to explain how it works to the users.
2020-11-17 04:18:36 +02:00
Darshan Phaldesai 397ef566db
Added Fix for new Tile modes (#384) 2020-11-16 10:57:35 -08:00
Manolis Papadeas 76772d3c64 Fixed bug with ImageEffect previews and different projects
When the user switched from one project to another, which had a larger size, the preview of the ImageEffect was trying to set pixels out of bounds, only when the affect option was different than "Current cel"
2020-11-16 00:56:03 +02:00
AbhinavKDev 9768372dcc
The minimum no of onion skin to the future and past is set to 0 (#380) 2020-11-15 05:45:10 -08:00
Manolis Papadeas 6feea6dd3f Fixed untranslated palette string 2020-11-14 15:24:24 +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
Manolis Papadeas 4be0740170 Fixed crash when loading a pxo older of 0.8.1 and selecting a frame other than the first
Had to do with Project.frame_duration not having as array members as it should.
2020-11-12 02:16:08 +02:00
Manolis Papadeas 28ca2cd87e Small improvements and bug fixes to the Display Scale option
When clicking Apply, the zoom level now gets fit to the frame, and the Preferences dialog keeps its focus and its tabs.
2020-11-10 01:32:27 +02:00
Manolis Papadeas 03d0525794 Disable "Recent projects" on the Web version 2020-11-10 01:14:35 +02:00
Manolis Papadeas f259ceb5e6 Change "Shrink GUI" to "Display Scale" and its step to 0.1 2020-11-09 14:15:42 +02:00
Manolis Papadeas 17b3ed4e88 Moved "Shrink GUI" option from Startup to Interface
Themes are also in the Interface category now, in the Preferences
2020-11-09 01:52:53 +02:00
Manolis Papadeas 267c9f292c Update CHANGELOG and AboutDialog 2020-11-09 01:18:51 +02:00
Manolis Papadeas fad41bd27b Fix Hue Shifting not working on exported builds 2020-11-07 23:03:37 +02:00
Manolis Papadeas bd10680f63 Minor changes to the shrink option 2020-11-07 19:12:31 +02:00
gschwind 279228daba
Implement shrink option (#376)
* Add shrink option that allow change default shrink

Shrink option allow to scale the godot application. This path enable
dynamic change of this value in the options.

* Fix the computation of cursor location

For an unknown reason the function get_local_mouse_position return
incorrect current_pixel when shrink is not 1. This path compute the
transformation manually and povide correct values for any shrink value.
2020-11-06 17:57:35 -08:00
Manolis Papadeas 922c48f50e Fix LightenDarken issue where it did not remember some options when switching tools 2020-11-03 00:43:48 +02:00
Manolis Papadeas ebb6d74d9f Using the lighten/darken on pixels with an alpha value of 0 no longer has an effect on them. 2020-11-02 20:07:31 +02:00
Manolis Papadeas b1b4497ae8 The lighten/darken tool now has a hue shifting mode - Closes #189 2020-11-01 16:00:18 +02:00
Manolis Papadeas cff3f9f6b2 Fixed issue where imported projects were not remembering the directory_path and file_name when switching tabs. 2020-10-29 22:35:20 +02:00
Manolis Papadeas 7dd9b36cdc Move "Recent projects" up, just below "Open last project" in the File menu 2020-10-29 22:33:15 +02:00
Manolis Papadeas 00a4722966 Small UI fixes to the HSVDialog 2020-10-29 22:25:31 +02:00
Manolis Papadeas b5df8a7ac5 Move the notifications a bit to the left 2020-10-29 16:46:58 +02:00
Manolis Papadeas 0d5b4416a4 Changed CJK font and fixed some character issues
- The CJK font (for Chinese & Korean) was changed to DroidSansFallback from NotoSansCJKtc. This results in a much smaller exported `.pck` (over 10MB less)

- Fixed Chinese and Korean characters not displaying properly in the Splash dialog and the About dialog.
2020-10-29 00:45:23 +02:00
Manolis Papadeas 4415f86c56 Update CHANGELOG & AboutDialog, trim trailing whitespaces 2020-10-27 23:03:43 +02:00
dasimonde 7126074a0e
Add feature request #276 (#370)
* Add request #276

* Remove a warning message

* Some fixes

* Bug fix. Remove Global.save_project_to_recent_list() from src/Main.gd

Co-authored-by: Daniel Simon <dasimon@gmx.org>
2020-10-26 13:51:55 -07:00
dasimonde d85efce73a
Add feature request #358 (#368)
* Add feautre request #358

* Remove the if statement in src/UI/Canvas/TileMode.gd

Co-authored-by: Daniel Simon <dasimon@gmx.org>
2020-10-25 16:10:14 -07:00
Manolis Papadeas ab6bebd6d4 When there are errors in opening and saving files, the errors appear in the form of a popup dialog, instead of a notification or an OS alert. 2020-10-25 18:02:51 +02:00
Manolis Papadeas 9be6248024 The default path of the dialogs for opening and saving is now the user's desktop folder 2020-10-25 03:26:31 +02:00
Manolis Papadeas 4e33476a4d Fixed "Export" option in the File menu not working properly when switching between projects
Export.was_reported was keeping its value when switching projects, instead of being project-specific. Also fixed issue where imported images were not remembering the directory_path and file_name when switching projects.
2020-10-25 00:58:37 +03:00
Manolis Papadeas e6da4d2b30 Update changelog, translations & AboutDialog 2020-10-24 22:42:53 +03:00
Manolis Papadeas 96fc2aa12d Fixed issues where fully transparent color could not be picked
More specifically, the color picked sometimes failed to pick transparent color (and picked black instead), swapping between colors when one of them is fully transparent made it fully opaque, and also when picking a color from a palette which was fully transparent made it fully opaque.

Closes #364
2020-10-23 20:18:39 +03:00
Manolis Papadeas df7a650137 Fixes #363 2020-10-23 18:11:08 +03:00
Manolis Papadeas cce4fa4cbb Added more options to the Rotate Image dialog
Now all of the image effects (except those related to resizing) have the same affect options.
2020-10-23 17:50:52 +03:00
Manolis Papadeas b3aa4a6343 Fixed crash when creating a new project
Caused by #357
2020-10-23 17:44:37 +03:00
Rémi Verschelde d41751d39c
Use '~' prefix instead of '%' for random brushes (#362)
Fixes #337.
2020-10-21 19:07:49 +03: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
PinyaColada 852365c38f
Frame properties (#357)
* Sync for my local files to my repository

* This is frame properties update, it works but I can't be stored while
saving or loading and that makes crashes just the beggining :)

* I forgot this files :P

* Frame Properties update.

* Updating frame properties

* Update Translations.pot

* Changes to CanvasPreview and CelButton change
2020-10-19 17:57:40 +03:00
Manolis Papadeas f5cf3f3ca7
Only grab guide focus when they're visible 2020-10-19 00:04:06 +03:00
OverloadedOrama 320f1a4da2 Update v0.8.1 2020-10-14 16:15:30 +03:00