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.
* Added Class System to Api
* formatting
* removed extends
* update extension version
* Added Some New Fail-Safes
* fix typo
* Formatting
* Update ExtensionsAPI.gd
* Typo
* formatting
* formatting
* 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>
* Api Improvements
Proper Removal of Tools
A new `get_current_cel_info()` method
* a new show_error() method
usefull for displaying messages like "Incompatible API" etc...
* typo
* formatting
* added an improvement
Otherwise we would have to connect the signal for every opened project. If a feature/extension requires it, we could add a reference to the project as a parameter for the cel_changed signal, but since that can get retrieved with Global.current_project, it's probably not needed.
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>
* Fix a typo
this is required because this is "Paint" Selection
(so it's not supposed to cancel selection if we click outside the canvas)
* Added Selction Modes
Default, Add, Subtract, Intersect
* removed whitespace
* better options
* Removed Separators from headers
* formatting
* more formatting that i didnt notice
* Solved Shortcut conflict
* remove whitespace
* 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
* APNG loader: Import addon to take over APNG handling
* APNG loader: Transition code to using the AImgIO addon
* APNG loader: Can now open APNGs.
* AImgIO: Update to fix bugs
* APNG loader: HTML5
* APNG loader: gdformat/gdlint addon
* APNG loader: OpenSave formatting fix
* APNG Loader: Add ignore line to OpenSave because it's too big
* Fix GIFAnimationExporter bug caused by the switch to the addon
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.