1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-12 08:43:08 +00:00
Pixelorama/src/UI/Dialogs/ImageEffects/GradientDialog.tscn

237 lines
8.1 KiB
Plaintext
Raw Normal View History

[gd_scene load_steps=6 format=2]
[ext_resource path="res://src/UI/Dialogs/ImageEffects/GradientDialog.gd" type="Script" id=1]
[ext_resource path="res://src/UI/Dialogs/ImageEffects/ImageEffectParent.tscn" type="PackedScene" id=2]
[ext_resource path="res://src/UI/Nodes/GradientEdit.tscn" type="PackedScene" id=3]
[ext_resource path="res://src/UI/Nodes/ValueSlider.gd" type="Script" id=4]
[ext_resource path="res://src/UI/Nodes/ValueSliderV2.tscn" type="PackedScene" id=5]
[node name="GradientDialog" instance=ExtResource( 2 )]
window_title = "Gradient"
script = ExtResource( 1 )
[node name="VBoxContainer" parent="." index="3"]
margin_bottom = 444.0
[node name="AspectRatioContainer" parent="VBoxContainer" index="0"]
margin_right = 278.0
[node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"]
margin_left = 39.0
margin_right = 239.0
[node name="GradientEdit" parent="VBoxContainer" index="1" instance=ExtResource( 3 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 204.0
margin_right = 278.0
margin_bottom = 282.0
[node name="GradientOptions" type="GridContainer" parent="VBoxContainer" index="2"]
margin_top = 286.0
margin_right = 278.0
margin_bottom = 408.0
columns = 2
[node name="ShapeLabel" type="Label" parent="VBoxContainer/GradientOptions" index="0" groups=["gradient_common"]]
margin_top = 3.0
margin_right = 137.0
margin_bottom = 17.0
size_flags_horizontal = 3
text = "Shape:"
[node name="ShapeOptionButton" type="OptionButton" parent="VBoxContainer/GradientOptions" index="1" groups=["gradient_common"]]
unique_name_in_owner = true
margin_left = 141.0
margin_right = 278.0
margin_bottom = 20.0
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
text = "Linear"
items = [ "Linear", null, false, 0, null, "Radial", null, false, 1, null ]
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
selected = 0
[node name="DitheringLabel" type="Label" parent="VBoxContainer/GradientOptions" index="2" groups=["gradient_common"]]
unique_name_in_owner = true
margin_top = 27.0
margin_right = 137.0
margin_bottom = 41.0
text = "Dithering pattern:"
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
[node name="DitheringOptionButton" type="OptionButton" parent="VBoxContainer/GradientOptions" index="3" groups=["gradient_common"]]
unique_name_in_owner = true
margin_left = 141.0
margin_top = 24.0
margin_right = 278.0
margin_bottom = 44.0
mouse_default_cursor_shape = 2
text = "None"
items = [ "None", null, false, 0, null ]
selected = 0
[node name="RepeatLabel" type="Label" parent="VBoxContainer/GradientOptions" index="4" groups=["gradient_common"]]
margin_top = 51.0
margin_right = 137.0
margin_bottom = 65.0
text = "Repeat:"
[node name="RepeatOptionButton" type="OptionButton" parent="VBoxContainer/GradientOptions" index="5" groups=["gradient_common"]]
unique_name_in_owner = true
margin_left = 141.0
margin_top = 48.0
margin_right = 278.0
margin_bottom = 68.0
mouse_default_cursor_shape = 2
text = "None"
items = [ "None", null, false, 0, null, "Repeat", null, false, 1, null, "Mirror", null, false, 2, null, "Truncate", null, false, 3, null ]
selected = 0
[node name="PositionLabel" type="Label" parent="VBoxContainer/GradientOptions" index="6" groups=["gradient_linear"]]
margin_top = 72.0
margin_right = 137.0
margin_bottom = 86.0
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
text = "Position:"
[node name="PositionSlider" type="TextureProgress" parent="VBoxContainer/GradientOptions" index="7" groups=["gradient_linear"]]
unique_name_in_owner = true
margin_left = 141.0
margin_top = 72.0
margin_right = 278.0
margin_bottom = 86.0
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
mouse_default_cursor_shape = 2
theme_type_variation = "ValueSlider"
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
value = 50.0
allow_greater = true
allow_lesser = true
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource( 4 )
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
suffix = "%"
snap_step = 10.0
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
[node name="SizeLabel" type="Label" parent="VBoxContainer/GradientOptions" index="8" groups=["gradient_linear"]]
margin_top = 90.0
margin_right = 137.0
margin_bottom = 104.0
text = "Size:"
[node name="SizeSlider" type="TextureProgress" parent="VBoxContainer/GradientOptions" index="9" groups=["gradient_linear"]]
unique_name_in_owner = true
margin_left = 141.0
margin_top = 90.0
margin_right = 278.0
margin_bottom = 104.0
mouse_default_cursor_shape = 2
theme_type_variation = "ValueSlider"
min_value = 0.01
max_value = 200.0
value = 100.0
allow_greater = true
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource( 4 )
suffix = "%"
snap_step = 10.0
[node name="AngleLabel" type="Label" parent="VBoxContainer/GradientOptions" index="10" groups=["gradient_linear"]]
margin_top = 108.0
margin_right = 137.0
margin_bottom = 122.0
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
text = "Angle:"
[node name="AngleSlider" type="TextureProgress" parent="VBoxContainer/GradientOptions" index="11" groups=["gradient_linear"]]
unique_name_in_owner = true
margin_left = 141.0
margin_top = 108.0
margin_right = 278.0
margin_bottom = 122.0
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
mouse_default_cursor_shape = 2
theme_type_variation = "ValueSlider"
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
max_value = 360.0
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource( 4 )
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
suffix = "°"
snap_step = 45.0
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
[node name="CenterLabel" type="Label" parent="VBoxContainer/GradientOptions" index="12" groups=["gradient_radial"]]
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
visible = false
margin_top = 60.0
margin_right = 160.0
margin_bottom = 74.0
size_flags_vertical = 1
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
text = "Center:"
[node name="CenterSlider" parent="VBoxContainer/GradientOptions" index="13" groups=["gradient_radial"] instance=ExtResource( 5 )]
unique_name_in_owner = true
visible = false
value = Vector2( 50, 50 )
allow_greater = true
allow_lesser = true
snap_step = 10.0
suffix_x = "%"
suffix_y = "%"
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
[node name="RadiusLabel" type="Label" parent="VBoxContainer/GradientOptions" index="14" groups=["gradient_radial"]]
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
visible = false
margin_top = 193.0
margin_right = 160.0
margin_bottom = 207.0
size_flags_vertical = 1
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
text = "Radius:"
[node name="RadiusSlider" parent="VBoxContainer/GradientOptions" index="15" groups=["gradient_radial"] instance=ExtResource( 5 )]
unique_name_in_owner = true
visible = false
margin_right = 52.0
value = Vector2( 1, 1 )
min_value = Vector2( 0.01, 0.01 )
max_value = Vector2( 10, 10 )
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
step = 0.01
allow_greater = true
show_ratio = true
Shader-based gradients (#677) * Add 6 shader-based gradient types * Shaders now respect selection * Fix step gradient * Remove comments * Disable step and dithering shaders in Web version * Fixed a weird bug with dithering shaders, selection and GLES2 Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit. * Format & lint * Removed old gradient code * Change how centers work on radial step and dithering * Made angle, center and radius option a bit more clear * Rename bayer-matrices directory to dither-matrices * Use DitherMatrix class * Create dithering types programmatically * Remove unneeded code in shaders * Rewrite the step shader without a for loop More optimized and works on the Web version with GLES2 * Rewrite radial step and dithering shaders without for loop Now all shaders work on the Web version and have been optimized. * Fix Linear & Radial size range and remove some unneeded lines * Added size uniform to Radial Step and Radial Dither * Swap colors in the Linear gradient * Make size a percentage * Make the preview look the same as the result Didn't change the dithering shaders because they seemed to give different results. * Remove ratio uniform and divide uvs by the radius instead This makes more sense because the smaller the number, the smaller the radius. * Fix linear gradient * Change Position to percentage and "Size" to "Transition size" * Mix gradients with original color, if the gradient colors have transparency
2022-05-02 13:12:00 +00:00
[node name="OptionsContainer" parent="VBoxContainer" index="3"]
margin_top = 412.0
margin_right = 278.0
margin_bottom = 436.0
[node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"]
margin_right = 278.0
items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ]
[node name="AnimationOptions" parent="VBoxContainer" index="4"]
visible = false
margin_top = 440.0
margin_right = 278.0
margin_bottom = 474.0
[node name="PanelContainer" parent="VBoxContainer/AnimationOptions" index="1"]
margin_right = 157.0
[node name="AnimateMenu" parent="VBoxContainer/AnimationOptions/PanelContainer" index="0"]
margin_right = 88.0
[node name="InitalButton" parent="VBoxContainer/AnimationOptions" index="2"]
margin_left = 161.0
margin_right = 278.0
[connection signal="updated" from="VBoxContainer/GradientEdit" to="." method="_on_GradientEdit_updated"]
[connection signal="item_selected" from="VBoxContainer/GradientOptions/ShapeOptionButton" to="." method="_on_ShapeOptionButton_item_selected"]
[connection signal="item_selected" from="VBoxContainer/GradientOptions/DitheringOptionButton" to="." method="_on_DitheringOptionButton_item_selected"]
[connection signal="item_selected" from="VBoxContainer/GradientOptions/RepeatOptionButton" to="." method="_on_RepeatOptionButton_item_selected"]
[connection signal="value_changed" from="VBoxContainer/GradientOptions/PositionSlider" to="." method="_value_changed"]
[connection signal="value_changed" from="VBoxContainer/GradientOptions/SizeSlider" to="." method="_value_changed"]
[connection signal="value_changed" from="VBoxContainer/GradientOptions/AngleSlider" to="." method="_value_changed"]
[connection signal="value_changed" from="VBoxContainer/GradientOptions/CenterSlider" to="." method="_value_v2_changed"]
[connection signal="value_changed" from="VBoxContainer/GradientOptions/RadiusSlider" to="." method="_value_v2_changed"]