Only load dialogs when they are needed and not at the start of the program. Right now only the new image, about, manage layouts and image effects dialogs are being loaded on demand, but more dialogs can be handled this way in future commits.
This drastically reduces the number of nodes. Before, each cel would have its own property node which, when the project had many cels, drove the node count quite high.
This way, Pixelorama remembers the changes users make to the UI, without them having to go to Window, Manage Layouts and clicking on Edit, which was an unintuitive and slow way. Needs testing because bugs may linger.
This commit also adds a new `save_on_change` variable and a `save` method on layout.gd of the dockable_container plugin. Perhaps I should also add this upstream as well.
I also need to add a way to create new layouts based off the default ones (which are permanently stored within Pixelorama's pck file and cannot be modified), so users will always have the option to resort to the default layouts.
Removed the fps option completely as it doesn't have any effects to exported static images. Should be re-introduced once we add video exporting with ffmpeg though.
These were needed with Godot 3 to ensure that you couldn't open any other dialog when a dialog is already open, by using keyboard shortcuts. This no longer seems to be required in Godot 4.
* Basic mp4 exporting, needs ffmpeg
* Add avi, ogv and mkv file exporting
* Add webm exporting
* Set ffmpeg path in the preferences
* Show an error message if the video fails to export
* Make sure to delete the temp files even if video exporting fails
* Update 3DShapeEdit.tscn
Change the menu button to flat to indicate that it is a button that you can press and not a label
* Changed Signal names to make sense
Note: I did not change functions in the ExtensionsAPI
Changed signals in Global.gd (and everywhere else they are referenced) from *_changed to *_switched
* Bonus Signal
Added a signal in Global.gd that gets emitted just before the project is changed.
Added project_changed to Global.gd which also emits what project was changed by an action (not switched).
* Formatting
* Reference Image Updates
* Fixed static typing
Fixed static typing in "src\UI
\ReferenceImages\ReferenceEditPanel.gd"
Changed "ri == null" to "!ri" in "src\UI\Canvas\ReferenceImages.gd"
* Tried fixing the static typing again
Removed lambda functions for the confirmation dialog.
Removed irrelevant print statement.
* Tried fixing static typing again
I think its fixed now
* Changed Spacing
* Fixed Trailing Whitespaces and tabs
* Fixed Final Trailing Whitespace
* Fixed styling and removed useless enum
* Removed double tabs left over from previous commit
* Fixed remove ConfirmDialog Showing on startusp
* Tried Fixing gdlint issues
* Fixed Linting
* Fixed Spelling issues
* Drag and drop to rearrange reference images
Added the ability to drag and drop Reference Images similar to dragging and dropping layers. These can be dragged or used with buttons (similar to the buttons that move frames). With full undo/redo support.
Added tool buttons these should help people who draw on tablets that cannot use keyboard shortcuts (icons still need to be created)
Renamed ReferenceEditPanel.gd to ReferenceEdit.gd (because it is no longer the script of a panel) and changed the base class of the Reference Panel.
Added some more translations.
Remade ReferenceImageButton.tscn to allow for drag and drop
Added drag highlight
* Added Icons
Added icons for the tools of the Reference Images
* Applied the icons to the UI
* Fix Scripting Issues
* Fixed Linting
* Rename Move.png to move.png
* Update Canvas.gd
* Updated the tooltips
Also added the correct translations
* Rename Select.png to select.png
* Rename Select.png.import to select.png.import
* Rename Move.png.import to move.png.import
* Rename Rotate.png to rotate.png
* Rename Rotate.png.import to rotate.png.import
* Fixed import files
* Rename Scale.png to scale.png
* Rename Scale.png.import to scale.png.import
* Added logic to update the reference panel when the project changes
Also fixed visual bugs related to highlighting the current reference image.
Made it so the reference image that was selected in a project get selected again when the project opens instead of going back to -1 (nothing)
* Update Project.gd
* cloned frames only keep original selected cels as selected
* Fixed PasteTagPopup dialog, fixed tag created immediately after starting pixelorama not placed correctly
* formatting
* typo
* Pase tag popup 2.0
* improved code
* formatting
* Update PasteTagPopup.gd
* fixed code messed up while resolving conflict
* group sync achieved
* linting
* quality of life additions
* fixed projects not updating
---------
Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
* Add support for InputEventMouseMotion.pen_inverted
This commit adds support for stylus erasers, both for drawing and
choosing tools. This may be supported on some styli by inverting them
as the property name suggests, or by holding a button while drawing with
the nib.
* Formatting fixes
Since changing the self_modulate no longer seems to have any effect. Changing the alpha in the shader itself would be a bad idea, since it would require every button background to have its own material, instead of sharing the same one.
* Some static typing and use notification to check if the theme has changed in swatches
* Use Vector2i for scrolling, hide scrollbars in the node properties
* More static typing improvements
* More static typing & docstring improvements, remove some methods from Palettes.gd
* [WIP] Go back to json for palettes instead of tres
* Revert back to using dictionaries for palette colors instead of array
Reverts part of the previous commit
* Read width & height from files, don't store the name
* Fix palette renaming
* Copy non-json palettes into json files
* Fix palette duplication
* Add a new _fill_imported_palette_with_colors() to avoid duplicate code in import file methods
* Fix palette file importing when not initialising
* Export palettes as images
* Replace "tres" with "json" filter in the open sprite dialog
* When exporting a palette as an image, automatically set the file name to the palette name
* Replace default palette files with json
* Remove the Global.palette_panel variable, use signals instead.
* Static typing in signals
* Fix warning in Palettes.gd
* Fix formatting
* Add missing comments to the palette files
* Update Palettes.gd
* A few more static typing improvements
* Initial work of a color picker that is always visible
* Make the new color picker fully functional
* Minor UI fixes
* Change the UI a bit so the color picker buttons look like they used to
To save horizontal space
* Add sliders as a separate panel and rename some file names
* Move the left/right color buttons next to the hex text edit
* Add color picker sliders to the same panel as the rest of the color picker, as an expandable/collapsible area
* Change default layout
* Some minor UI improvements
* Remove guides from ColorPicker.tscn
* Reduce the lines of code that calculate the average color
* Make Pixelorama remember if the color picker is expanded and its color mode
* Update tallscreen.tres
* Update tallscreen.tres
* Pixelorama now also remembers the last used picker shape
* Add some extra comments in the code
* Fix typo
* Add some translation strings
* Basic logic for layer effects
* Add an FX button and the ability to add effects, no way to remove or change properties of effects yet
* Basic and ugly UI for adding and removing effects, no property changing yet
* Swap effects
* Fix preload shader paths
* Change parameters for layer effects
* Change gradient parameter in layer effect shaders, and other fixes
* Use CollapsibleContainers for the shader properties
* Set the correct gradient interpolation mode and color space in the UI
* Make effects of group layers apply to children
* Change `apply_fx` to `apply_effects`, formatting, some extra doc comments
* Apply effects to other canvases, when merging layers and when exporting
* Display humanized names of the shader unifrms
* Some UI improvements to the LayerEffectsSettings
* Add an Enabled button in the layer effects window, and change checkboxes to checkbuttons
* Change BaseLayer.apply_effects() to take a cel as a parameter instead
* Make layer effect buttons be affected by the modulate icon color
* Add option in the View menu whether layer effects are displayed in the canvas or not
* Rename `apply_effects()` to `display_effects()`
* Add translation strings
* Add nearest filter to the gradient map
* Don't change Main.tscn
* Fix more translations
* Change the default cursor shape of the generated UI elements of the layer effects
* Add undo/redo and effect application (apply effect destructively)
There are some errors due to the usage of anonymous lambda methods in undo/redo, but it seems to be working well regardless.
* Make layer effect application work on all cels
* cloned frames only keep original selected cels as selected
* Fixed PasteTagPopup dialog, fixed tag created immediately after starting pixelorama not placed correctly
* formatting
* typo
This is both an optimization and it restores live changes of the canvas preview when the user is drawing, without any extra performance cost, since the material is the same.
The only case when the canvas preview is using a different material is when its animation preview is being played, so it can show a different frame than the main canvas.
* part 1/2
* part 2/2
* increased pxo version
* improvements
* formatting
* formatting (missed this one on last commit)
* fix capsule and text 3d
* formatting
* fixed capsule shape
* Fixed text mesh and exposed some new parameters
* fix some typos
* Fixed some bugs
* minor typo
* formatting
* thin lines on hover, thick lines on select
* add proposed changes
* Preview blend modes
No support for exporting and layer merging yet. Also need to fix the move tool preview.
* Preview blend modes on tile mode
* Raise layer limit to 1024
* Export images with layer blending modes
* Save blend modes in pxo files
* Merge layers with blending modes
* Fix crash when adding a new layer
* Preview blending in the other canvases
* Update DrawingAlgos.gd
* Move tool preview
* Re-arrange blend menu and add lighten, darken, linear burn and exclusion
* Add divide blend mode
* Add hue, saturation, color & luminosity blend modes
* Undo/redo when changing blend modes
* move paletes to bin instead of deleting them permanently
* changed emit_signal to deleted.emit()
* allow user to choose between permanent and temporary deletion
* added translation for "Move to bin"
* changed delete dialog to a confirmation dialog
* added "Delete Permanently"