Remove old and unused project settings, update various demos for 4.2 (#1024)

- Move all demo projects that don't require Forward+/Mobile-only features
  to the Compatibility rendering method. This improves performance significantly
  on low-end devices and ensures visuals are identical to a web export
  of the demo.
- Set deadzone on all inputs to 0.2 for better gamepad usability.
- Remove reliance on `default_env.tres` to use built-in Environment
  resources in the main scene instead (which follows the preview environment
  workflow).
- Remove notices pointing to GDNative or VisualScript, since both were
  removed in 4.0.
- Various bug fixes and usability tweaks to 10+ demos.
This commit is contained in:
Hugo Locurcio
2024-03-26 18:01:58 +01:00
committed by GitHub
parent 82913393a8
commit 31d1c0c112
266 changed files with 1619 additions and 1829 deletions

View File

@@ -16,27 +16,27 @@ func _ready():
func save_pressed():
get_node(^"SaveMaterialDialog").popup_centered()
get_node(^"SaveMaterialDialog").popup_centered_ratio()
func load_pressed():
get_node(^"LoadMaterialDialog").popup_centered()
get_node(^"LoadMaterialDialog").popup_centered_ratio()
func apply_pressed():
# Using the passed in editor interface, get the selected nodes in the editor.
var editor_selection = editor_interface.get_selection()
var selected_nodes = editor_selection.get_selected_nodes()
if selected_nodes.size() == 0:
printerr("Material Creator: Can't apply the material, because there are no nodes selected!")
if selected_nodes.is_empty():
push_error("Material Creator: Can't apply the material, because there are no nodes selected!")
var material = _silly_resource_from_values().make_material()
# Go through the selected nodes and see if they have the "set_surface_material"
# Go through the selected nodes and see if they have the "set_surface_override_material"
# function (which only MeshInstance3D has by default). If they do, then set the material
# to the silly material.
for node in selected_nodes:
if node.has_method("set_surface_material"):
node.set_surface_material(0, material)
if node.has_method("set_surface_override_material"):
node.set_surface_override_material(0, material)
func save_file_selected(path):

View File

@@ -2,13 +2,13 @@
[ext_resource type="Script" path="res://addons/material_creator/material_creator.gd" id="1"]
[node name="Material Creator Plugin" type="Panel"]
[node name="Material Creator" type="Panel"]
offset_right = 220.0
offset_bottom = 340.0
script = ExtResource("1")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
anchors_preset = 13
layout_mode = 0
anchor_left = 0.5
anchor_right = 0.5
anchor_bottom = 1.0
@@ -17,77 +17,53 @@ offset_right = 100.0
grow_horizontal = 2
grow_vertical = 2
[node name="DockName" type="Label" parent="VBoxContainer"]
offset_right = 200.0
offset_bottom = 26.0
text = "Material creator"
[node name="AlbedoLabel" type="Label" parent="VBoxContainer"]
offset_top = 30.0
offset_right = 200.0
offset_bottom = 56.0
text = "Albedo color"
layout_mode = 2
text = "Albedo Color:"
[node name="AlbedoColorPicker" type="ColorPickerButton" parent="VBoxContainer"]
offset_top = 60.0
offset_right = 200.0
offset_bottom = 68.0
custom_minimum_size = Vector2(0, 32)
layout_mode = 2
color = Color(1, 1, 1, 1)
[node name="MetallicLabel" type="Label" parent="VBoxContainer"]
offset_top = 72.0
offset_right = 200.0
offset_bottom = 98.0
text = "Metallic strength"
layout_mode = 2
text = "Metallic Strength:"
[node name="MetallicSlider" type="HSlider" parent="VBoxContainer"]
offset_top = 102.0
offset_right = 200.0
offset_bottom = 118.0
layout_mode = 2
max_value = 1.0
step = 0.05
[node name="RoughnessLabel" type="Label" parent="VBoxContainer"]
offset_top = 122.0
offset_right = 200.0
offset_bottom = 148.0
text = "Roughness strength"
layout_mode = 2
text = "Roughness Strength:"
[node name="RoughnessSlider" type="HSlider" parent="VBoxContainer"]
offset_top = 152.0
offset_right = 200.0
offset_bottom = 168.0
layout_mode = 2
max_value = 1.0
step = 0.05
ticks_on_borders = true
[node name="HSeparator" type="HSeparator" parent="VBoxContainer"]
offset_top = 172.0
offset_right = 200.0
offset_bottom = 176.0
layout_mode = 2
[node name="ApplyButton" type="Button" parent="VBoxContainer"]
offset_top = 180.0
offset_right = 200.0
offset_bottom = 211.0
text = "Apply material"
layout_mode = 2
text = "Apply Material"
[node name="SaveButton" type="Button" parent="VBoxContainer"]
offset_top = 215.0
offset_right = 200.0
offset_bottom = 246.0
text = "Save material"
layout_mode = 2
text = "Save Material"
[node name="LoadButton" type="Button" parent="VBoxContainer"]
offset_top = 250.0
offset_right = 200.0
offset_bottom = 281.0
text = "Load material"
layout_mode = 2
text = "Load Material"
clip_text = true
[node name="Label" type="Label" parent="VBoxContainer/LoadButton"]
visible = false
anchors_preset = 15
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
offset_bottom = -10.0