1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-23 14:03:13 +00:00
Pixelorama/src/UI/Canvas/Canvas.tscn
Emmanouil Papadeas 8de9697be0
Layer blend modes (#911)
* Preview blend modes

No support for exporting and layer merging yet. Also need to fix the move tool preview.

* Preview blend modes on tile mode

* Raise layer limit to 1024

* Export images with layer blending modes

* Save blend modes in pxo files

* Merge layers with blending modes

* Fix crash when adding a new layer

* Preview blending in the other canvases

* Update DrawingAlgos.gd

* Move tool preview

* Re-arrange blend menu and add lighten, darken, linear burn and exclusion

* Add divide blend mode

* Add hue, saturation, color & luminosity blend modes

* Undo/redo when changing blend modes
2023-10-22 01:57:45 +03:00

92 lines
3.3 KiB
Text

[gd_scene load_steps=20 format=3 uid="uid://ba24iuv55m4l3"]
[ext_resource type="Script" path="res://src/UI/Canvas/Canvas.gd" id="1"]
[ext_resource type="Shader" path="res://src/Shaders/BlendLayers.gdshader" id="1_253dh"]
[ext_resource type="Script" path="res://src/UI/Canvas/Grid.gd" id="2"]
[ext_resource type="Script" path="res://src/UI/Canvas/Indicators.gd" id="3"]
[ext_resource type="Script" path="res://src/UI/Canvas/TileMode.gd" id="4"]
[ext_resource type="Script" path="res://src/UI/Canvas/CurrentFrameDrawer.gd" id="5"]
[ext_resource type="Script" path="res://src/UI/Canvas/PixelGrid.gd" id="6"]
[ext_resource type="Script" path="res://src/UI/Canvas/Previews.gd" id="7"]
[ext_resource type="Script" path="res://src/UI/Canvas/Selection.gd" id="8"]
[ext_resource type="Shader" path="res://src/Shaders/MarchingAntsOutline.gdshader" id="9"]
[ext_resource type="Shader" path="res://src/Shaders/AutoInvertColors.gdshader" id="10"]
[ext_resource type="PackedScene" uid="uid://no3w7e2264u4" path="res://src/UI/Canvas/MouseGuideContainer.tscn" id="11"]
[ext_resource type="Script" path="res://src/UI/Canvas/OnionSkinning.gd" id="12"]
[ext_resource type="Script" path="res://src/UI/Canvas/CropRect.gd" id="13"]
[ext_resource type="Script" path="res://src/UI/Canvas/Gizmos3D.gd" id="14"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_6b0ox"]
shader = ExtResource("1_253dh")
shader_parameter/opacities = null
shader_parameter/blend_modes = null
shader_parameter/origins = null
[sub_resource type="CanvasItemMaterial" id="1"]
blend_mode = 4
[sub_resource type="ShaderMaterial" id="2"]
shader = ExtResource("9")
shader_parameter/first_color = Color(1, 1, 1, 1)
shader_parameter/second_color = Color(0, 0, 0, 1)
shader_parameter/animated = true
shader_parameter/width = 0.05
shader_parameter/frequency = 200.0
shader_parameter/stripe_direction = 0.5
[sub_resource type="ShaderMaterial" id="3"]
shader = ExtResource("10")
[node name="Canvas" type="Node2D"]
material = SubResource("ShaderMaterial_6b0ox")
script = ExtResource("1")
[node name="CurrentlyVisibleFrame" type="SubViewport" parent="."]
disable_3d = true
transparent_bg = true
handle_input_locally = false
render_target_update_mode = 3
[node name="CurrentFrameDrawer" type="Node2D" parent="CurrentlyVisibleFrame"]
material = SubResource("ShaderMaterial_6b0ox")
script = ExtResource("5")
[node name="TileMode" type="Node2D" parent="."]
show_behind_parent = true
material = SubResource("1")
script = ExtResource("4")
[node name="PixelGrid" type="Node2D" parent="."]
script = ExtResource("6")
[node name="Grid" type="Node2D" parent="."]
script = ExtResource("2")
[node name="Selection" type="Node2D" parent="."]
script = ExtResource("8")
[node name="MarchingAntsOutline" type="Sprite2D" parent="Selection"]
material = SubResource("2")
centered = false
[node name="CropRect" type="Node2D" parent="."]
visible = false
script = ExtResource("13")
[node name="Indicators" type="Node2D" parent="."]
script = ExtResource("3")
[node name="Previews" type="Node2D" parent="."]
material = SubResource("3")
script = ExtResource("7")
[node name="OnionPast" type="Node2D" parent="."]
script = ExtResource("12")
[node name="OnionFuture" type="Node2D" parent="."]
script = ExtResource("12")
[node name="MouseGuideContainer" parent="." instance=ExtResource("11")]
[node name="Gizmos3D" type="Node2D" parent="."]
script = ExtResource("14")