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

595 commits

Author SHA1 Message Date
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 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 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 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
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 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 b8d055fe01 Added lasso / free select tool
Temporary icon, probably. Should work without problems, but more testing would be nice.
2021-05-16 03:52:13 +03:00
Manolis Papadeas d13c5c1063 Added ellipse selection tool
Icons most likely temporary. A bit problematic when the selection is in negative coords and the preview does not work well with mirroring and mirror view. Same is true for the shape tools.
2021-05-14 03:48:33 +03:00
Manolis Papadeas 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 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 9e7de0022e Change strings of the select menu 2021-05-11 19:48:16 +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 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 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 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 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 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 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 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 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
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
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 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
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 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 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
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
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
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
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
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 de6f78b058 Fix crash when importing an image file as a new frame 2020-12-09 18:07:12 +02: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
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
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
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 03d0525794 Disable "Recent projects" on the Web version 2020-11-10 01:14:35 +02:00
Manolis Papadeas 267c9f292c Update CHANGELOG and AboutDialog 2020-11-09 01:18:51 +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 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 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 e6da4d2b30 Update changelog, translations & AboutDialog 2020-10-24 22:42:53 +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
OverloadedOrama b67e2b3d7d Update AboutDialog.gd 2020-10-14 13:44:23 +03:00
OverloadedOrama 0506701874 Updated translations & changelog, added PinyaColada to the contributors list 2020-10-09 00:16:00 +03:00
PinyaColada 64eb4f27ce
Cut option (#345)
* I Made the cut function, his respective shortcut <c-x> and the appearence of the function in the top
bar in edit.

* Update Main.tscn
2020-10-08 18:05:33 +03:00
OverloadedOrama f15578fbe6 Added Hugo Locurcio in splash screen & in About dialog as a $10 patron 2020-10-07 17:01:36 +03:00
OverloadedOrama fbbdcdaa57 Made the frame move buttons get disabled when you can't move frames 2020-10-05 02:37:55 +03:00
Laurenz Reinthaler 0f8a04193f
Add buttons for moving the current frame left or right (#344)
Add dark theme sprite

Add light theme sprite

Co-authored-by: Laurenz Reinthaler <reinthalerlaurenz@gmail.com>
2020-10-03 22:46:24 +03:00
OverloadedOrama 54cfecacc4 Guides now move with a step of 0.5 pixels 2020-09-30 13:12:01 +03:00
Erevos 41a9107c45
Theme edits (#342)
* Theme edits

Changed all the themes to be more consistent, buttons and panel containers have rounded edges. Note that the spacings have been switched too, so it needs subtle remakes in the placing of each element. Especially the tool buttons. Also check the themes on preferences (need better spacing) and rulers are not included.

* Some UI fixes

* Reduced size of themes

* Fixed more spacing issues and replaced timeline grabber icon

* Removed old theme icons

* Change purple and light rulers

* Fix purple top menu & caramel rulers

Co-authored-by: Erevoid <Erevoid@users.noreply.github.com>
Co-authored-by: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com>
2020-09-29 18:00:43 +03:00
OverloadedOrama da24133a4d Fixed crash where the animation was playing in the mini canvas preview and then the user switched to a project with less frames 2020-09-28 01:09:11 +03:00
OverloadedOrama 4f1c19563b When moving tabs, the projects now move along with their respective tabs 2020-09-28 00:56:58 +03:00
OverloadedOrama 21d4e177eb Another attempt to fix #339 - Remove default texture from BrushTexture
In BrushButton.tscn
2020-09-27 21:48:06 +03:00
OverloadedOrama 10b082434b Removed brush_button.png - May solve #339 2020-09-27 20:35:46 +03:00
OverloadedOrama 3aaee48369 Fix canvas preview zoom and play button not working 2020-09-23 20:30:33 +03:00
OverloadedOrama 1fc7cc151d v0.8 - The multiple project & Web update! 2020-09-23 16:51:08 +03:00
OverloadedOrama c0db420f73 Update splash screen with 3 new artworks
Also change copyright notice in splash screen & about dialog
2020-09-23 15:28:03 +03:00
OverloadedOrama 9617d18bc8 Don't create guides if they have less than 2 points 2020-09-21 19:19:41 +03:00
OverloadedOrama 6157fd3355 Improve canvas preview UI 2020-09-15 00:01:21 +03:00
OverloadedOrama f91cb41049 Fixed zoom issues with SymmetryGuide 2020-09-08 00:12:09 +03:00
OverloadedOrama d59ad5937d Enter v0.8 Release Candidate stage 2020-09-05 13:39:32 +03:00
OverloadedOrama cab057b73c Remove filter from PreviewDialog's TextureRect 2020-08-29 19:14:11 +03:00
OverloadedOrama 87ff964742 Updated list of contributors and translators 2020-08-28 21:26:29 +03:00
OverloadedOrama 0a0bf62bcd Each Project has its own export path now
This could be buggy so it needs more testing.
2020-08-28 18:05:49 +03:00
OverloadedOrama 44ecf375fc Removed duplicate code from the image effects and put it into the parent ImageEffect class 2020-08-28 01:20:07 +03:00
OverloadedOrama b07545a3d1 Added missing CelButton hint tooltip translation 2020-08-27 20:02:53 +03:00
OverloadedOrama 850c5606de Added missing translations
And added hint tooltips to "Pixel Perfect" and "Overwrite Color" buttons
2020-08-27 14:30:26 +03:00
OverloadedOrama b53926724e Made image effect dialog previews centered & made them expand vertically 2020-08-26 18:33:15 +03:00
OverloadedOrama b52a7c224a Put a transparent checker background to RotateImage dialog
Also made it extend the ImageEffect class.
2020-08-26 17:49:46 +03:00
OverloadedOrama e88b62ea44 Fixed issue in HSVDialog where the TextureRect would resize on dialog resize 2020-08-26 16:12:35 +03:00
Darshan Phaldesai 60c5ec9ad5
Affect area now affects the previews. (#320) 2020-08-26 14:29:49 +03:00
Matthew Paul 719708fb10
Add transparent checker to export dialog and animation cels (#318)
* Add checker to export dialog

* Add checker to CelButton
2020-08-26 12:45:32 +03:00
OverloadedOrama f121c39ddc Put checker backgrounds to almost all image effect dialog previews
Also made them inherit ImageEffect, resulting in much less and cleaner code. Only RotateImage remains. Partially addresses #206.
2020-08-25 19:49:18 +03:00
OverloadedOrama 2af677016e Created an ImageEffect class
This will be the parent of all (or most) image effect dialog nodes. Currently only parent on FlipImageDialog, will change to be parent of the rest of the effects.
2020-08-25 19:07:12 +03:00
OverloadedOrama b73937fd0c Made HSVDialog a ConfirmationDialog node
To be consistent with the rest of the image effect dialogs
2020-08-25 18:49:12 +03:00
OverloadedOrama a65fc0e00c Added Romanian and Korean 2020-08-25 17:17:43 +03:00
OverloadedOrama 3a88a5c861 Change "Art by" translation string
Found in the splash dialog
2020-08-21 20:13:22 +03:00
OverloadedOrama 8d1c2e96f3 Finished implementing the isometric grid - Closes #305
Added the ability to change grid type in Preferences, and made an isometric cell size value which affects just the size of the cells of the isometric grid. Also updated translations.
2020-08-20 00:12:07 +03:00
OverloadedOrama 14d958e55f Moved tile mode drawing logic from Canvas to a new script
I mostly did it so I could move tile mode logic into a new node, so I could have control over the drawing order. TileMode.gd also always draws 8 blank rectangles, which are being drawn on top of the grid, in order to hide it if it gets out of boundaries. We are now very close to implementing an isometric grid, #305.

This shouldn't have much of a performance impact, but some more testing is most likely needed.
2020-08-18 17:03:49 +03:00
OverloadedOrama f2136236b1 Moved canvas indicator drawing to a new script
Cursor indicators now appear on top of the grid again
2020-08-18 16:35:05 +03:00
OverloadedOrama 92332cc52e Move Canvas related files to a "Canvas" folder under "UI" 2020-08-18 16:21:31 +03:00
OverloadedOrama 35b2c201ae Changed how isometric grid is drawn
Instead of drawing individual lines, execute draw_isometric_tile() multiple times. What this method does is basically draws a single isometric tile, which then gets repeated for the entire canvas size. Also moved all the grid logic to a new script, which gets updated less often that Canvas.gd, for optimization purposes.

Works better than the previous method, although it might be a bit slower, and currently does not work well if the canvas size is not divisible by the grid size. For now, it only gets affected by the grid width. Changing grid height has no effect.
2020-08-17 22:54:33 +03:00
Kinwailo 39808082b6
add follow canvas movement and scale option to transparent checker (#311) 2020-08-17 22:30:58 +03:00
OverloadedOrama ff54d2db8e Add a transparent background for flip image dialog preview
Seems to be working fine, will do the same for the remaining dialogs.
2020-08-16 00:07:56 +03:00
OverloadedOrama 79bd015c19 Put top menu & ruler styles inside the themes
Instead of using stylebox files.
2020-08-14 00:22:49 +03:00
OverloadedOrama fe2ed42819 Use VisualServer viewport for applying shader
This comes with the benefit that we no longer need a Viewport node in the ShaderEffect dialog, which lets us have the Preview TextureRect at a fixed size. Previously, the preview was scaled based on the image's size, which would make applying shaders to large images very inconvenient, since the dialog would be way too big.
2020-08-13 01:55:31 +03:00
OverloadedOrama 8734659da1 Added Hungarian, updated list of translators
Norwegian isn't working for some reason.
2020-08-10 03:26:55 +03:00
OverloadedOrama da656df5b7 Added more options to the Gradient Dialog 2020-08-08 19:02:49 +03:00
OverloadedOrama e8683d75bf Fixed export dialog path textedit not being updated when choosing a directory 2020-08-08 17:21:52 +03:00
Martin Novák f3bce3857a
Replace godot-gifexporter with godot-gdgifexporter (#295)
Add exporting in a separate thread and a progress bar
Remove background color option from gif export
2020-08-07 08:13:04 +03:00
Michael Alexsander 89cd1d972a
Set tool options containers' size flags to "Fill" (#292) 2020-08-06 12:27:20 +03:00
OverloadedOrama 65828b328a Change window titles in image effect dialogs 2020-08-04 19:10:50 +03:00
azagaya 6d23f95d07
Added Scale3X algorithm as an option to scale sprites (#290) 2020-08-02 18:24:00 +03:00
OverloadedOrama 5bbea6fa03 Don't let preview animation play if there's only one frame 2020-08-02 01:54:12 +03:00
OverloadedOrama 7269b45fc5 Added play button and zoom slider for the small canvas preview
May also be a solution for the age old issue #25.
2020-08-02 00:59:00 +03:00
OverloadedOrama ebc9eab773 Added dialog with options for desaturation
Not sure if options for RGBA channels are really needed here, but I kept them from invert colors. We could remove them in the future if they are unneeded.
2020-08-01 04:24:11 +03:00
Martin Novák 6f645d996d
Refactor export dialog (#288)
* Split export code from export dialog to Export.gd autoload
Clean access to child nodes of export dialog

* Fix export variables set in Main.gd

* Fix more wrong variable assignments

Co-authored-by: alexhayoo <65853178+alexhayoo@users.noreply.github.com>
2020-07-31 23:26:52 +03:00
OverloadedOrama 2346ca810b Added dialog with options for invert colors 2020-07-31 03:39:46 +03:00
OverloadedOrama 0d1e45cfe4 Added a dialog for image flipping with options 2020-07-30 00:01:04 +03:00
OverloadedOrama d4fe1f7b12 Moved image effect scene and script files into a new folder 2020-07-29 20:34:27 +03:00
OverloadedOrama 30cd607c65 Made "ImageEffects" node a separate scene
The ImageEffects node is the parent of all image effect dialogs
2020-07-29 20:06:20 +03:00
OverloadedOrama bedede5970 Added more options to the OutlineDialog 2020-07-29 18:25:19 +03:00
OverloadedOrama ec81950139 Experimental shader feature: Expose shader's float uniforms to the UI
If the loaded shader has uniforms, they will be exposed to the UI, so the users will be able to modify the shader parameters easily. Currently only works with float uniforms.
2020-07-28 04:11:06 +03:00
OverloadedOrama 8529e93029 Don't save erased guides in .pxos
This fixes a crash when saving a pxo with guides that have been removed
2020-07-27 20:03:15 +03:00
OverloadedOrama 8cca37e752 Hid some color picker presets from GradientDialog
And removed some code for setting preview texture flags to 0. The flags are already being set in create_from_image()
2020-07-27 04:47:29 +03:00
OverloadedOrama 94aa94a364 Added a preview in OutlineDialog 2020-07-27 04:36:00 +03:00
OverloadedOrama 4870ebc094 Added checkbox in OutlineDialog for affection selection 2020-07-27 04:11:46 +03:00
OverloadedOrama 585f83e28a Fixed Invert and Desaturate not working on the correct cel 2020-07-25 19:35:46 +03:00
OverloadedOrama 186e2259ac [EXPERIMENTAL] Added ability to load a shader as an image effect
This new feature allows users to load a .shader file (must be a GLES2 Godot shader) that will modify the image itself. This feature is experimental and possibly buggy, not all shaders are working properly and I'm not sure yet why. As such, this feature may not be included in v0.8 stable.
2020-07-25 16:26:57 +03:00
OverloadedOrama 59122f6a13 Fixed issue in HSVDialog using the wrong selected pixels when affecting all projects 2020-07-24 03:53:24 +03:00
OverloadedOrama 2cb07fb848 Added option to affect all projects in the HSVDialog
HSVDialog should be ready now. These options will also appear in the rest of the image effects.
2020-07-24 03:41:10 +03:00
OverloadedOrama 95ccd42e48 Added option to affect all frames in the HSVDialog 2020-07-24 03:28:39 +03:00
OverloadedOrama 1ce89c6577 Added affecting options to the HSVDialog
First option is to affect the selected pixels only. The second it to affect the current cel, or the entire frame (all cels of the frame). Options to affect all frames and all projects will be added next. I also made changes to Canvas.handle_undo() and handle_redo() to make this work.

Once all these options are added successfully in HSVDialog, they will also be added in the rest of the Image effect dialogs.
2020-07-24 03:22:12 +03:00
OverloadedOrama af915caf7a Refactored adjust_hsv to be 3 times faster
adjust_hsv() now gets executed once instead of thrice. The results should be the same.
2020-07-23 04:39:23 +03:00
OverloadedOrama 462187a6c1 Grouped Image effect dialogs together in Main.tscn 2020-07-23 04:15:18 +03:00
OverloadedOrama 8d9e1e8207 Fullscreen can be toggled on and off from the View menu 2020-07-21 22:11:25 +03:00
OverloadedOrama 0f82be765e Replaced the _min and _max Project variables with Project.selected_pixels
This will allow us to create more selection tools in the future, that aren't necessarily rectangular (See #129) and even enhance the current rectangle selection tool (See #56)

Current issues spotted so far:
Drawing is slower for large images, and bucket filling is also considerably slower even on a 64x64 image. Optimizations are required.
2020-07-20 22:15:34 +03:00
OverloadedOrama 8c965c1858 Added ability to change gradient direction 2020-07-18 19:01:24 +03:00
OverloadedOrama 7aee58ec1a Fixed gradient dialog crash
Occurred sometimes when trying to generate a gradient in a different project that has a different size.
2020-07-18 17:29:05 +03:00
OverloadedOrama 29e9579eb6 Added basic gradient generation
A new option in the "Image" menu, gradient generation.
2020-07-18 17:23:36 +03:00
OverloadedOrama 826b4da177 Organized all Dialog nodes in Main.tscn under a parent "Dialog" node
Just to make the scene tree look cleaner.
2020-07-18 02:27:47 +03:00
OverloadedOrama c6bc3d6d05 Change point limit of Guides from 99999 to 19999
This should prevent some bugs where the guide being dragged won't appear. Probably memory issues?
2020-07-16 05:36:17 +03:00
OverloadedOrama 740d7e237d Made Symmetry Guides have dotted lines
Just to make them different from regular Guides
2020-07-16 05:35:31 +03:00
OverloadedOrama a5a8bf1fe5 Turn Symmetry Guides visibility on and off if mirroring is enabled
Also fixed issue with "Show Guides" view menu option and having multiple projects with guides. Only think remaining is to make the Symmetry Guides look different than regular guides. Closes #133.
2020-07-16 05:05:40 +03:00
OverloadedOrama 9fa91ffd8e Added SymmetryGuides
Two special guides - one horizontal and one vertical - that let you change the axis of symmetry for mirroring. On the next commit(s) I will make them visible only if mirroring is toggled on. Almost solves #133
2020-07-16 04:25:59 +03:00
OverloadedOrama 70ba60cbaa Have "untitled" be the default project name on save & export 2020-07-15 20:27:14 +03:00
OverloadedOrama ebf19c7bfe Disable "open last project" option in HTML5 2020-07-15 18:36:46 +03:00
OverloadedOrama 8ec3256ce6 Have "untitled" as default project name in SaveSpriteHTML5 2020-07-15 18:28:46 +03:00
OverloadedOrama ea717cfea7 CreateNewImage now remembers the last created canvas size - Closes #178
The default image width, height and fill color are being used only when the program first launches. After that, if the user creates an image with changed settings, these settings are being kept.
2020-07-15 03:25:59 +03:00
OverloadedOrama c6ccbd4868 Import image file as part of a random brush
The random brush gets loaded only if Pixelorama gets restarted. I'll see if I can change this somehow.
2020-07-14 03:33:01 +03:00
OverloadedOrama 1b561220b2 Merge brush_name_replace() and pattern_name_replace() to file_name_replace() 2020-07-13 22:13:21 +03:00
OverloadedOrama 8c02e696a9 Add hint tooltips for Project Brush buttons when importing them from image files 2020-07-13 21:59:25 +03:00
OverloadedOrama c42a8a7219 Same as the previous commit but for Patterns too 2020-07-13 21:57:37 +03:00
OverloadedOrama 72f5ed1d2b When importing a file brush and its filename already exists, add a number to its filename
Similar to 5df25c21c6 but for brushes.
2020-07-13 21:42:40 +03:00
OverloadedOrama 20f28ff492 Import project brushes from an image file 2020-07-13 21:17:08 +03:00
OverloadedOrama b47685e857 Fixed importing brushes and patterns by opening file 2020-07-13 03:36:42 +03:00
OverloadedOrama d099666abe Fixed transparent background in ResizeCanvas dialog
It was always square, even on non-square image dimensions.
2020-07-11 03:19:52 +03:00
Kinwailo 4a668f71f5
Refactoring tools (#281)
* Refactoring tools

* Remove unused code

* Fixed some inferring errors and added translations

* Attempt to fix some Script Errors found in the CI workflow

* Fix bucket crash.

* Fix static type convert.

Co-authored-by: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com>
2020-07-09 15:22:17 +03:00
OverloadedOrama e1724148fc Updated translations, Readme & Changelog 2020-07-05 02:24:07 +03:00
OverloadedOrama 6e7b3610d0 Workaround for #275 2020-07-01 03:08:50 +03:00
OverloadedOrama 0bc26bbbae Always ensure that directory_path is "user://" on HTML5 2020-06-30 22:36:03 +03:00
OverloadedOrama 7e3436d3ba Loading image files is now possible in HTML5
Had to move some palette png code around in order to make it possible to use these image files as palettes. Hopefully loading .pxo files should be next. Addresses #280
2020-06-30 22:29:24 +03:00
OverloadedOrama 637a60d9ee Saving .pxo files in HTML5 is now possible
Addresses #280
2020-06-30 20:25:43 +03:00
OverloadedOrama fb7c1a1874 Saving .png files is now possible in HTML5
Addresses #280. Huge thanks to https://github.com/Pukkah/HTML5-File-Exchange-for-Godot
2020-06-30 18:32:16 +03:00
OverloadedOrama 6b26bb5b10 Removed custom blend_rect() method from DrawingAlgos 2020-06-30 15:07:09 +03:00
OverloadedOrama 9fbfbc7432 Fix wrong "Export" text changing on the File menu 2020-06-25 05:07:07 +03:00
OverloadedOrama 8230d9de96 Added image size and frame size labels on PreviewDialog
Just to show the image size and the frame size. The latter is only visible if the user chose to import the sprite as a spritesheet.
2020-06-25 01:22:26 +03:00
OverloadedOrama 90d02ad75b Have the ResizeCanvas width & height values the same as the project's size the first time 2020-06-24 04:02:19 +03:00
OverloadedOrama 89b6e3a989 Added a preview to the Resize Canvas dialog 2020-06-24 03:55:58 +03:00
OverloadedOrama 9362b3486b Added a Center button to the ResizeCanvas dialog 2020-06-24 03:31:44 +03:00
OverloadedOrama fa2dfb6bca Change image offset in Resize Canvas 2020-06-24 03:21:44 +03:00
OverloadedOrama 8e2fe8dac3 Ability to import an image file as a pattern
Also moved some pattern importing code from Import.gd to Global.create_pattern_button()
2020-06-24 00:25:54 +03:00
OverloadedOrama a8de56ed68 Ability to import an image file as a brush
Works only for file brushes at the moment. The image files gets copied into the "pixelorama/Brushes" directory.
2020-06-23 21:59:47 +03:00
OverloadedOrama 31fae924bf Removed import button from splash screen and fixed #265 2020-06-23 17:15:18 +03:00
OverloadedOrama 047561b95a Added options for when importing an image as a new frame or layer
The user can now choose which layer they want the new frame to be, and, similarly, which frame they want the new layer to be when importing an image.
2020-06-22 15:57:42 +03:00
OverloadedOrama 76b7014d84 Added UndoRedo support for importing images as frames and layers 2020-06-21 21:39:16 +03:00
OverloadedOrama 40a01f1da3 Added import image as a new layer of the current project
Just realized that I forgot to add undo/redo support of importing images as new frame/layer, oops. Will fix next.
2020-06-21 21:20:39 +03:00
OverloadedOrama f260971056 Added import image as a new frame of the current project
Will also add a way to let the user choose which layer the new cel of the imported image will be.
2020-06-21 21:02:03 +03:00
OverloadedOrama 597fdbc0c0 Removed ImportSprites dialog 2020-06-19 23:07:56 +03:00
OverloadedOrama 2a2de8ba62 Spritesheet preview lines now work properly for non-square images 2020-06-17 17:56:18 +03:00
OverloadedOrama 25d9aca0c4 Drag and drop palette files to open them 2020-06-17 16:47:24 +03:00
OverloadedOrama f7cc9a8104 Added ability to import images as palettes 2020-06-17 03:56:46 +03:00
OverloadedOrama 063ea04b4c If imported image size is less than 100px, limit the max value of the spritesheet frames 2020-06-17 03:34:24 +03:00
OverloadedOrama 28818171d4 Call Global.dialog_open when a PreviewDialog pops up/gets hidden 2020-06-17 02:58:24 +03:00
OverloadedOrama 8142647a69 Added Line2D nodes to cut the spritesheet preview
This helps in previewing how each spritesheet frame will look when it will be imported in Pixelorama. Note that this does not work well with non-square images at the moment.
2020-06-16 18:30:01 +03:00
OverloadedOrama 13613703fc Importing spritesheets is possible again 2020-06-16 17:59:56 +03:00
OverloadedOrama 57d4156341 Added a preview dialog that opens every time the user imports an image file
The dialog does not appear on .pxo files. Import options will be added on it soon.
2020-06-13 20:58:43 +03:00
OverloadedOrama 7219a5a274 Added Resize Canvas option to Image menu 2020-06-13 20:22:25 +03:00
OverloadedOrama 53b91a4bf4 Moved image effect code to DrawingAlgos.gd
More specifically, moved scale, crop, invert, desaturate and generate outline code to DrawingAlgos.gd. I am a little worried of DrawingAlgos.gd getting too big though.
2020-06-13 18:57:28 +03:00
OverloadedOrama c6b977d48e Set the main viewport's cursor to be cross, and set it as a custom cursor image
Instead of setting the main arrow as a custom cursor every time the cursor gets inside the viewport, set the viewport's default cursor to be the cross, and change the cross's image once in Global.gd
2020-06-13 18:09:46 +03:00
OverloadedOrama 2e587e3634 Made TopMenuContainer.gd and moved all the menu code there from Main.gd
Main.gd is now easier to read
2020-06-13 17:59:57 +03:00
OverloadedOrama af078d590d Update TransparentChecker's size of all viewports 2020-06-13 15:33:59 +03:00
OverloadedOrama 8064d7b459 Fixed shadowed variables crashes/warnings occurring in Godot 3.2.2-rc1 2020-06-13 15:25:12 +03:00
OverloadedOrama e6aea97f1b The world_2d of the preview viewports is no longer the same as the main viewport's
A "CanvasPreview" Node2D has been added to every preview viewport, where it draws the current frame. This solves #205.
2020-06-12 02:27:21 +03:00
OverloadedOrama 2371238ec0 Removed Import option from the file menu
The "Open" option will handle importing of .pxo files and image files from now on. The "ImportSprites" file dialog node and script are scheduled to be deleted too. Importing spritesheets option will return soon. Next thing I'm going to work on is a preview window that will appear when importing image files.
2020-06-12 01:11:58 +03:00
OverloadedOrama b0338ab09a Changed structure of .pxo files
The structure of the .pxo files is now consisted of a JSON-structured metadata part, where all the data that can be stored as text are, and a binary part, that contain all the actual image data for each cel and project brush.

This makes it easier for users to understand the .pxo structure, easier to add more changes without having to check versions for backwards compatibility, easier to be opened by third-party apps and it allows us to make an "Export JSON metadata" option, that will export just the metadata in JSON format, without the binary image data.

It's backwards compatible and .pxo files from as far as v0.5 are still supported.
2020-06-10 04:17:39 +03:00
OverloadedOrama d76b24b029 Removed unnecessary code from CreateNewImage.gd 2020-06-09 19:02:09 +03:00
OverloadedOrama 8118381b0b Fixed issue where new images had the size of the previous project 2020-06-09 18:44:08 +03:00
OverloadedOrama d38a6efe9b Move save paths when repositioning tabs
Change path position in the arrays when repositioning tabs
2020-06-06 13:06:50 +03:00
OverloadedOrama 5fda35c2d8 Fixed issues with saving and backups 2020-06-06 02:52:17 +03:00
OverloadedOrama 709a401373 Save backups for all opened projects
current_save_paths and backup_save_paths in OpenSave.gd are arrays now, have paths for every project
2020-06-06 02:16:53 +03:00
OverloadedOrama 2c409ab025 Camera zoom and offset are now project properites
The zoom/offset of the three cameras now get saved in each project, and change when you change project.
2020-06-05 21:03:34 +03:00
OverloadedOrama 9ffce37c0b An asterisk is added to the tab name if there are changes
The window title also changes when switching tabs. And yes, "has_changed_changed" is a stupid method name, I'll find another one sometime later.
2020-06-05 20:15:40 +03:00
OverloadedOrama 6d87901056 Imported image files now open in an new tab
Keep in mind that opening an image file as a new frame might not work properly yet, if the target image has a different size.
2020-06-05 19:51:06 +03:00
OverloadedOrama 1b1c7f844f .pxo files now get opened in a new tab 2020-06-05 18:54:11 +03:00
OverloadedOrama 7a61f1ea4a Fixed issue where the wrong amount of cels were being created
The new image's frames had as many cels as the previously selected project
2020-06-05 18:19:05 +03:00
OverloadedOrama d37b07db5d Reposition tabs is now functional
That was easier than I expected
2020-06-05 17:55:41 +03:00
OverloadedOrama b276999b12 Closing tabs is now possible 2020-06-05 17:50:52 +03:00
OverloadedOrama 4af130bc61 Project brushes change when switching projects
A new Global.file_brushes array is used for the file brushes, and the Project class has its own brushes array for the project brushes
2020-06-05 17:21:35 +03:00
OverloadedOrama 736521246d Change guides when switching project 2020-06-05 16:21:19 +03:00
OverloadedOrama 35969b2f67 Moved the _min and _max variables to Project.gd 2020-06-05 16:06:59 +03:00
OverloadedOrama 60126e46d3 New image now creates a new tab/project 2020-06-05 04:30:50 +03:00
OverloadedOrama ae381a8714 Change canvas and timeline when a tab is being pressed 2020-06-05 04:30:31 +03:00
OverloadedOrama 709a6d470e Added basic UI for tabs 2020-06-05 02:48:38 +03:00
Manolis Papadeas 2e69e1a8c2
Merge pull request #257 from Orama-Interactive/refactoring
Last refactoring merge
2020-06-05 02:23:59 +03:00
Manolis Papadeas 356bd0665b
Added more contributors and donors in AboutDialog 2020-06-05 00:33:45 +03:00
OverloadedOrama f9bd590d20 Moved size variable from Canvas.gd to Project.gd 2020-06-04 23:20:20 +03:00
OverloadedOrama 4e111a7ac0 Created a Projects class
A Project class contains project-specific data like name, undo_redo, frames, layers, tags and brushes. These variables have been moved from Global. This is the first step towards multiple tab support, where each tab will be a different Project.
2020-06-04 21:05:36 +03:00
OverloadedOrama 7371cd79e4 Fixed image effects
Also replaced flip_image_horizontal() and flip_image_vertical() with just flip_image()
2020-06-03 02:53:15 +03:00
OverloadedOrama 54b628f6cb Made a Frame class, no longer use multiple Canvases for multiple frames
The Canvas is now single node, instead of having multiple canvases for each frame. This should also be a performance optimization, since there are less canvas nodes, so there are less _input() calls. It should also fix a rare Undo/Redo issue with motion drawing and making lines. Could be unstable, needs more testing.

As a side effect, the guides are now the same for all frames, so this should also close #246.
2020-06-03 02:14:24 +03:00
OverloadedOrama 34bc528e97 Added AnimationTag class
Replaces nested Global.animation_tags arrays. Also replaced array.duplicate(true) with looping through the array and creating a new class for each array element, because duplicate(true) does not create new classes, unfortunately, which was causing issues with undo/redo.
2020-06-02 05:14:05 +03:00
OverloadedOrama df0032c515 Created a new Cel class, to handle cel information
Like the Layer class, it is used in place of Canvas.layers nested array mess. It hasn't been tested thoroughly yet, so there may be crashes.
2020-06-01 18:50:31 +03:00
OverloadedOrama a9ca858303 Use a new Layer class to handle layer information
This replaces the old Global.layers nested array mess, and makes the code easier to read and to understand.
2020-06-01 16:42:53 +03:00
OverloadedOrama 9b4956b4f1 Even more Global left/right variables became arrays
ColorAndToolOptions has now the same code for left and right tool options, with more similar refactoring coming soon to places like Canvas and DrawingAlgos
2020-06-01 00:44:53 +03:00
OverloadedOrama 4cc0ccb97b More Global left/right variables became Arrays
Global.update_left_custom_brush() and its right counterpart have also now become Global.update_custom_brush(mouse_button : int)
2020-05-31 18:40:47 +03:00
OverloadedOrama c538140de2 Changed Global node variables to arrays for left/right
Instead of having 2 variables for left & right nodes, use an array instead. This will help with better looking code, automation and less repetitive code, as seen in ToolButtons.gd. Move related refactoring will follow.
2020-05-31 18:03:44 +03:00
OverloadedOrama 37a8ad2447 Fixed line making with Shift and don't let color picker pick colors outside of canvas 2020-05-31 16:24:08 +03:00
OverloadedOrama 5b7d161ecf Use enums instead of strings for tools
This could be a slight increase in performance
2020-05-31 16:04:33 +03:00
OverloadedOrama 00a0ab882a Created DrawingAlgos.gd and moved a lot of drawing code there
Moved code from Global.gd and Canvas.gd to DrawingAlgos.gd. Will also move the fill_gaps and draw_brush methods of Canvas.gd next. Maybe even refactor the inside of them a bit to make them easier to read.
2020-05-29 03:16:44 +03:00
OverloadedOrama 379b574257 Split code from PreferencesDialog.gd to HandleLanguages.gd
Also moved PreferencesDialog script & scene to src/Preferences. More Preferences code splitting will follow.
2020-05-28 03:41:28 +03:00
OverloadedOrama ef89c650b2 Fixed TextureRect images of the circle brushes in BrushesPopup
They all had the pixel brush image in their TextureRect
2020-05-24 00:32:20 +03:00
Igor Santarek aae3ae0cf4
Refactoring Main.gd. Mostly cutting big methods into smaller ones. (#244)
* Refactoring Main.gd. Mostly cutting big methods into smaller one.

- Reduced size of _ready method in Main.gd
- Moved code from certain parts of old _ready method into seperate methods
- Fixed the translation bug related to CurrentFrame node in TopMenuContainer scene. The CurrentFrame node wasn't updating the language when I was changing language. I've also changed the translation file for this.
- Fixed Global.palette_option_button.selected related warning. Because of some unknown reasons, git didn't push completed line there.
- Moved code from file_menu_id_pressed and view_menu_id_pressed method in Main.gd to separate methods to make it more readable.

* Removed window_title changes from Main.tscn

Co-authored-by: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com>
2020-05-24 00:22:06 +03:00
OverloadedOrama 12c6118763 Created ToolButtons.gd, moved code from Main.gd there 2020-05-21 21:30:40 +03:00
OverloadedOrama 5f9c1976d2 Made BrushesPopup and PatternsPopup their own scenes 2020-05-21 20:37:20 +03:00
OverloadedOrama d2539f44f0 Removed brush_selected signal 2020-05-21 20:33:00 +03:00
OverloadedOrama 0629449bdf Created UI.tscn
All of the main UI elements are now in UI.tscn instead of Main.tscn
2020-05-21 20:21:01 +03:00
OverloadedOrama 55527501d0 Created TopMenuContainer.tscn and ViewportContainer.gd 2020-05-21 20:13:19 +03:00
OverloadedOrama 30e7b34dc9 Made OpenSprite and SaveSprite separate scenes 2020-05-20 01:44:27 +03:00