2019-10-01 08:34:08 +02:00
|
|
|
[gd_scene load_steps=6 format=2]
|
2018-08-05 18:46:23 +02:00
|
|
|
|
2018-09-03 21:35:44 +02:00
|
|
|
[ext_resource path="res://addons/material_maker/preview.gd" type="Script" id=1]
|
2019-10-01 08:34:08 +02:00
|
|
|
[ext_resource path="res://addons/material_maker/preview_3d.tscn" type="PackedScene" id=2]
|
2018-08-05 18:46:23 +02:00
|
|
|
|
2019-10-05 11:04:50 +02:00
|
|
|
[sub_resource type="World" id=1]
|
2018-08-05 18:46:23 +02:00
|
|
|
|
2019-10-01 08:34:08 +02:00
|
|
|
[sub_resource type="Shader" id=2]
|
2018-08-07 09:31:41 +02:00
|
|
|
code = "shader_type canvas_item;
|
|
|
|
|
2019-08-12 15:58:42 +02:00
|
|
|
uniform sampler2D tex;
|
|
|
|
|
|
|
|
void fragment() {
|
|
|
|
COLOR = texture(tex, UV);
|
|
|
|
}"
|
2018-08-07 09:31:41 +02:00
|
|
|
|
2019-10-01 08:34:08 +02:00
|
|
|
[sub_resource type="ShaderMaterial" id=3]
|
|
|
|
shader = SubResource( 2 )
|
2018-08-07 09:31:41 +02:00
|
|
|
|
2018-08-05 18:46:23 +02:00
|
|
|
[node name="Preview" type="ViewportContainer"]
|
|
|
|
anchor_left = 1.0
|
|
|
|
anchor_right = 1.0
|
2018-08-07 09:31:41 +02:00
|
|
|
margin_left = -398.0
|
2018-08-05 18:46:23 +02:00
|
|
|
margin_top = 3.0
|
2018-08-07 09:31:41 +02:00
|
|
|
margin_right = -3.0
|
|
|
|
margin_bottom = 373.0
|
|
|
|
rect_min_size = Vector2( 200, 200 )
|
2019-10-14 20:42:11 +02:00
|
|
|
mouse_filter = 1
|
2018-08-05 18:46:23 +02:00
|
|
|
size_flags_horizontal = 3
|
|
|
|
size_flags_vertical = 3
|
|
|
|
stretch = true
|
|
|
|
script = ExtResource( 1 )
|
|
|
|
|
2019-08-12 15:58:42 +02:00
|
|
|
[node name="MaterialPreview" type="Viewport" parent="."]
|
2018-08-07 09:31:41 +02:00
|
|
|
size = Vector2( 395, 370 )
|
2019-10-01 08:34:08 +02:00
|
|
|
own_world = true
|
2019-10-05 11:04:50 +02:00
|
|
|
world = SubResource( 1 )
|
2019-08-12 15:58:42 +02:00
|
|
|
handle_input_locally = false
|
2018-08-05 18:46:23 +02:00
|
|
|
render_target_clear_mode = 1
|
|
|
|
render_target_update_mode = 3
|
2019-10-14 20:42:11 +02:00
|
|
|
physics_object_picking = true
|
2018-08-05 18:46:23 +02:00
|
|
|
|
2019-10-01 08:34:08 +02:00
|
|
|
[node name="Preview3d" parent="MaterialPreview" instance=ExtResource( 2 )]
|
2018-08-05 18:46:23 +02:00
|
|
|
|
2019-08-12 15:58:42 +02:00
|
|
|
[node name="Config" type="HBoxContainer" parent="."]
|
2018-08-07 09:31:41 +02:00
|
|
|
anchor_right = 1.0
|
|
|
|
margin_bottom = 20.0
|
2019-09-29 21:53:32 +02:00
|
|
|
size_flags_horizontal = 3
|
2018-08-05 18:46:23 +02:00
|
|
|
|
2019-08-12 15:58:42 +02:00
|
|
|
[node name="Model" type="OptionButton" parent="Config"]
|
2018-08-07 09:31:41 +02:00
|
|
|
margin_right = 100.0
|
2018-08-05 18:46:23 +02:00
|
|
|
margin_bottom = 20.0
|
2018-08-07 09:31:41 +02:00
|
|
|
rect_min_size = Vector2( 100, 0 )
|
2018-08-05 18:46:23 +02:00
|
|
|
text = "Cube"
|
2019-10-05 11:04:50 +02:00
|
|
|
items = [ "Cube", null, false, -1, null, "Cylinder", null, false, -1, null, "Sphere", null, false, -1, null, "Sphere2", null, false, -1, null, "Quad", null, false, -1, null, "Plane", null, false, -1, null ]
|
2018-08-05 18:46:23 +02:00
|
|
|
selected = 0
|
|
|
|
|
2019-08-12 15:58:42 +02:00
|
|
|
[node name="Environment" type="OptionButton" parent="Config"]
|
2018-08-07 09:31:41 +02:00
|
|
|
margin_left = 104.0
|
2019-10-13 22:06:13 +02:00
|
|
|
margin_right = 231.0
|
2018-08-05 18:46:23 +02:00
|
|
|
margin_bottom = 20.0
|
2018-08-07 09:31:41 +02:00
|
|
|
rect_min_size = Vector2( 100, 0 )
|
2019-10-13 22:06:13 +02:00
|
|
|
text = "Epping Forest"
|
|
|
|
items = [ "Epping Forest", null, false, -1, null, "Moonless Golf", null, false, -1, null ]
|
|
|
|
selected = 0
|
2018-08-07 09:31:41 +02:00
|
|
|
|
2019-10-16 15:08:21 +02:00
|
|
|
[node name="Rotate" type="Button" parent="Config"]
|
|
|
|
margin_left = 348.0
|
|
|
|
margin_right = 368.0
|
|
|
|
margin_bottom = 20.0
|
|
|
|
rect_pivot_offset = Vector2( -4, 7 )
|
|
|
|
hint_tooltip = "Show in main view"
|
|
|
|
size_flags_horizontal = 10
|
|
|
|
text = "R"
|
|
|
|
|
|
|
|
[node name="Background" type="Button" parent="Config"]
|
2019-09-29 21:53:32 +02:00
|
|
|
margin_left = 372.0
|
|
|
|
margin_right = 395.0
|
|
|
|
margin_bottom = 20.0
|
2019-10-16 15:08:21 +02:00
|
|
|
grow_horizontal = 2
|
|
|
|
grow_vertical = 2
|
|
|
|
rect_pivot_offset = Vector2( -4, 7 )
|
2019-09-29 21:53:32 +02:00
|
|
|
hint_tooltip = "Show in main view"
|
2019-10-16 15:08:21 +02:00
|
|
|
size_flags_horizontal = 8
|
2019-09-29 21:53:32 +02:00
|
|
|
toggle_mode = true
|
|
|
|
text = "O"
|
|
|
|
|
2019-08-12 15:58:42 +02:00
|
|
|
[node name="Preview2D" type="ColorRect" parent="."]
|
2019-10-01 08:34:08 +02:00
|
|
|
material = SubResource( 3 )
|
2018-08-07 09:31:41 +02:00
|
|
|
anchor_top = 1.0
|
|
|
|
anchor_bottom = 1.0
|
|
|
|
margin_top = -64.0
|
|
|
|
margin_right = 64.0
|
|
|
|
rect_min_size = Vector2( 64, 64 )
|
|
|
|
mouse_filter = 1
|
|
|
|
size_flags_horizontal = 0
|
|
|
|
size_flags_vertical = 8
|
2019-09-29 21:53:32 +02:00
|
|
|
[connection signal="gui_input" from="." to="." method="on_gui_input"]
|
2018-08-07 09:31:41 +02:00
|
|
|
[connection signal="resized" from="." to="." method="_on_Preview_resized"]
|
|
|
|
[connection signal="item_selected" from="Config/Model" to="." method="_on_Model_item_selected"]
|
|
|
|
[connection signal="item_selected" from="Config/Environment" to="." method="_on_Environment_item_selected"]
|
2019-10-16 15:08:21 +02:00
|
|
|
[connection signal="pressed" from="Config/Rotate" to="." method="_on_Rotate_pressed"]
|
|
|
|
[connection signal="toggled" from="Config/Background" to="." method="_on_Background_toggled"]
|
2018-08-07 09:31:41 +02:00
|
|
|
[connection signal="gui_input" from="Preview2D" to="." method="_on_Preview2D_gui_input"]
|