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

1290 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