* 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>
* Add 6 shader-based gradient types
* Shaders now respect selection
* Fix step gradient
* Remove comments
* Disable step and dithering shaders in Web version
* Fixed a weird bug with dithering shaders, selection and GLES2
Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit.
* Format & lint
* Removed old gradient code
* Change how centers work on radial step and dithering
* Made angle, center and radius option a bit more clear
* Rename bayer-matrices directory to dither-matrices
* Use DitherMatrix class
* Create dithering types programmatically
* Remove unneeded code in shaders
* Rewrite the step shader without a for loop
More optimized and works on the Web version with GLES2
* Rewrite radial step and dithering shaders without for loop
Now all shaders work on the Web version and have been optimized.
* Fix Linear & Radial size range and remove some unneeded lines
* Added size uniform to Radial Step and Radial Dither
* Swap colors in the Linear gradient
* Make size a percentage
* Make the preview look the same as the result
Didn't change the dithering shaders because they seemed to give different results.
* Remove ratio uniform and divide uvs by the radius instead
This makes more sense because the smaller the number, the smaller the radius.
* Fix linear gradient
* Change Position to percentage and "Size" to "Transition size"
* Mix gradients with original color, if the gradient colors have transparency
* Add dockable container plugin
Experimenting with it, also added a tabs_visible property to the DockableContainer. Removed some code about Tallscreen from Main.gd, but not all of it.
* Add a panel behind the UI, temporarily restore the dark theme
* Remove tallscreen code
* Add edit mode, toggles DockableContainer's tab visibility on and off
* Split tool options into color pickers, left and right tool options
* Remove alternate_transparent_background
* Re-order tool buttons on resize
* Clip content in timeline
* Changes to the tool panel
* Removed some old unused node variables
* Restore Zen mode
* Set tabs_visible = false by default
* Better way to set tabs_visible = false by default
* Added the license of godot-dockable-container
* Remove unneeded lines
* Update README.md
* Restore window transparency with the canvas
It makes all of the TabContainers transparent however, which may not be what we actually want.
* Change tab names of the UI elements
* Remove unneeded nodes from ColorPickers.tscn
* Update default.tres
* Let the user hide elements individually
* Add some checks in HandleThemes
* Center tool icons
* Remove unneeded custom panel in SplashDialog
* Bump version to v0.10-dev and some other minor changes
* Fix crash on Zen Mode
* Added a hacky way to fix the issue with the palette panel size
* gdformat .
* Lint code - Part 1
* Format code - Part 2
* Lint code - Part 2
Trying to fix the max allowed line length errors
* Add normal_map_invert_y to the image .import files
Because of Godot 3.4
* Do not call private methods outside of the script's scope
Lint code - Part 3
* Format code - Part 3
* Fixed more line length exceeded errors - Lint code Part 3
* Export array of licenses - Lint code part 4
* Clean hint_tooltip code from Global
Removes a lot of lines of code
* Create static-checks.yml
* Fix FreeType's license
Thanks to creepertron for proposing the change and the software IConyc for its png-to-ico and png-to-icns convertion https://aureafunsoft.itch.io/iconyc
* Fixed a lot of installer stuff
Fixed NSIS localization scripts, app version and added file association creation on installation
* Fixed even more installer stuff
Finalized installer and NSIS localization scripts, added pxo document icon
* Update release.yml
Added installer build and upload to release workflow
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.
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.
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.
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.
* 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.
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.
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.
- 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.
* 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>
Importing a non-palette json file no longer crashes the app. Enabled autowrap for a label in EditPalettePopup because some translated text were pushing the boundaries of the dialog window.
* Refactoring image_menu_id_pressed method in Main.gd (#243)
* Refactoring image_menu_id_pressed method in Main.gd
I've moved the code from each "match" case into a seperate method to make it more readable.
Co-authored-by: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com>
* 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>
* Fixed TextureRect images of the circle brushes in BrushesPopup
They all had the pixel brush image in their TextureRect
* Split code from PreferencesDialog.gd to HandleLanguages.gd
Also moved PreferencesDialog script & scene to src/Preferences. More Preferences code splitting will follow.
* Split theme related code from PreferencesDialog into HandleThemes.gd
* Moved shortcuts code from PreferencesDialog
* 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.
* Connected "files_dropped" signal to a method
This lets the user drag and drop files into Pixelorama, while it runs, to open them. This doesn't work properly and will crash when it can't open the files. It will get merged into master soon.
* Renamed handle_running_pixelorama_with_arguments() to handle_loading_files()
handle_loading_files() is also used for _on_files_dropped()
* Moved draw_brush() and fill_gaps() from Canvas.gd to DrawingAlgos.gd
draw_brush() is currently very ugly and probably needs inside refactoring
* Removed coord clamping from fill_gaps()
This should make line making behave as expected when the mouse is outside of canvas boundaries
* Drawing is no longer limited by the canvas boundaries
his means that, if you have a brush largen than 1px, you can draw on the edges of the canvas. All pixels that are being drawn outside of the canvas will still have no effect.
* Use enums instead of strings for tools
This could be a slight increase in performance
* Fixed line making with Shift and don't let color picker pick colors outside of canvas
* 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.
* 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)
* Use Global.Mouse_Button instead of strings for comparison
This should be a slight increase in performance
* Refactoring perferences dialog (#251)
* Added ItemList to themes
* Language and theme checkboxes are now radio buttons
* 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
* Refactored Canvas.gd
* Refactored DrawingAlgos.draw_brush(), made draw_pixel() method
This also fixes alpha blending and lighting/darkening issues when drawing pixels with mirroring.
* Remove draw_pixel(), use draw_pixel_blended() instead
* Ignore warnings
I don't know what else to do about them, they seem trivial anyway
* Use enum instead of strings for Global.theme_type
Another potential small performance boost when changing themes.
* 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.
* Fixed linked cel crash and layer naming
* 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.
* Fixed issue where if you moved a frame to the start (move left), it was invisible
* 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.
Co-authored-by: Igor Santarek <jegor377@gmail.com>
Co-authored-by: Kinwailo <lokinwai@gmail.com>
* New remove current palette feature
This commit adds new feature to Pixelorama that will allow user to remove the current selected palette.
* Fixed grammar and added focus_mode = 0 on the remove palette button
Co-authored-by: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com>
Removed separators entirely. Also made the AnimationTimeline have a StyleBoxFlat of its own, which we use to expand its margin top to cover the little space left because of the VSplitContainer. We also use a TextureRect as a fake VSplitContainer grabber.