* 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>
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.
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.
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
* 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
* 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
* Load tilemask from current frame...
...instead of selecting from FileDialog
* Delete the FileDialog
* Added the reset button
every good loader needs a reset button, Cheers!!!
* Hide/Show options based on current tile option
* Changed a condition for tile mode
* Simplified tile detection code
* Priortize main tile as nearest if mouse is in it
* make tile mode draw behind canvas
* Changed a condition
* Tiles on top gets detected first...
...in case of overlap
* Only display relavant options
according to current mode
* Update preview according to..
..current mode
* removed print()
* Added tile masking
* Added tile masking
* Compare mask with project size
only masks with same size as project are accepted
* Formatting
* Added the suggestions
* Some minor modifications
* detect if a mask is loaded or not
* Added tile_mask to project
* Cosmetics
* added path detection
* added option to emit signal instead of loading...
... image directly through OpenSave
* Added a way to load mask for HTML5
* formatting
* formatting
* Formatting
* set proper way for saving tile_mask
* Formatting
* removed whitespace
* Added the pivot system
* Some re-arrangement
* a bug-fix
* fixed a conversion scale bug
The problem was the conversion from rect to pixel scale was not properly done, i changed it so that it sets conversion factor of shorter side according to the longer side
* Fix to allow manual pivoting
* remove an update()
i may have added it my self but i think its not needed now
* made shader pivot consistent with gd script
by doing `pivot + Vector2(0.5, 0.5)` for "Nearest neighbour (Shader)"
* Cosmetics
* Formatting
* more formatting
* an optimization
* add limit change with brush
* Delete Draw.gd
* Delete BaseTool.gd
* added error calculation
* revert last commit
* Implemented OS.clipboard (using var2str())
* some sanity checks
* formatting
* use text system instead of os clibboard
* Add preferences for tile mode basis vectors
Each tile is offset according to the x and y basis. For example, a tile (1,1) would be at basis_x + basis_y
* Update tools for custom tile modes
Show the indicator in the correct position, and only draw on the nearest tile.
* Fix style issues
* Move tile functionality to own class to prevent bloating Project
* Fix error in Tiles bounding box logic
* Make tile mode offsets project settings
Since the desired tile mode offsets depends on the tile being drawn, the tile mode offsets should be a project specific setting which is persisted in the project file.
* Update TileMode object immediately after closing dialog
* Don't draw center tile by default in TileMode
* Move tile mode offsets to view menu
* Move tile mode offsets dialog out of ImageEffects
Mapped to left and right mouse buttons respectively by default, as well was L1 and R1 buttons respectively in joypads. This commit should allow mouse-free drawing, since it's now possible to activate the left and right tools via joypad and keyboard buttons, thanks to the Keychain plugin.
Similar to GraphicsGale, you can now draw without moving the mouse. Although you still need the mouse for the left and right buttons, but I'd like to make give more options to the user as well so that they can activate tools using keyboard and joypad buttons, if they like.
The numpad arrow keys did nothing previously, so nothing changes for people who are not interested in this feature. They are also configurable thanks to the Keychain plugin.
* Start implementing the godot_better_input plugin
* Update ShortcutEdit.gd
* Load & save preset option
* Add some groups and fix action events not being deleted on load
* Add MenuInputAction class for multiple menu accelerators
* Create a proper plugin and a BetterInput autoload
* Update menu accelerators
* Move settings to BetterInput
* Move menu enums to Global, make more MenuInputActions
* Add more menu events
* Add new groups
* Optimize BetterInput _input() method
* Remove a lot of lines of code
* Change some previous events, add ignore actions and a View menu group
* Change update_item_accelerator to update_ui
* Move MenuInputAction initialization to BetterInput.gd
* Update hint tooltips when a shortcut changes
Temporarily comment out some code regarding the configurable modifiers
* Some MenuInputAction variable name changes
* Add handle_input() to InputAction
* Update the shortcuts of buttons
* Fix shortcut selector menu position
* Change plugin name into Keychain
* Fix keyboard input dialog exiting when Enter or Space is being pressed
* Add two more groups
* Make groups folded by default
* Temporarily make tool modifier shortcuts not configurable
A temporary change, they will be made configurable again, with different actions that are currently mapped to the same events, local/independent from each other.
* Add license for Keychain
* Fix issue where a key event would be added in other input types
* Fix bug where the assigned state was not updated when the dialog appeared again
* Update Main.tscn
* Add a disabled line edit in keyboard shortcut selector to grab focus
* Load presets in the Keychain autoload
This way, the input actions get updated from the start, instead of only at the ShortcutEdit scene.
WARNING, this currently causes crashes if the menu items have no shortcut binded to them.
* Move custom settings away from Keychain.gd
To keep it the same as the upstream plugin
* Change menu enum names
* Made action_get_first_key() more general
* Use arrays for menu items instead of dictionaries, fixes crash
* Move moveable panels to Window menu
* Format
* Optimize hint tooltip updating
* Add support for translations in Keychain
* Translation changes
* Made tool modifiers configurable
Needs more testing.
* Made camera arrow key movement configurable & joypad axis support
This commit removes the ability to press Shift and Control+Shift to adjust the camera arrow key movement speed. Instead, the speed depends on the zoom level.
The right joypad analog stick is configured to move the camera by default.
* Rename presets into shortcut profiles, use Resources and let users create their own
* [skip ci] Update addons README
* Update Global.gd
* add limit change with brush
* Delete Draw.gd
* Delete BaseTool.gd
* added error calculation
* revert last commit
* fixed rotation bug caused on some transparency
* fix for a bug
when selection was present
* added a comment
* added a fix when selection was enabled
* formating
* fixed another bug
* Added quick buttons for rotation
* 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 limit change with brush
* Delete Draw.gd
* Delete BaseTool.gd
* Pivot correction in case of even size
* fix the Scale3x
it should not remove the edges now
* formatting
* more formatting
This results in both better and faster results. Unfortunately, the shader does not work in the Web version, so we have to rely on the old method for that platform.
* add limit change with brush
* Delete Draw.gd
* Delete BaseTool.gd
* added more info about export conflict
* more info about export conflict
* Update Export.gd
* Update ExportDialog.tscn
* fixed a small mistake