Also fixes a bug with the inconsistent behavior caused by resizing a selection with gizmos without pressing Shift, while the keep ratio button was pressed.
For some reason, cel_texture.texture.get_data() seemed to cause a segmentation fault, and then a crash, when the image size was large. Also added some extra static typing to the drag and drop methods, but they are unrelated to the crash.
* Added intial crop tool
* [skip ci] Removed unneeeded LINE_WIDTH constant from CropRect
* Added DimensionsLabel
* Cleaned up CropRect._draw
* Hide the CropRect after switching to a different tool
* Sets the crop values to the entire canvas size on setup
* [skip ci] Added crop tool tooltip
* Made Crop tools synced with eachother by placing the crop settings on CropRect
* Added new modes, refactored, added rule of thirds lines and darkened background
* [skip ci] reset optimization
* Renames
* [skip ci] Tweaked the darkened background
* Fixed bug with top/bottom/left/right sliders after rect refactor
* Changing width/height on locked aspect ratio bug
* Aspect ratio sliders rounding/setting a min of 1 px height/width
* Fixed bugs with drawing the crop rect, especially with locked aspect ratio
* Save the mode to config_cache
* Added size lock and renamed mode
* Added tooltip for size lock. Not sure if I did the translation file right
* removed signal that wasn't used
* Formatting
* Removed old TODO comment from one of my previous PRs that isn't true anymore
* Fixed definition order for linter
* Changed locked size modes moving to offset by @Variable-ind, reordered methods
---------
Co-authored-by: MrTriPie <MrTriPie>
* Image bruch now obeys dynamics as well
* Added a signal that resets dynamics
* formatting
* change uncheck.png
* added preview for pressure
* Added the requested changes
* Code Improvements to Perspective editor
* formatting
* fixed a bug
* Some drastic changes
* Delete src/UI/Tools directory
* Delete src/UI/UI/PerspectiveEditor directory
* Some drastic changes
* i messed up so here's the fix
* Added easy movement and rotation
* formatting
* useless script
* fix some things and add tracker disabler
* formatting
* fix incorrect length on redo
* remove useless code
* Added Perspective Editor
* removed unintended changes
* Removed unintended changes
* removed un-intended changes
* Delete Axes.tscn
* Delete Axis.gd
* Removed MouseGuides from editor
I will add them separately
* Added MouseGuides
* Some changes
* Fixed some things
* added mouse guide
* make MouseGuides remember last setting
* don't move if dialog is open
* Dont move tracker guides if dialog is open
* UI improvement to editor
* Update VanishingPoint.gd
* UI Improvement
* Minor Color Improvements
* fixed a bug
This was causing a crash
* Some UI Changes
* Improve UI some more
* fix typo
* Added Undo/Redo and improved UI
* Formatting
* formatting
* formatting
* formatting
* Fix Definition out of order
* Fix Definition out of order
* formatting
* formatting
* fix Duplicate error
* Fix some things
* Some UI Changes
* Some code refinement
* Removed un-needed lines
* Some code refinement
* Some more UI Changes
* Changes, Changes and Changes
* Delete LineButton.gd
* Delete LineButton.tscn
* Delete PerspectiveEditor.gd
* Delete PerspectiveEditor.tscn
* Delete PointCollapseContainer.gd
* Delete PerspectiveLine.tscn
* Delete PerspectiveLine.gd
* Changed boundary separators to ColorRects
* make the guide update more frequently
* make default color have full alpha
* Dim the boundaries based on luminance
* typo
* Formatting
* Formatting
* formatting i forgot to do
* Delete VanishingPoint.gd
* Delete VanishingPoint.tscn
* Fixed rouge collapsible container
---------
Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
Have only two shaders, one for simple gradient and the other for dithered gradient generation. The gradient shape gets passed as a uniform to the shader. Gradients can now get repeated, and the size option for linear gradients is back.
Gradients are no longer limited to two colors, but can now instead have as many as we want, with each color having its own offset. Step gradients have now been removed; to generate the same effect, you can now generate a linear gradient with constant interpolation. Cubic interpolation in gradients is now also possible.
The dithering shaders were by far the biggest challenge and they had to be re-written in order for them to support multiple colors, with each one having a difference offset. I have noticed that some colors may disappear when Constant interpolation is used, though, so it can be buggy sometimes. Thanks to https://godotshaders.com/shader/dither-gradient-shader/ for the reference.
ValueSliders are now also used in the gradient window.
Snap to the rectangular grid and guides (excluding symmetry guides). Can be toggled from the View menu. Currently affects the following tools: Pencil, Eraser, Shading, Line, all shape tool and all selection tools. Although maybe this should not affect the Magic Wand and Select By Color? The snapping distance is currently unaffected by the zoom (should change), and it will be exposed as a parameter in the preferences at a later commit.
This commit removes the unnecessary point_in_rectangle() method, as Rect2.has_point() can be used instead. I was not aware that this built-in method existed back then.
* Upgrade the brushes popup
* upgrade brushes popup
* Formatting
* fix name of 1st brush not written
* use grid container instead of vbox
and added categories
* Some UI Changes
* typo
* Fix autowrap
* fix node paths
* formatting
* more formatting
* more formatting
And hopefully the final commit
* sigh... more formatting
Prior to this commit, the transformation (moving/scaling content with selections) of only one of the selected cels would appear, and the rest would only have a visible effect on transformation confirm.
* Fix move tool preview (without selection)
* typo
* Dont snap if transformation hasn't started
* Added a can_layer_get_drawn() check
* Formatting
* remove useless line
* Formatting (Again cause i am DUMB)
* Formatting (Again cause i am DUMB)
* Better Code
This lets us create ValueSlider and CollapsibleContainer nodes properly via the add node button, instead of instancing their scenes. They have also become more a bit more themeable. Eventually, ValueSlider.tscn and CollapsibleContainer.tscn will be deleted.
* Moved Reference Images to it's Folder
* Moved the rest to their respective folders
* formatting
* Fix formatting
I removed the `PackedScene` static typing declaration to reduce the number of characters in the line to less than 100. It's not really needed anyway, as Godot should be able to figure out that it's a PackedScene, since it's a tscn file, simply by using `:=`.
* reverting some changes
* Removed some un-expected things
* Fixed TransparentChecker Code
* fix typo
* Revert it
I didn't realize it was intended
* Removed unneded changes
* removed some unexpected changes
Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
Using a signal to change the cel was not a good idea, because it was not being emitted with the undo/redo system. The signal should also fire *after* the cel changes, and this is what happens in this commit. Should be useful for future features and extensions to check whether a cel has been changed.
A small refactor. A very minor performance boost when selecting cels, but also a minor performance decrease when selecting frame buttons. Selecting layer buttons should be pretty much the same. I think the code should be a bit more readable now, plus we got rid of that yield() in Project.gd so that's a bonus.
* Allow floating point for HRuler
* Allow floating point for VRuler
* Formatting
* Format again
Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
* Implement clear4x rotation
* Don't use pixelated uvs on the final result, only on the preview, and fix pivot positioning
* Update to cleanEdge algorithm
* Add cleanEdge scaling
Removed `directory_path`, `file_name`, `file_format` and `was_exported` from Export.gd. These variables already exist on Project.gd, no need to have them twice.
* Tool shortcuts should ignore macOS Command modifier.
This prevents common shortcuts like CMD+S (Save), CMD+C (Copy), etc, from activating a tool.
* Fix formatting
Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
* Remove animation tab from the export dialog, unify it with the first tab
* Tidy up the UI using GridContainers
* Make ExportDialog a ConfirmationDialog and clean some code
* Make project a parameter in export methods
This will be useful in the future for exporting multiple projects at once via terminal arguments
* Add a layers option in the export dialog
Currently only visible layers and selected layers, need to add specific layer selection and handle group blending properly.
* Align everything to the left
* Change "directory" into "folder"
* Make animation direction affect spritesheets and multiple png exporting
Besides just gifs and apngs
* Minor code re-organization
* Keep spritesheet options when changing tab
* Use the Unicode multiplication sign in the dimension label
* Specific layer exporting with group blending support
* Change file format cursor mode to pointing hand instead of forbidden
* Add a new custom CollapsibleContainer node and use it for advanced settings in the export dialog
* Change Popups node into Control so its children will automatically inherit the theme
* Add the TextureRect of the CollapsibleContainer in the UIButtons group
* Update ExportDialog.gd
* Disable "Create new folder for each frame tag" when gif/apng is selected, and hide it completely on the spritesheet tab
* Fix "Create new folder for each frame tag" being visible even if the CollapsibleContainer's button is not pressed
* Show layer path for each layer in the export dialog's "Layers" option
* Update translations
* Update strings
* APNG: Initial refactorings of animation exporter internals
* APNG: Make ExportDialog actually able to handle multiple file formats
* APNG: Bugfix to FPS hint and such
* APNG: Refactoring: Fix file format propagation
* APNG: Make an "APNG exporter" which creates an empty PNG container
This was the testbed of the previous integration commits.
* APNG: The actual exporter!
* APNG: Remove random src/Main.tscn changes
* APNG: Format/lint
* APNG: Format & Lint, part II
* Fixed link cel indicator color and animation tags position
* New scrolling and min size
* fixed dockable container for the timeline min size
* Cleanup
* Tweaked minimum size
* Removed some hacks that are no longer needed
* Fixed frame scrollbar not being in the right place at startup, added ensure_control_visible
* frame scroll horziontally without shift if can't scroll vertically + min size tweaks
* Renamed the frames/layer/cel containers
* Always scroll by whole frames
* Fixed conflict
* reoranized AnimationTimeline scene's node tree to wrok as expected
* tweaks
* Fixed tag position and removed uneeded layer button theme code
* added the icon theme code back, I thought this was for the timeline XD
* Smaller LayerButtons
* Save Layer and Cel size between sessions
* Combined _on_AddLayer_pressed and _on_AddGroup_pressed into 1 add_layer method
* Rename scroll container
* formatting
Co-authored-by: MrTriPie <MrTriPie>
* Implemented except for clone layer bug
* more asserts
* Fixed the layer cloning bug
* gdformat
* Fixed new cels linked crash
* Fixed old .pxo files
* Removed default red color from LinkedIndicator in PixelCelButton scene
Co-authored-by: MrTriPie <MrTriPie>
* Updated PixelLayerButton's LinkButton's hint_tooltip to be more accurate
* Don't automatically link the current frame's cel when enabling new_cels_linked on a layer
* Mostly added new system
* renamed link group to link set
* Enable drag and drop of linked cels on the same layer
* formatted CelButton.gd
* serialize/deserialize
* Copy frames w/ new linked cels system. Removed copy_cel from layer classes
* Removed commented out code from AnimationTimeline.copy_frames
* Removed Project.duplicate_layers
* Removed unlink_cel in favour of using null with link cel (as the first part of that method was the same)
* Disabled show_behind_parent on PixelCelButton's LinkedIndicator, as it wasn't enough to improve visibility of selection
* Moved BaseLayer.copy out of the Methods to Override section
* Added optional texture param to Cel's set_content method (needed for use when deserializing, and otherwise helpful
* set textures with set_content where needed
* open_image_as_spritesheet_layer new_cels_linked part updated
* clone layer with linked cels implemented. Removed copy_all_cels from layer classes
* weaked how copied layers names are updated
* Merge layers works with new linked cels now
* Fixed texture on cel buttons not being updated on button setup
* fixed bug where using set_content with new image texture would result in an empty texture
* Open old .pxo with new linked cels
* simplified backwards compatiblity
* removed linked_cels
* better linked cels backwards compatibility
* Removed some old TODO comments
* fixed linked_cels conversion bug when linked_cels is empty
* Added undo for linking the previous cel when creating new cels with new_cels_linked enabled
* Removed TODOs
* Cleaned up some method variable naming
* Cleaned up deserialization
* combined matching for loops
* Inlined BaseLayer.copy() where its used
* gdformat
* Fixed Translations,pot
Co-authored-by: MrTriPie <MrTriPie>
If you press and hold an arrow button, the value will keep changing until you release. Replicates SpinBox's behavior. We should be able to replace any SpinBox now without losing any functionality.
Their visibility is toggleable. They also currently do not support echo events, since for some reason Godot only supports them for InputEventKey(s). I suppose this feature could be replicated with a Timer. Once this is done, we can replace all SpinBox nodes.