1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 17:49:47 +00:00
Pixelorama/src/UI/UI.tscn

583 lines
20 KiB
Plaintext
Raw Normal View History

[gd_scene load_steps=32 format=2]
[ext_resource path="res://src/UI/ToolButtons.gd" type="Script" id=1]
[ext_resource path="res://src/UI/Canvas/CanvasPreview.tscn" type="PackedScene" id=2]
2020-06-04 23:48:38 +00:00
[ext_resource path="res://src/UI/Tabs.gd" type="Script" id=3]
[ext_resource path="res://src/UI/Canvas/Rulers/VerticalRuler.gd" type="Script" id=4]
[ext_resource path="res://src/UI/TransparentChecker.tscn" type="PackedScene" id=5]
[ext_resource path="res://src/UI/Canvas/Rulers/HorizontalRuler.gd" type="Script" id=6]
[ext_resource path="res://src/UI/Canvas/CameraMovement.gd" type="Script" id=7]
[ext_resource path="res://assets/graphics/dark_themes/tools/pencil.png" type="Texture" id=8]
[ext_resource path="res://src/Shaders/TransparentChecker.shader" type="Shader" id=9]
[ext_resource path="res://assets/graphics/dark_themes/tools/bucket.png" type="Texture" id=10]
[ext_resource path="res://assets/graphics/dark_themes/tools/colorpicker.png" type="Texture" id=11]
[ext_resource path="res://assets/graphics/dark_themes/tools/rectselect.png" type="Texture" id=12]
[ext_resource path="res://assets/graphics/dark_themes/tools/eraser.png" type="Texture" id=13]
[ext_resource path="res://assets/graphics/tool_backgrounds/l.png" type="Texture" id=14]
[ext_resource path="res://assets/graphics/dark_themes/tools/lightendarken.png" type="Texture" id=15]
[ext_resource path="res://src/UI/CanvasPreviewContainer.tscn" type="PackedScene" id=16]
[ext_resource path="res://src/UI/ColorAndToolOptions.tscn" type="PackedScene" id=17]
[ext_resource path="res://src/UI/Timeline/AnimationTimeline.tscn" type="PackedScene" id=18]
[ext_resource path="res://src/UI/Canvas/Canvas.tscn" type="PackedScene" id=19]
[ext_resource path="res://src/Palette/PalettePanel.tscn" type="PackedScene" id=20]
[ext_resource path="res://assets/graphics/dark_themes/tools/zoom.png" type="Texture" id=21]
2020-12-23 18:41:42 +00:00
[ext_resource path="res://assets/graphics/dark_themes/tools/pan.png" type="Texture" id=22]
[ext_resource path="res://src/UI/ViewportContainer.gd" type="Script" id=23]
[ext_resource path="res://assets/graphics/dark_themes/tools/rectangletool.png" type="Texture" id=24]
[ext_resource path="res://assets/graphics/dark_themes/tools/ellipsetool.png" type="Texture" id=25]
New selection system (#474) * Basic move tool * Added marching ants effect on the selection borders * Rename SelectionRectangle to SelectionShape, make it have non-rectangular shape and multiple SelectionShapes can exist - Create multiple selection rectangles - Merge them together if they intersect - Move the selections (without contents as of right now) - Gizmos are being drawn but they are not functional yet Code is very ugly. * Sort vectors counter-clockwise to be used as polygon borders I did this, no idea if it works properly, probably won't be used but I thought I'd keep it saved somewhere * More experiments I may or may not need Trying to generate a polygon from the individual selected pixels * Change default rectangle select behavior and ability to clip polygons using Control * Fix rectangle selection clipping * Split polygon into two with selection subtracting * Move selection with contents with the move tool Code is still a mess, don't bother looking. * Move some methods from SelectionShape.gd to Selection.gd The purpose of this is to generalize some selection code, so that it applies to all polygons, the entire selection. More will follow. * UndoRedo for border moving Nothing else in the selections system works properly in UndoRedo right now. Needs: - UR support for creating selections - UR support for modifying selections (merging and cutting selections together) - UR support for removing selection - UR support for moving content & for all the rest of the remaining features * Moving all of the selection shape logic to Selection.gd Handle all of the polygons there instead of having them as individual nodes. Should be easier to handle undo/redo this way. This commit probably breaks move tool + selection tool and undo/redo. Code is still a mess. For your sanity, I hope you are not reading this. I promise I will clean up. * Move tool works again Buggy and messy, of course. * Remove unneeded code and restore selection move undoredo logic * Made Selection.gd have one big preview_image for when moving content, instead of each polygon having its own image Could be further optimized for some specific cases. We could also remove selected_pixels from SelectionPolygon. * UndoRedo support for creating, deleting, merging and clipping selections UndoRedo support for moving content not added in this commit. Should work but needs more testing. This PR also removes selected_pixels from the SelectionPolygon class. * Confirm & cancel selection movement, should support undoredo properly too Press Enter or do any editing to confirm movement, Escape to cancel. I will most likely add UI buttons for confirm and cancel too. * Mirror View affects selection * Restore Cut, Copy, Paste and Clear Selection Pasting now no longer requires a pre-existing selection and instead copies the selections themselves too. * Created a new Select menu, which has Select All and Clear Selection as options Clear Selection now also confirms content moving. TopMenuContainer code has changed to no longer rely on Global for the menu buttons. * Draw gizmos as rectangles No functionality yet. They may need to be turned to nodes, so that they can easily resize based on zoom level and check for mouse enter/exit events. * Made gizmos get drawn in the sides and corners of the big bounding rectangle instead of individual selection parts Still no functionality yet. * Restore label text * Minor optimization when clipping selections This will execute the for loop less times * Made a Gizmo class, cursor change on hover, has_focus = false on mouse click Now I should actually make them resize when dragged, aye? * Very basic gizmo resizing, still a WIP, does not work properly yet * Start replacing the array of selected pixels with a BitMap This should optimize the selection making a lot, and it also allows for easy border drawing without having to deal with polygons, thanks to the MarchingAntsOutline.shader Still commit is still a WIP, image effects and brushes may not work properly yet. Because the BitMap has a fixed size, the size of the project, moving the selection outside of canvas boundaries has proven to be a bit tricky. I did implement a hacky way of handling it, but it may be buggy and problematic. I'm still unsure whether this is the best way to handle the situation. * Selection works with mirror view * Draw a black rectangle when the user is making a rectangular selection After they release the mouse, the black rectangle becomes the selection * Make Selection.gd update when undoing/redoing * Fix brushes not working properly with non-rectangular selections * Added invert selection * Cache has_selection as a variable for a speedup * Fix conflict issues with the shape tools * Made the bitmap image squared so the marching ants effect will be the same on both dimensions There may be a better way to fix the issue, perhaps inside the shader itself. * Some optimizations to call selection_bitmap_changed() less times * Restored almost all of the image effects Left to do: - Change gradient's behavior. Unsure of how it will work with non-rectangular selections yet, but it should not generate pixels outside of the selection. - Restore rotation - Resize bitmap on image resize - Remove the `pixels` array from the ImageEffect * Fix Selection.gd not updating when changing project * Resize the selection bitmap along with image resize * Restored rotation's old behavior and finally got rid of the selected_pixels array The rotation does not yet work properly with selections, but at least it now "works". * Resize selection too when using gizmos Left to do for gizmos: - Proper cancel transformation - Begin transformation (currently named move_content_start but it should be renamed to something more general) when resizing gizmos - Keep the original image and selection in memory and resize them. Meaning, gizmos should not resize the already resized data, but only resize the original. This is less destructive as there is no danger of data loss. - Always resize on InputEventMouseMotion. This is going to be worse for performance, but it will look better for the user. * Image and bitmap resizing now uses the original data and begin transformation on gizmo click No matter how many times the user resizes on the current transformation, the original data will not be lost until they either confirm or cancel, so there is no data loss before confirmation/cancel. * Cancel transformation now works properly when the selection has been resized * Made gizmos resize on mouse motion, fix issues with negative bounding rectangle and when combined with the move tool * Resizing can now get out of positive bounds, clearing and inverting now gets limited to the canvas bounds Resizing currently does not work properly with negative (left & up) canvas boundaries * Flip image when resizing and the bounding rectangle gets flipped * Call move_content_confirm() when inverting selection * Attempt to implement selection resizing that goes outside of the canvas boundaries (not working properly yet) * Flip selection when resizing to negative bounding rectangle sizes And fix preview_image vertical flipping * Fix rotation so that it works (almost) properly with selections Rotation algorithms now accept and only work with a given image, and the pivot has been added as a parameter * Experimental gizmo rotation - does not work properly yet Transforming the selection outside of the canvas is still broken. * Fix some issues with moving selection out of canvas bounds * Fix more issues with selection getting resized outside of canvas bounds * Update marching ants effect properly when switching between projects And make sure the frequency of the marching ants effect always looks roughly the same on all project sizes * Made the rotation gizmo part of the gizmos array and resize them based on camera zoom * Remove unneeded parameter from move_bitmap_values() * Remove more unneeded parameters * Move the selection only if the cursor is above it and neither shift nor control are currently pressed * Gradient generation now works on non-rectangular selections Although this behavior might not be the intended one * Copy/paste marching ants effect offset Useful for when the selection is in negative coords * Fix issue with clear selection & UndoRedo * Restore the ability to move selection when it's in negative coords * Made the marching ants offset a Project variable This fixes the issue of project switching and keeping the previous project's offset. Again, this is only relevant for when the selection is in negative coords. * Made the "from current selection" palette preset work with the new selection system * Fix out of bounds error when using the rectangular select tool on negative coords * Some code cleanup * Comment out the rotation gizmo for now, since it does not work properly * Update marching ants shader params and gizmo sizes when the bitmap changes * Move some methods around in Selection.gd
2021-04-17 18:30:12 +00:00
[ext_resource path="res://assets/graphics/dark_themes/tools/move.png" type="Texture" id=26]
[ext_resource path="res://assets/graphics/tool_backgrounds/r.png" type="Texture" id=27]
[ext_resource path="res://assets/graphics/dark_themes/tools/colorselect.png" type="Texture" id=28]
[sub_resource type="ShaderMaterial" id=1]
shader = ExtResource( 9 )
shader_param/size = 10.0
shader_param/alpha = 1.0
shader_param/color1 = Color( 0.7, 0.7, 0.7, 1 )
shader_param/color2 = Color( 1, 1, 1, 1 )
shader_param/offset = Vector2( 0, 0 )
shader_param/scale = Vector2( 0, 0 )
shader_param/rect_size = Vector2( 0, 0 )
shader_param/follow_movement = false
shader_param/follow_scale = false
[sub_resource type="ShaderMaterial" id=2]
shader = ExtResource( 9 )
shader_param/size = 10.0
shader_param/alpha = 1.0
shader_param/color1 = Color( 0.7, 0.7, 0.7, 1 )
shader_param/color2 = Color( 1, 1, 1, 1 )
shader_param/offset = Vector2( 0, 0 )
shader_param/scale = Vector2( 0, 0 )
shader_param/rect_size = Vector2( 0, 0 )
shader_param/follow_movement = false
shader_param/follow_scale = false
[sub_resource type="StyleBoxFlat" id=3]
bg_color = Color( 0.0627451, 0.0627451, 0.0627451, 1 )
expand_margin_top = 6.0
[node name="UI" type="HBoxContainer"]
margin_top = 28.0
margin_right = 1280.0
margin_bottom = 720.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/separation = 0
2020-05-21 17:33:00 +00:00
__meta__ = {
2020-09-14 21:01:21 +00:00
"_edit_use_anchors_": false,
"_edit_vertical_guides_": [ ]
2020-05-21 17:33:00 +00:00
}
[node name="ToolPanel" type="Panel" parent="."]
margin_right = 48.0
margin_bottom = 692.0
rect_min_size = Vector2( 48, 0 )
size_flags_vertical = 3
[node name="PanelContainer" type="PanelContainer" parent="ToolPanel"]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -20.5
margin_right = -6.5
margin_bottom = 14.0
size_flags_horizontal = 0
size_flags_vertical = 0
__meta__ = {
"_edit_use_anchors_": false
}
Bring refactoring changes to master (#253) * 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>
2020-06-02 17:00:18 +00:00
[node name="ToolButtons" type="VBoxContainer" parent="ToolPanel/PanelContainer"]
2020-05-21 17:33:00 +00:00
margin_left = 7.0
margin_top = 7.0
margin_right = 39.0
margin_bottom = 435.0
size_flags_horizontal = 4
size_flags_vertical = 0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
Bring refactoring changes to master (#253) * 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>
2020-06-02 17:00:18 +00:00
[node name="RectSelect" type="Button" parent="ToolPanel/PanelContainer/ToolButtons" groups=[
"UIButtons",
]]
margin_right = 32.0
margin_bottom = 32.0
rect_min_size = Vector2( 32, 32 )
mouse_default_cursor_shape = 2
button_mask = 3
[node name="Background" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/RectSelect"]
margin_right = 32.0
margin_bottom = 32.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolIcon" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/RectSelect"]
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 12 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorSelect" type="Button" parent="ToolPanel/PanelContainer/ToolButtons" groups=[
"UIButtons",
]]
margin_top = 36.0
margin_right = 32.0
margin_bottom = 68.0
rect_min_size = Vector2( 32, 32 )
mouse_default_cursor_shape = 2
button_mask = 3
[node name="Background" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/ColorSelect"]
margin_right = 32.0
margin_bottom = 32.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolIcon" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/ColorSelect"]
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 28 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Move" type="Button" parent="ToolPanel/PanelContainer/ToolButtons" groups=[
"UIButtons",
]]
margin_top = 72.0
margin_right = 32.0
margin_bottom = 104.0
rect_min_size = Vector2( 32, 32 )
mouse_default_cursor_shape = 2
button_mask = 3
[node name="Background" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/Move"]
margin_right = 32.0
margin_bottom = 32.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolIcon" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/Move"]
New selection system (#474) * Basic move tool * Added marching ants effect on the selection borders * Rename SelectionRectangle to SelectionShape, make it have non-rectangular shape and multiple SelectionShapes can exist - Create multiple selection rectangles - Merge them together if they intersect - Move the selections (without contents as of right now) - Gizmos are being drawn but they are not functional yet Code is very ugly. * Sort vectors counter-clockwise to be used as polygon borders I did this, no idea if it works properly, probably won't be used but I thought I'd keep it saved somewhere * More experiments I may or may not need Trying to generate a polygon from the individual selected pixels * Change default rectangle select behavior and ability to clip polygons using Control * Fix rectangle selection clipping * Split polygon into two with selection subtracting * Move selection with contents with the move tool Code is still a mess, don't bother looking. * Move some methods from SelectionShape.gd to Selection.gd The purpose of this is to generalize some selection code, so that it applies to all polygons, the entire selection. More will follow. * UndoRedo for border moving Nothing else in the selections system works properly in UndoRedo right now. Needs: - UR support for creating selections - UR support for modifying selections (merging and cutting selections together) - UR support for removing selection - UR support for moving content & for all the rest of the remaining features * Moving all of the selection shape logic to Selection.gd Handle all of the polygons there instead of having them as individual nodes. Should be easier to handle undo/redo this way. This commit probably breaks move tool + selection tool and undo/redo. Code is still a mess. For your sanity, I hope you are not reading this. I promise I will clean up. * Move tool works again Buggy and messy, of course. * Remove unneeded code and restore selection move undoredo logic * Made Selection.gd have one big preview_image for when moving content, instead of each polygon having its own image Could be further optimized for some specific cases. We could also remove selected_pixels from SelectionPolygon. * UndoRedo support for creating, deleting, merging and clipping selections UndoRedo support for moving content not added in this commit. Should work but needs more testing. This PR also removes selected_pixels from the SelectionPolygon class. * Confirm & cancel selection movement, should support undoredo properly too Press Enter or do any editing to confirm movement, Escape to cancel. I will most likely add UI buttons for confirm and cancel too. * Mirror View affects selection * Restore Cut, Copy, Paste and Clear Selection Pasting now no longer requires a pre-existing selection and instead copies the selections themselves too. * Created a new Select menu, which has Select All and Clear Selection as options Clear Selection now also confirms content moving. TopMenuContainer code has changed to no longer rely on Global for the menu buttons. * Draw gizmos as rectangles No functionality yet. They may need to be turned to nodes, so that they can easily resize based on zoom level and check for mouse enter/exit events. * Made gizmos get drawn in the sides and corners of the big bounding rectangle instead of individual selection parts Still no functionality yet. * Restore label text * Minor optimization when clipping selections This will execute the for loop less times * Made a Gizmo class, cursor change on hover, has_focus = false on mouse click Now I should actually make them resize when dragged, aye? * Very basic gizmo resizing, still a WIP, does not work properly yet * Start replacing the array of selected pixels with a BitMap This should optimize the selection making a lot, and it also allows for easy border drawing without having to deal with polygons, thanks to the MarchingAntsOutline.shader Still commit is still a WIP, image effects and brushes may not work properly yet. Because the BitMap has a fixed size, the size of the project, moving the selection outside of canvas boundaries has proven to be a bit tricky. I did implement a hacky way of handling it, but it may be buggy and problematic. I'm still unsure whether this is the best way to handle the situation. * Selection works with mirror view * Draw a black rectangle when the user is making a rectangular selection After they release the mouse, the black rectangle becomes the selection * Make Selection.gd update when undoing/redoing * Fix brushes not working properly with non-rectangular selections * Added invert selection * Cache has_selection as a variable for a speedup * Fix conflict issues with the shape tools * Made the bitmap image squared so the marching ants effect will be the same on both dimensions There may be a better way to fix the issue, perhaps inside the shader itself. * Some optimizations to call selection_bitmap_changed() less times * Restored almost all of the image effects Left to do: - Change gradient's behavior. Unsure of how it will work with non-rectangular selections yet, but it should not generate pixels outside of the selection. - Restore rotation - Resize bitmap on image resize - Remove the `pixels` array from the ImageEffect * Fix Selection.gd not updating when changing project * Resize the selection bitmap along with image resize * Restored rotation's old behavior and finally got rid of the selected_pixels array The rotation does not yet work properly with selections, but at least it now "works". * Resize selection too when using gizmos Left to do for gizmos: - Proper cancel transformation - Begin transformation (currently named move_content_start but it should be renamed to something more general) when resizing gizmos - Keep the original image and selection in memory and resize them. Meaning, gizmos should not resize the already resized data, but only resize the original. This is less destructive as there is no danger of data loss. - Always resize on InputEventMouseMotion. This is going to be worse for performance, but it will look better for the user. * Image and bitmap resizing now uses the original data and begin transformation on gizmo click No matter how many times the user resizes on the current transformation, the original data will not be lost until they either confirm or cancel, so there is no data loss before confirmation/cancel. * Cancel transformation now works properly when the selection has been resized * Made gizmos resize on mouse motion, fix issues with negative bounding rectangle and when combined with the move tool * Resizing can now get out of positive bounds, clearing and inverting now gets limited to the canvas bounds Resizing currently does not work properly with negative (left & up) canvas boundaries * Flip image when resizing and the bounding rectangle gets flipped * Call move_content_confirm() when inverting selection * Attempt to implement selection resizing that goes outside of the canvas boundaries (not working properly yet) * Flip selection when resizing to negative bounding rectangle sizes And fix preview_image vertical flipping * Fix rotation so that it works (almost) properly with selections Rotation algorithms now accept and only work with a given image, and the pivot has been added as a parameter * Experimental gizmo rotation - does not work properly yet Transforming the selection outside of the canvas is still broken. * Fix some issues with moving selection out of canvas bounds * Fix more issues with selection getting resized outside of canvas bounds * Update marching ants effect properly when switching between projects And make sure the frequency of the marching ants effect always looks roughly the same on all project sizes * Made the rotation gizmo part of the gizmos array and resize them based on camera zoom * Remove unneeded parameter from move_bitmap_values() * Remove more unneeded parameters * Move the selection only if the cursor is above it and neither shift nor control are currently pressed * Gradient generation now works on non-rectangular selections Although this behavior might not be the intended one * Copy/paste marching ants effect offset Useful for when the selection is in negative coords * Fix issue with clear selection & UndoRedo * Restore the ability to move selection when it's in negative coords * Made the marching ants offset a Project variable This fixes the issue of project switching and keeping the previous project's offset. Again, this is only relevant for when the selection is in negative coords. * Made the "from current selection" palette preset work with the new selection system * Fix out of bounds error when using the rectangular select tool on negative coords * Some code cleanup * Comment out the rotation gizmo for now, since it does not work properly * Update marching ants shader params and gizmo sizes when the bitmap changes * Move some methods around in Selection.gd
2021-04-17 18:30:12 +00:00
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 26 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Zoom" type="Button" parent="ToolPanel/PanelContainer/ToolButtons" groups=[
"UIButtons",
]]
margin_top = 108.0
New selection system (#474) * Basic move tool * Added marching ants effect on the selection borders * Rename SelectionRectangle to SelectionShape, make it have non-rectangular shape and multiple SelectionShapes can exist - Create multiple selection rectangles - Merge them together if they intersect - Move the selections (without contents as of right now) - Gizmos are being drawn but they are not functional yet Code is very ugly. * Sort vectors counter-clockwise to be used as polygon borders I did this, no idea if it works properly, probably won't be used but I thought I'd keep it saved somewhere * More experiments I may or may not need Trying to generate a polygon from the individual selected pixels * Change default rectangle select behavior and ability to clip polygons using Control * Fix rectangle selection clipping * Split polygon into two with selection subtracting * Move selection with contents with the move tool Code is still a mess, don't bother looking. * Move some methods from SelectionShape.gd to Selection.gd The purpose of this is to generalize some selection code, so that it applies to all polygons, the entire selection. More will follow. * UndoRedo for border moving Nothing else in the selections system works properly in UndoRedo right now. Needs: - UR support for creating selections - UR support for modifying selections (merging and cutting selections together) - UR support for removing selection - UR support for moving content & for all the rest of the remaining features * Moving all of the selection shape logic to Selection.gd Handle all of the polygons there instead of having them as individual nodes. Should be easier to handle undo/redo this way. This commit probably breaks move tool + selection tool and undo/redo. Code is still a mess. For your sanity, I hope you are not reading this. I promise I will clean up. * Move tool works again Buggy and messy, of course. * Remove unneeded code and restore selection move undoredo logic * Made Selection.gd have one big preview_image for when moving content, instead of each polygon having its own image Could be further optimized for some specific cases. We could also remove selected_pixels from SelectionPolygon. * UndoRedo support for creating, deleting, merging and clipping selections UndoRedo support for moving content not added in this commit. Should work but needs more testing. This PR also removes selected_pixels from the SelectionPolygon class. * Confirm & cancel selection movement, should support undoredo properly too Press Enter or do any editing to confirm movement, Escape to cancel. I will most likely add UI buttons for confirm and cancel too. * Mirror View affects selection * Restore Cut, Copy, Paste and Clear Selection Pasting now no longer requires a pre-existing selection and instead copies the selections themselves too. * Created a new Select menu, which has Select All and Clear Selection as options Clear Selection now also confirms content moving. TopMenuContainer code has changed to no longer rely on Global for the menu buttons. * Draw gizmos as rectangles No functionality yet. They may need to be turned to nodes, so that they can easily resize based on zoom level and check for mouse enter/exit events. * Made gizmos get drawn in the sides and corners of the big bounding rectangle instead of individual selection parts Still no functionality yet. * Restore label text * Minor optimization when clipping selections This will execute the for loop less times * Made a Gizmo class, cursor change on hover, has_focus = false on mouse click Now I should actually make them resize when dragged, aye? * Very basic gizmo resizing, still a WIP, does not work properly yet * Start replacing the array of selected pixels with a BitMap This should optimize the selection making a lot, and it also allows for easy border drawing without having to deal with polygons, thanks to the MarchingAntsOutline.shader Still commit is still a WIP, image effects and brushes may not work properly yet. Because the BitMap has a fixed size, the size of the project, moving the selection outside of canvas boundaries has proven to be a bit tricky. I did implement a hacky way of handling it, but it may be buggy and problematic. I'm still unsure whether this is the best way to handle the situation. * Selection works with mirror view * Draw a black rectangle when the user is making a rectangular selection After they release the mouse, the black rectangle becomes the selection * Make Selection.gd update when undoing/redoing * Fix brushes not working properly with non-rectangular selections * Added invert selection * Cache has_selection as a variable for a speedup * Fix conflict issues with the shape tools * Made the bitmap image squared so the marching ants effect will be the same on both dimensions There may be a better way to fix the issue, perhaps inside the shader itself. * Some optimizations to call selection_bitmap_changed() less times * Restored almost all of the image effects Left to do: - Change gradient's behavior. Unsure of how it will work with non-rectangular selections yet, but it should not generate pixels outside of the selection. - Restore rotation - Resize bitmap on image resize - Remove the `pixels` array from the ImageEffect * Fix Selection.gd not updating when changing project * Resize the selection bitmap along with image resize * Restored rotation's old behavior and finally got rid of the selected_pixels array The rotation does not yet work properly with selections, but at least it now "works". * Resize selection too when using gizmos Left to do for gizmos: - Proper cancel transformation - Begin transformation (currently named move_content_start but it should be renamed to something more general) when resizing gizmos - Keep the original image and selection in memory and resize them. Meaning, gizmos should not resize the already resized data, but only resize the original. This is less destructive as there is no danger of data loss. - Always resize on InputEventMouseMotion. This is going to be worse for performance, but it will look better for the user. * Image and bitmap resizing now uses the original data and begin transformation on gizmo click No matter how many times the user resizes on the current transformation, the original data will not be lost until they either confirm or cancel, so there is no data loss before confirmation/cancel. * Cancel transformation now works properly when the selection has been resized * Made gizmos resize on mouse motion, fix issues with negative bounding rectangle and when combined with the move tool * Resizing can now get out of positive bounds, clearing and inverting now gets limited to the canvas bounds Resizing currently does not work properly with negative (left & up) canvas boundaries * Flip image when resizing and the bounding rectangle gets flipped * Call move_content_confirm() when inverting selection * Attempt to implement selection resizing that goes outside of the canvas boundaries (not working properly yet) * Flip selection when resizing to negative bounding rectangle sizes And fix preview_image vertical flipping * Fix rotation so that it works (almost) properly with selections Rotation algorithms now accept and only work with a given image, and the pivot has been added as a parameter * Experimental gizmo rotation - does not work properly yet Transforming the selection outside of the canvas is still broken. * Fix some issues with moving selection out of canvas bounds * Fix more issues with selection getting resized outside of canvas bounds * Update marching ants effect properly when switching between projects And make sure the frequency of the marching ants effect always looks roughly the same on all project sizes * Made the rotation gizmo part of the gizmos array and resize them based on camera zoom * Remove unneeded parameter from move_bitmap_values() * Remove more unneeded parameters * Move the selection only if the cursor is above it and neither shift nor control are currently pressed * Gradient generation now works on non-rectangular selections Although this behavior might not be the intended one * Copy/paste marching ants effect offset Useful for when the selection is in negative coords * Fix issue with clear selection & UndoRedo * Restore the ability to move selection when it's in negative coords * Made the marching ants offset a Project variable This fixes the issue of project switching and keeping the previous project's offset. Again, this is only relevant for when the selection is in negative coords. * Made the "from current selection" palette preset work with the new selection system * Fix out of bounds error when using the rectangular select tool on negative coords * Some code cleanup * Comment out the rotation gizmo for now, since it does not work properly * Update marching ants shader params and gizmo sizes when the bitmap changes * Move some methods around in Selection.gd
2021-04-17 18:30:12 +00:00
margin_right = 32.0
margin_bottom = 140.0
New selection system (#474) * Basic move tool * Added marching ants effect on the selection borders * Rename SelectionRectangle to SelectionShape, make it have non-rectangular shape and multiple SelectionShapes can exist - Create multiple selection rectangles - Merge them together if they intersect - Move the selections (without contents as of right now) - Gizmos are being drawn but they are not functional yet Code is very ugly. * Sort vectors counter-clockwise to be used as polygon borders I did this, no idea if it works properly, probably won't be used but I thought I'd keep it saved somewhere * More experiments I may or may not need Trying to generate a polygon from the individual selected pixels * Change default rectangle select behavior and ability to clip polygons using Control * Fix rectangle selection clipping * Split polygon into two with selection subtracting * Move selection with contents with the move tool Code is still a mess, don't bother looking. * Move some methods from SelectionShape.gd to Selection.gd The purpose of this is to generalize some selection code, so that it applies to all polygons, the entire selection. More will follow. * UndoRedo for border moving Nothing else in the selections system works properly in UndoRedo right now. Needs: - UR support for creating selections - UR support for modifying selections (merging and cutting selections together) - UR support for removing selection - UR support for moving content & for all the rest of the remaining features * Moving all of the selection shape logic to Selection.gd Handle all of the polygons there instead of having them as individual nodes. Should be easier to handle undo/redo this way. This commit probably breaks move tool + selection tool and undo/redo. Code is still a mess. For your sanity, I hope you are not reading this. I promise I will clean up. * Move tool works again Buggy and messy, of course. * Remove unneeded code and restore selection move undoredo logic * Made Selection.gd have one big preview_image for when moving content, instead of each polygon having its own image Could be further optimized for some specific cases. We could also remove selected_pixels from SelectionPolygon. * UndoRedo support for creating, deleting, merging and clipping selections UndoRedo support for moving content not added in this commit. Should work but needs more testing. This PR also removes selected_pixels from the SelectionPolygon class. * Confirm & cancel selection movement, should support undoredo properly too Press Enter or do any editing to confirm movement, Escape to cancel. I will most likely add UI buttons for confirm and cancel too. * Mirror View affects selection * Restore Cut, Copy, Paste and Clear Selection Pasting now no longer requires a pre-existing selection and instead copies the selections themselves too. * Created a new Select menu, which has Select All and Clear Selection as options Clear Selection now also confirms content moving. TopMenuContainer code has changed to no longer rely on Global for the menu buttons. * Draw gizmos as rectangles No functionality yet. They may need to be turned to nodes, so that they can easily resize based on zoom level and check for mouse enter/exit events. * Made gizmos get drawn in the sides and corners of the big bounding rectangle instead of individual selection parts Still no functionality yet. * Restore label text * Minor optimization when clipping selections This will execute the for loop less times * Made a Gizmo class, cursor change on hover, has_focus = false on mouse click Now I should actually make them resize when dragged, aye? * Very basic gizmo resizing, still a WIP, does not work properly yet * Start replacing the array of selected pixels with a BitMap This should optimize the selection making a lot, and it also allows for easy border drawing without having to deal with polygons, thanks to the MarchingAntsOutline.shader Still commit is still a WIP, image effects and brushes may not work properly yet. Because the BitMap has a fixed size, the size of the project, moving the selection outside of canvas boundaries has proven to be a bit tricky. I did implement a hacky way of handling it, but it may be buggy and problematic. I'm still unsure whether this is the best way to handle the situation. * Selection works with mirror view * Draw a black rectangle when the user is making a rectangular selection After they release the mouse, the black rectangle becomes the selection * Make Selection.gd update when undoing/redoing * Fix brushes not working properly with non-rectangular selections * Added invert selection * Cache has_selection as a variable for a speedup * Fix conflict issues with the shape tools * Made the bitmap image squared so the marching ants effect will be the same on both dimensions There may be a better way to fix the issue, perhaps inside the shader itself. * Some optimizations to call selection_bitmap_changed() less times * Restored almost all of the image effects Left to do: - Change gradient's behavior. Unsure of how it will work with non-rectangular selections yet, but it should not generate pixels outside of the selection. - Restore rotation - Resize bitmap on image resize - Remove the `pixels` array from the ImageEffect * Fix Selection.gd not updating when changing project * Resize the selection bitmap along with image resize * Restored rotation's old behavior and finally got rid of the selected_pixels array The rotation does not yet work properly with selections, but at least it now "works". * Resize selection too when using gizmos Left to do for gizmos: - Proper cancel transformation - Begin transformation (currently named move_content_start but it should be renamed to something more general) when resizing gizmos - Keep the original image and selection in memory and resize them. Meaning, gizmos should not resize the already resized data, but only resize the original. This is less destructive as there is no danger of data loss. - Always resize on InputEventMouseMotion. This is going to be worse for performance, but it will look better for the user. * Image and bitmap resizing now uses the original data and begin transformation on gizmo click No matter how many times the user resizes on the current transformation, the original data will not be lost until they either confirm or cancel, so there is no data loss before confirmation/cancel. * Cancel transformation now works properly when the selection has been resized * Made gizmos resize on mouse motion, fix issues with negative bounding rectangle and when combined with the move tool * Resizing can now get out of positive bounds, clearing and inverting now gets limited to the canvas bounds Resizing currently does not work properly with negative (left & up) canvas boundaries * Flip image when resizing and the bounding rectangle gets flipped * Call move_content_confirm() when inverting selection * Attempt to implement selection resizing that goes outside of the canvas boundaries (not working properly yet) * Flip selection when resizing to negative bounding rectangle sizes And fix preview_image vertical flipping * Fix rotation so that it works (almost) properly with selections Rotation algorithms now accept and only work with a given image, and the pivot has been added as a parameter * Experimental gizmo rotation - does not work properly yet Transforming the selection outside of the canvas is still broken. * Fix some issues with moving selection out of canvas bounds * Fix more issues with selection getting resized outside of canvas bounds * Update marching ants effect properly when switching between projects And make sure the frequency of the marching ants effect always looks roughly the same on all project sizes * Made the rotation gizmo part of the gizmos array and resize them based on camera zoom * Remove unneeded parameter from move_bitmap_values() * Remove more unneeded parameters * Move the selection only if the cursor is above it and neither shift nor control are currently pressed * Gradient generation now works on non-rectangular selections Although this behavior might not be the intended one * Copy/paste marching ants effect offset Useful for when the selection is in negative coords * Fix issue with clear selection & UndoRedo * Restore the ability to move selection when it's in negative coords * Made the marching ants offset a Project variable This fixes the issue of project switching and keeping the previous project's offset. Again, this is only relevant for when the selection is in negative coords. * Made the "from current selection" palette preset work with the new selection system * Fix out of bounds error when using the rectangular select tool on negative coords * Some code cleanup * Comment out the rotation gizmo for now, since it does not work properly * Update marching ants shader params and gizmo sizes when the bitmap changes * Move some methods around in Selection.gd
2021-04-17 18:30:12 +00:00
rect_min_size = Vector2( 32, 32 )
mouse_default_cursor_shape = 2
button_mask = 3
[node name="Background" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/Zoom"]
margin_right = 32.0
margin_bottom = 32.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolIcon" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/Zoom"]
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 21 )
__meta__ = {
"_edit_use_anchors_": false
}
2020-12-23 18:41:42 +00:00
[node name="Pan" type="Button" parent="ToolPanel/PanelContainer/ToolButtons" groups=[
"UIButtons",
]]
margin_top = 144.0
margin_right = 32.0
margin_bottom = 176.0
rect_min_size = Vector2( 32, 32 )
mouse_default_cursor_shape = 2
button_mask = 3
[node name="Background" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/Pan"]
margin_right = 32.0
margin_bottom = 32.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolIcon" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/Pan"]
2020-12-23 18:41:42 +00:00
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 22 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorPicker" type="Button" parent="ToolPanel/PanelContainer/ToolButtons" groups=[
"UIButtons",
]]
margin_top = 180.0
2020-12-23 18:41:42 +00:00
margin_right = 32.0
margin_bottom = 212.0
2020-12-23 18:41:42 +00:00
rect_min_size = Vector2( 32, 32 )
mouse_default_cursor_shape = 2
button_mask = 3
[node name="Background" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/ColorPicker"]
margin_right = 32.0
margin_bottom = 32.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolIcon" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/ColorPicker"]
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 11 )
__meta__ = {
"_edit_use_anchors_": false
}
Bring refactoring changes to master (#253) * 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>
2020-06-02 17:00:18 +00:00
[node name="Pencil" type="Button" parent="ToolPanel/PanelContainer/ToolButtons" groups=[
"UIButtons",
]]
margin_top = 216.0
margin_right = 32.0
margin_bottom = 248.0
rect_min_size = Vector2( 32, 32 )
mouse_default_cursor_shape = 2
button_mask = 3
[node name="Background" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/Pencil"]
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 14 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolIcon" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/Pencil"]
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 8 )
__meta__ = {
"_edit_use_anchors_": false
}
Bring refactoring changes to master (#253) * 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>
2020-06-02 17:00:18 +00:00
[node name="Eraser" type="Button" parent="ToolPanel/PanelContainer/ToolButtons" groups=[
"UIButtons",
]]
margin_top = 252.0
margin_right = 32.0
margin_bottom = 284.0
rect_min_size = Vector2( 32, 32 )
mouse_default_cursor_shape = 2
button_mask = 3
[node name="Background" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/Eraser"]
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 27 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolIcon" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/Eraser"]
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 13 )
__meta__ = {
"_edit_use_anchors_": false
}
Bring refactoring changes to master (#253) * 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>
2020-06-02 17:00:18 +00:00
[node name="Bucket" type="Button" parent="ToolPanel/PanelContainer/ToolButtons" groups=[
"UIButtons",
]]
margin_top = 288.0
margin_right = 32.0
margin_bottom = 320.0
rect_min_size = Vector2( 32, 32 )
mouse_default_cursor_shape = 2
button_mask = 3
[node name="Background" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/Bucket"]
margin_right = 32.0
margin_bottom = 32.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolIcon" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/Bucket"]
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 10 )
__meta__ = {
"_edit_use_anchors_": false
}
Bring refactoring changes to master (#253) * 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>
2020-06-02 17:00:18 +00:00
[node name="LightenDarken" type="Button" parent="ToolPanel/PanelContainer/ToolButtons" groups=[
"UIButtons",
]]
margin_top = 324.0
margin_right = 32.0
margin_bottom = 356.0
rect_min_size = Vector2( 32, 32 )
mouse_default_cursor_shape = 2
button_mask = 3
[node name="Background" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/LightenDarken"]
margin_right = 32.0
margin_bottom = 32.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolIcon" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/LightenDarken"]
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 15 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RectangleTool" type="Button" parent="ToolPanel/PanelContainer/ToolButtons" groups=[
"UIButtons",
]]
margin_top = 360.0
margin_right = 32.0
margin_bottom = 392.0
rect_min_size = Vector2( 32, 32 )
mouse_default_cursor_shape = 2
button_mask = 3
[node name="Background" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/RectangleTool"]
margin_right = 32.0
margin_bottom = 32.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolIcon" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/RectangleTool"]
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 24 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="EllipseTool" type="Button" parent="ToolPanel/PanelContainer/ToolButtons" groups=[
"UIButtons",
]]
margin_top = 396.0
margin_right = 32.0
margin_bottom = 428.0
rect_min_size = Vector2( 32, 32 )
mouse_default_cursor_shape = 2
button_mask = 3
[node name="Background" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/EllipseTool"]
margin_right = 32.0
margin_bottom = 32.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolIcon" type="TextureRect" parent="ToolPanel/PanelContainer/ToolButtons/EllipseTool"]
margin_right = 32.0
margin_bottom = 32.0
texture = ExtResource( 25 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CanvasAndTimeline" type="VSplitContainer" parent="."]
margin_left = 48.0
margin_right = 950.0
margin_bottom = 692.0
size_flags_horizontal = 3
custom_constants/autohide = 0
2020-06-04 23:48:38 +00:00
[node name="ViewportAndRulers" type="VBoxContainer" parent="CanvasAndTimeline"]
margin_right = 902.0
2020-05-21 17:33:00 +00:00
margin_bottom = 480.0
size_flags_horizontal = 3
size_flags_vertical = 3
2020-06-04 23:48:38 +00:00
custom_constants/separation = 0
[node name="TabsContainer" type="PanelContainer" parent="CanvasAndTimeline/ViewportAndRulers"]
margin_right = 902.0
2020-06-04 23:48:38 +00:00
margin_bottom = 38.0
[node name="Tabs" type="Tabs" parent="CanvasAndTimeline/ViewportAndRulers/TabsContainer"]
2020-06-04 23:48:38 +00:00
margin_left = 7.0
margin_top = 7.0
margin_right = 895.0
margin_bottom = 31.0
tab_align = 0
tab_close_display_policy = 1
drag_to_rearrange_enabled = true
script = ExtResource( 3 )
[node name="HorizontalRuler" type="Button" parent="CanvasAndTimeline/ViewportAndRulers"]
margin_top = 38.0
margin_right = 902.0
margin_bottom = 58.0
rect_min_size = Vector2( 0, 16 )
focus_mode = 0
mouse_default_cursor_shape = 14
action_mode = 0
enabled_focus_mode = 0
script = ExtResource( 6 )
2020-06-04 23:48:38 +00:00
[node name="HSplitContainer" type="HSplitContainer" parent="CanvasAndTimeline/ViewportAndRulers"]
margin_top = 58.0
margin_right = 902.0
2020-05-21 17:33:00 +00:00
margin_bottom = 480.0
size_flags_vertical = 3
custom_constants/autohide = 0
2020-06-04 23:48:38 +00:00
[node name="ViewportandVerticalRuler" type="HBoxContainer" parent="CanvasAndTimeline/ViewportAndRulers/HSplitContainer"]
2020-05-21 17:33:00 +00:00
margin_right = 890.0
margin_bottom = 422.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/separation = 0
2020-06-04 23:48:38 +00:00
[node name="VerticalRuler" type="Button" parent="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler"]
margin_right = 16.0
margin_bottom = 422.0
rect_min_size = Vector2( 16, 0 )
focus_mode = 0
mouse_default_cursor_shape = 15
size_flags_horizontal = 0
size_flags_vertical = 3
action_mode = 0
enabled_focus_mode = 0
script = ExtResource( 4 )
2020-06-04 23:48:38 +00:00
[node name="ViewportContainer" type="ViewportContainer" parent="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler"]
margin_left = 16.0
2020-05-21 17:33:00 +00:00
margin_right = 890.0
margin_bottom = 422.0
focus_mode = 2
mouse_default_cursor_shape = 3
size_flags_horizontal = 3
size_flags_vertical = 3
stretch = true
script = ExtResource( 23 )
2020-06-04 23:48:38 +00:00
[node name="Viewport" type="Viewport" parent="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler/ViewportContainer"]
size = Vector2( 874, 422 )
handle_input_locally = false
usage = 0
render_target_update_mode = 3
[node name="TransparentChecker" parent="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler/ViewportContainer/Viewport" instance=ExtResource( 5 )]
material = SubResource( 1 )
2020-06-04 23:48:38 +00:00
[node name="Canvas" parent="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler/ViewportContainer/Viewport" instance=ExtResource( 19 )]
2020-06-04 23:48:38 +00:00
[node name="Camera2D" type="Camera2D" parent="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler/ViewportContainer/Viewport"]
current = true
zoom = Vector2( 0.15, 0.15 )
script = ExtResource( 7 )
2020-06-04 23:48:38 +00:00
[node name="ViewportContainer2" type="ViewportContainer" parent="CanvasAndTimeline/ViewportAndRulers/HSplitContainer"]
margin_left = 902.0
margin_right = 902.0
margin_bottom = 422.0
size_flags_vertical = 3
stretch = true
script = ExtResource( 23 )
2020-06-04 23:48:38 +00:00
[node name="Viewport" type="Viewport" parent="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportContainer2"]
size = Vector2( 0, 422 )
handle_input_locally = false
render_target_update_mode = 3
[node name="TransparentChecker" parent="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportContainer2/Viewport" instance=ExtResource( 5 )]
material = SubResource( 2 )
[node name="CanvasPreview" parent="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportContainer2/Viewport" instance=ExtResource( 2 )]
2020-06-04 23:48:38 +00:00
[node name="Camera2D2" type="Camera2D" parent="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportContainer2/Viewport"]
current = true
zoom = Vector2( 0.15, 0.15 )
script = ExtResource( 7 )
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasAndTimeline"]
margin_top = 492.0
margin_right = 902.0
margin_bottom = 692.0
size_flags_horizontal = 3
[node name="BottomPanel" type="VSplitContainer" parent="CanvasAndTimeline/HBoxContainer"]
margin_right = 902.0
margin_bottom = 200.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/autohide = 0
[node name="AnimationTimeline" parent="CanvasAndTimeline/HBoxContainer/BottomPanel" instance=ExtResource( 18 )]
margin_top = 0.0
margin_bottom = 200.0
size_flags_vertical = 3
custom_styles/panel = SubResource( 3 )
[node name="RightPanel" type="Panel" parent="."]
margin_left = 950.0
margin_right = 1280.0
margin_bottom = 692.0
rect_min_size = Vector2( 330, 0 )
[node name="PreviewAndPalettes" type="VBoxContainer" parent="RightPanel"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 16.0
margin_right = 3.05176e-05
margin_bottom = 6.10352e-05
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CanvasPreviewContainer" parent="RightPanel/PreviewAndPalettes" instance=ExtResource( 16 )]
2020-09-14 21:01:21 +00:00
margin_left = 15.0
margin_right = 315.0
[node name="ToolAndPaletteVSplit" type="VSplitContainer" parent="RightPanel/PreviewAndPalettes"]
2020-05-21 17:33:00 +00:00
margin_top = 168.0
2020-09-14 21:01:21 +00:00
margin_right = 330.0
margin_bottom = 676.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/autohide = 0
2020-05-21 17:33:00 +00:00
[node name="ColorAndToolOptions" parent="RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit" instance=ExtResource( 17 )]
margin_bottom = 248.0
[node name="PalettePanel" parent="RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit" instance=ExtResource( 20 )]
margin_left = 15.0
2020-05-21 17:33:00 +00:00
margin_top = 260.0
margin_right = 315.0
2020-05-21 17:33:00 +00:00
margin_bottom = 508.0
[connection signal="reposition_active_tab_request" from="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" to="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" method="_on_Tabs_reposition_active_tab_request"]
[connection signal="tab_changed" from="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" to="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" method="_on_Tabs_tab_changed"]
[connection signal="tab_close" from="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" to="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" method="_on_Tabs_tab_close"]
2020-06-04 23:48:38 +00:00
[connection signal="mouse_entered" from="CanvasAndTimeline/ViewportAndRulers/HorizontalRuler" to="CanvasAndTimeline/ViewportAndRulers/HorizontalRuler" method="_on_HorizontalRuler_mouse_entered"]
[connection signal="pressed" from="CanvasAndTimeline/ViewportAndRulers/HorizontalRuler" to="CanvasAndTimeline/ViewportAndRulers/HorizontalRuler" method="_on_HorizontalRuler_pressed"]
[connection signal="pressed" from="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler/VerticalRuler" to="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler/VerticalRuler" method="_on_VerticalRuler_pressed"]
[connection signal="mouse_entered" from="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler/ViewportContainer" to="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler/ViewportContainer" method="_on_ViewportContainer_mouse_entered"]
[connection signal="mouse_exited" from="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler/ViewportContainer" to="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler/ViewportContainer" method="_on_ViewportContainer_mouse_exited"]
[connection signal="mouse_entered" from="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportContainer2" to="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportContainer2" method="_on_ViewportContainer_mouse_entered"]
[connection signal="mouse_exited" from="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportContainer2" to="CanvasAndTimeline/ViewportAndRulers/HSplitContainer/ViewportContainer2" method="_on_ViewportContainer_mouse_exited"]